SCRIPTS

Home  > Scripts
ScriptContentDate
Full Compress Backup of All User Databases
This T-SQL script is full compress backup of all user databases
Administrative:
SQL Server 2008
12/17/2010
Calculating Uptime when support window isn't 24/7
In some corporates there are permissible down time windows, i.e. in the evenings or weekends or both. And then public holidays need to be factored in as well. You want to work out the number of work seconds between two dates and then use this as your total to divide your actual uptime into.
Administrative:
SQL Server 7.x and later
5/6/2010
View Database growth over time
This script uses the backup size as an indication of the real amount of space used by a database. A database with a 1GB mdf that only has 10MB of data is in fact only 100MB in size. This db may grow by 100MB per month. If the mdf size is used, no growth will be observed for 10 months.
Administrative:
SQL Server 7.x and later
5/4/2010
View any new databases created on multiple servers
This Powershell script uses the native Provider that comes standard with SQL 2008. From one function I can see any new (created in the last 30 days, for example) databases that are created on any server and the database size. Great for capacity planning and billing!
Administrative:
SQL Server 7.x and later
4/23/2010
Kill the users before the automatic restore
works on 7, 2000, 2005, 2008
Administrative:
SQL Server 7.x and later
4/21/2010
Analyzing SQL Agent Job and Job Step History in SQL Server
--Analyzing SQL Agent Job and Job Step History in SQL Server -- Written By: Atif Shehzad MSSqlTips.com Have not tested yet...ejm
Monitoring:
SQL Server 2000 and later
6/2/2009
Data_Time_Master_Table
This Script is step 2 to see the Impact of Forced Parameterization this will populate the data in time master table which was created in Step 1
Development:
SQL Server 7.x only
5/6/2009
Time_Master_tbl_ForcedParameterization
This Script is the Step 1 for creating a table in order to see the impact of Forced Parameterization
Development:
SQL Server 7.x only
5/6/2009
Permissions Scripts plus some......
Will give a listing of all permissions on database objects.
Administrative:
SQL Server 6.x and later
4/27/2009
dba3_sys_IndicesAudit
Audit indices ss2k5 and beyond only
Administrative:
SQL Server 2005 only
4/3/2009
dba3_DeleteTopByIncrements_demo
Requires TOP (variable) support of 2k5 & later - demo script
Administrative:
SQL Server 2000 and later
4/2/2009
dba3_fx_DateOnly
DateOnly function demo where date only portions of Dt variables are needed
Tuning:
SQL Server 7.x and later
3/31/2009
TupleDifferencesAndEquivalentsBetweenSetsDisambiguation
General SQL Script 12/5/2008
dba3_Monthly_DateTimeDemarcations
General SQL Script 12/4/2008
dba3_dbmail_Troubleshoot
General SQL Script 11/24/2008
Removal of User Login from ALL databases and SQL Server
Need to remove a login\user from SQL server and all databases? This script will look for the id in all the databases and generate a script to remove it from all databases and SQL server. Input - it the login\user name. Output - Copy/Paste/Execute
Administrative:
SQL Server 2000 and later
11/24/2008
dba3_GrantLoginUserAccessInDb_DataReaderRoleForUserDatabases
General SQL Script 10/28/2008
RANK(), PARTITION, and CTE Demo
A demonstration piece of code allowing you to see how to use RANK(), PARTITION, and CTE's to solve a business need.
Development:
SQL Server 2005 only
10/22/2008
dba3_MemoryPressure_diagnostics
General SQL Script 10/17/2008
Resource Memory Available External
Use to help determine memory leaks and use by OS.
Tuning:
SQL Server 2005 only
9/13/2008
dba3_sp_RestoreDump_ConcurrentVersionInstall_2k8
General SQL Script 8/22/2008
dba3_DBMS_Reporting_ReportingConfiguration
General SQL Script 8/20/2008
dba3_sp_Generate_Select_NoLock_FQN_View_DDL
General SQL Script 8/20/2008
dba3_sp_Generate_Select_NoLock_FQN_View_DDL
General SQL Script 8/19/2008
dba3_Remote_DAC_ss2k5
General SQL Script 8/18/2008
dba3_Create_SpaceUsedDetail_2k5_AND_SpaceUsed_2k5_ForAllDatabases
General SQL Script 8/12/2008
dba3_FileGroup_Usage_Demo_2k5_WithObjectDistViews
General SQL Script 8/12/2008
dba3_DBMS_DataLogBackupDirectoryDatabaseMailProfile_Standards
General SQL Script 8/8/2008
dba3_ss2k58_ProductLevel_And_Version
Administrative:
SQL Server 2005 only
8/8/2008
dba3_Severity_NN_DBMS_Operator_Alert
General SQL Script 8/4/2008
12345678910...