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

When Did I Install SQL Server?

While getting prepared for an upcoming presentation, I remembered that I installed the November CTP trial on the machine that I use for presentations. And because of that, I began to panic... I thought "man... this is going to be bad if my 180 day trial expires the morning of the presentation". So, I had to figure out when I installed it. Of course one could go into Add/Remove Programs and look for Microsoft SQL Server, but I wanted to do it the hard way... I wanted to query it. :) So, that is what I did.. Here is a small snippet that you can use if you are ever need to know when you installed the instance.

SELECT  LoginName, CreateDate AS InstalledOn

FROM    sys.syslogins

where   LoginName = 'NT AUTHORITY\SYSTEM' 

What this is doing is looking in the syslogins table for the login account that was created when you installed SQL Server. If you were the one who installed it, you may remember seeing this account during the install process. At any rate, fortunately my trial doesn't expire until the middle of September. Just after my presentation. Yeahhhhh... I was planning on reformatting this piece of junk anyway.

oh.. btw.. if you have had to restore your master db... this may not be the best way to determine the date installed. Then you'll just have to go back to the Add/Remove Programs.



No comments.

Leave a Comment

Please register or log in to leave a comment.