SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Scripts by Doran Mackay

SQLServerCentral.com profile

   Items 1 to 9 of 9   
 

Faster Backuphistory delete

A faster backup history cleanup proc than the built in MSDB proc   Read more...
By Doran Mackay 2017/05/10 | Source: SQLServerCentral.com | Category: backuphistory
Rating: (not yet rated) |  Discuss |   Briefcase | 246 reads

Warm the cache with a table and its indexes

Warm the cache with a particular table by reading it into memory.  Read more...
By Doran Mackay 2016/11/25 | Source: SQLServerCentral.com
Rating: |  Discuss |   Briefcase | 476 reads

Design : Find table with Identities with missing unique constraints

In an OLTP DB, other than an autogenerated Identity , there should be something else on the table which makes the non-identity data unique, as in, unique if you had to drop the ID column.  Read more...
By Doran Mackay 2016/02/03 | Source: SQLServerCentral.com | Category: data quality
Rating: |  Discuss |   Briefcase | 445 reads

Index stats with key,included columns, size - all you can eat

Get total access,updates, rowlocks,pagelocks, stats date,rowcount for all tables or specific table by partition  Read more...
By Doran Mackay 2016/02/04 | Source: SQLServerCentral.com | Category: indexing
Rating: |  Discuss |   Briefcase | 823 reads

Design : Find and script out Missing Foreign Keys

Find missing Foreign Keys by name, only reference single column primary keys which are on top of an identity,also find where column names reference table with column name ='ID'.  Read more...
By Doran Mackay 2016/02/01 | Source: SQLServerCentral.com | Category: integrity
Rating: |  Discuss |   Briefcase | 978 reads

Design Errors : PK's with multiple columns on table with identity

Find Tables with identity, which should have PK with 1 column but have a PK with multiple columns or where the unique identity is contained in other indexes.  Read more...
By Doran Mackay 2015/11/24 | Source: SQLServerCentral.com | Category: database design
Rating: (not yet rated) |  Discuss |   Briefcase | 116 reads

Estimate compression for all tables and indexes with both Row and Page

This will log output of estimate compression for both PAGE and ROW for all tables and indexes  Read more...
By Doran Mackay 2015/12/10 | Source: SQLServerCentral.com | Category: compression
Rating: (not yet rated) |  Discuss |   Briefcase | 677 reads

View for Ola Hallengren CommandLog

Add 3 columns, duration in seconds,Pagecount and fragmentation. For people like me who don't enjoy querying XML.  Read more...
By Doran Mackay 2016/10/31 | Source: SQLServerCentral.com
Rating: |  Discuss |   Briefcase | 1,694 reads

Design Errors : PK's with multiple columns on table with identity

Find Tables with identity, which should have PK with 1 column but have a PK which is clustered but has multiple columns.  Read more...
By Doran Mackay 2015/11/24 | Source: SQLServerCentral.com | Category: database design
Rating: |  Discuss |   Briefcase | 912 reads
   Items 1 to 9 of 9