Friday, 18 March 2011

Audit Scripts : When were SQL Server & Windows Installed?

What version of SQL Server are we running ?

SELECT @@version

Microsoft SQL Server 2008 (SP1) - 10.0.2531.0 (X64) Mar 29 2009 10:11:52 Copyright (c) 1988-2008 Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 6.0 (Build 6002: Service Pack 2) 
 
When was SQL Server installed ?

SELECT  createdate as InstallDate 
FROM    sys.syslogins 
where   sid = 0x010100000000000512000000 

When was Windows installed ?

Open a command prompt, and type -

systeminfo | find /i "install date"

Links :
How to check when SQL Server was installed
How to check when Windows was installed

No comments: