Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Archives: February 2012

A Script A Day - Day 8 - Non Clustered Index Information

Today's script comes to you from London where I am at my head office for my appraisal!  Lets hope it goes well ;)


The below script will provide Index information for all non clustered indexes in a database including the number of records, reserved and used space.  All you need…

Read more

0 comments, 308 reads

Posted in SQL Server 365 on 8 February 2012

A Script A Day - Day 7 - Memory Queries

Today's script is a collection of a few memory queries I've collected from various sources over the years.  These queries are by no means comprehensive but are ones I have certainly used the most.


/*
      -----------------------------------------------------------------
      Memory Queries
      -----------------------------------------------------------------
     
      For more SQL resources, check out SQLServer365.blogspot.com

      -----------------------------------------------------------------

Read more

0 comments, 1,106 reads

Posted in SQL Server 365 on 7 February 2012

A Script A Day - Day 6 - Drop and Create Database Snapshots

Today's Script will drop all database snapshots and create a database snapshot for all online read writeable user databases. I create this script for use in a database mirroring partnership so that the snapshots could be used on the mirroring partner so to impact the mirroring principal less. As such…

Read more

0 comments, 1,272 reads

Posted in SQL Server 365 on 6 February 2012

A Script A Day - Day 5 - Database Owner Permissions

Today's script will list all principals with membership in the db_owner fixed database role.


/*
      -----------------------------------------------------------------
      Database Owner Permissions
      -----------------------------------------------------------------
     
      For more SQL resources, check out SQLServer365.blogspot.com

      -----------------------------------------------------------------

      You may alter this code for your own purposes.
      You may republish altered code as long…

Read more

0 comments, 584 reads

Posted in SQL Server 365 on 5 February 2012

A Script A Day - Day 4 - Estimated Time Left

Today's script allows you to keep track of how long left a statement has before it completes.  I find this useful for example when restoring databases.  All you need to do is simply change the der.command  = as required.



/*
      -----------------------------------------------------------------
      Estimated Time to Complete
      -----------------------------------------------------------------
     
     …

Read more

1 comments, 293 reads

Posted in SQL Server 365 on 4 February 2012

A Script A Day - Day 3 - Live Change Data Edit Template

Today's script is a template I use for the occasions when a data edit is required to be run against a live environment.  It has 8 steps to give you as DBA's control over what is being run and the safety of recording results before and after the modifications.  The…

Read more

0 comments, 318 reads

Posted in SQL Server 365 on 3 February 2012

A Script A Day - Day 2 - Database Mail Troubleshooting

Today's script is a collection of simple queries I have saved for a time when I need to troubleshoot database mail problems.



/*
      -------------------------------------
      Summary:                      Database Mail Troubleshooting
      SQL Server Versions:          2005 onwards
      Written by:                   Chris McGowan
      -------------------------------------
     
      For more SQL resources,…

Read more

2 comments, 235 reads

Posted in SQL Server 365 on 2 February 2012

A Script A Day - Day 1 - Database File To Volume Mapping

Today is the 1st February 2012 and as promised here is the first of script in my "A Script A Day" series.  There will be 29 scripts (yes this year is a leap year:) which I will also roll-up into a single document and make available to you some time in…

Read more

1 comments, 362 reads

Posted in SQL Server 365 on 1 February 2012

Newer posts