SQL Server Query Tuning Scripts

Common Script/Query Tuning Links:


 

Name:

Disk Usage
Disk Usage by Top Table
Disk Usage by Table
Disk Usage by Partition
Backup and Restore Events
All Transactions
All Blocking Transactions
Top Transactions by Age
Top Transactions by Blocked Transactions Count
Top Transactions by Locks Count
Resource Locking Statistics by Objects
Object Execution Statistics
Database Consistency History
Index Usage Statistics
Index Physical Statistics
Schema Changes History
User Statistics

Author: MS SQL Server/SSMS -> Reports

Description: unknown

Script: unknown

 

Name: Maintenance tasks – Check database integrity

Author: MS SQL Server/SSMS -> Management -> Maintenance Plans

Description: unknown

Script: MS_MP_CheckDatabaseIntegrity_AD12

 

Name: Maintenance tasks – Shrink database

Author: MS SQL Server/SSMS -> Management -> Maintenance Plans

Description: unknown

Script: MS_MP_ShrinkDatabase_AD12

 

Name: Maintenance tasks – Reorganize index

Author: MS SQL Server/SSMS -> Management -> Maintenance Plans

Description: unknown

Script: MS_MP_ReorganizeIndex_AD12

 

Name: Maintenance tasks – Rebuild index

Author: MS SQL Server/SSMS -> Management -> Maintenance Plans

Description: unknown

Script: MS_MP_RebuildIndex_AD12

 

Name: Maintenance tasks – Update statistics

Author: MS SQL Server/SSMS -> Management -> Maintenance Plans

Description: unknown

Script: MS_MP_UpdateStatistics_AD12

 

Name: Maintenance tasks – Backup database full

Author: MS SQL Server/SSMS -> Management -> Maintenance Plans

Description: unknown

Script: MS_MP_BackupDatabaseFull_AD12

 

Name: Maintenance tasks – Backup database differencial

Author: MS SQL Server/SSMS -> Management -> Maintenance Plans

Description: unknown

Script: MS_MP_BackupDatabaseDifferencial_AD12

 

Name: Maintenance tasks – Backup database transactional log

Author: MS SQL Server/SSMS -> Management -> Maintenance Plans

Description: unknown

Script: MS_MP_BackupDatabaseTransactionalLog_AD12

 

Name: Deadlocks

Author: InsData/UITS

Description: unknown

Script: InsData_Deadlocks

Appendix: Deadlock vs BlockingHow to fix SQL Server deadlocksGenerate Deadlock Summary Information

 

Name: Blocking transactions

Author: Tim Ford

Description: see RedGate SQL Script Manager

Script: TimFord_BlockingTransactions

 

Name: Buffer cache hit ratio

Author: Tracy Hamlin

Description: see RedGate SQL Script Manager

Script: TracyHamlin_BufferCacheHitRatio

 

Name: CPU-intensive queries

Author: Louis Davidson

Description: see RedGate SQL Script Manager

Script: LouisDavidson_CPU-intensiveQueries

 

Name: Database file I/O waits

Author: Glenn Berry

Description: see RedGate SQL Script Manager

Script: GlennBerry_DatabaseFileIOWaits

 

Name: Database files: size and space used

Author: Dan McClain

Description: see RedGate SQL Script Manager

Script: DanMcClain_DatabaseFilesSizeAndSpaceUsed

 

Name: Execution plan cache

Author: Gail Shaw

Description: see RedGate SQL Script Manager

Script: GailShaw_ExecutionPlanCache

 

Name: Object read and write statistics

Author: Louis Davidson

Description: see RedGate SQL Script Manager

Script: LouisDavidson_ObjectReadAndWriteStatistics

 

Name: Partitioned table count

Author: Tracy Hamlin

Description: see RedGate SQL Script Manager

Script: TracyHamlin_PartitionedTableCount

 

Name: Performance counter hit ratios

Author: Louis Davidson

Description: see RedGate SQL Script Manager

Script: LouisDavidson_PerformanceCounterHitRatios

 

Name: Server CPU utilization

Author: Glenn Berry

Description: see RedGate SQL Script Manager

Script: GennBerry_ServerCPUUtilization

 

Name: Tables without a clustered index

Author: Tracy Hamlin

Description: see RedGate SQL Script Manager

Script: TracyHamlin_TablesWithoutAClusteredIndex

 

Name: Top resource waits

Author: Glenn Berry

Description: see RedGate SQL Script Manager

Script: GlennBerry_TopResourceWaits

 

Name: Who is running what

Author: Tim Ford

Description: see RedGate SQL Script Manager

Script: TimFord_WhoIsRunningWhat

 

Name: Index fragmentation

Author: Tim Ford

Description: see RedGate SQL Script Manager

Script: TimFord_IndexFragmentation

 

Name: Missing index

Author: Dennes Torres

Description: see the script

Script: DennesTorres_MissingIndex

 

Name: Memory use

Author: Dennes Torres

Description: see the script

Script: DennesTorres_MemoryUse

Advertisements