About Me - Who is DR DBA?

Hello. My name is Rudy Panigas and I am a Production Senior Microsoft SQL Server Database Administrator (DBA) with over 14 years of experience. Have published articles with SQL Central, am a leader for the my local PASS chapter in Toronto (TORPASS) and love to automate anything SQL including disaster recovery. I created this blog to share my views, knowledge and to discuss Microsoft SQL server in order to help out others in this field. Please test these scripts before using. I do not warranty and do not take any responsibility for it, its misuse or output it creates. You can reach me at this email address: sqlsurgeon@outlook.com

Friday, December 20, 2013

Interesting SQL Server Metric - Installation Date


Do you collect metrics about your SQL Server environment? Wait, you don't? Here are some metrics you should collect.
  • How many SQL Servers are installed?
  • How many SQL Servers are installed?
  • How many SQL Servers are used as production
  • How many SQL Servers are used as development?
  • How many SQL Servers are used as QA and UAT?
  • How many SQL Servers are used as disaster recovery?
  • How many SQL Servers are at your location, cloud, other sites, etc.?
  • What applications are using each SQL Server(s)?
  • How many database do you have?
  • How big are the databases and total size of disk use?
Why collect metrics? Well there are many reasons, some are to help manage the SQL Servers and other are to show management what is happening. With management in mind, you should collect the date that SQL Server was installed. With installation date you can show many interesting facts to management.

Here is a list of just what you can show to management.

- How many SQL Servers you have
- How many are where installed each month, quarter and/or year
- How many SQL servers need to be upgrade (if you also collect versions/patch levels)
- What is the growth rate over any period

You can start to see that there is metrics here that management would love to see.

Below is a script that will show the server name, version and installation date.

      , @@VERSION as 'SQL Server Version'
      , createdate as 'Date Installed' FROM sys.syslogins
WHERE [name] = 'NT AUTHORITY\SYSTEM' AND [dbname] = 'master';

Hope you find this script useful and have a happy holiday and a Happy New Year.


No comments:

Post a Comment

Note: Only a member of this blog may post a comment.