T-SQL to find the SQL Server Installation date | SansSQL

Tuesday, May 20, 2014

T-SQL to find the SQL Server Installation date

Here is an handy T-SQL to find the installation date of SQL Server.

DECLARE @date AS VARCHAR(50), @ServerName AS VARCHAR(100)

SELECT @ServerName = CAST(SERVERPROPERTY('SERVERNAME') AS VARCHAR)

SELECT @date = convert(varchar(50),create_date,107) 
FROM sys.server_principals
WHERE name='NT AUTHORITY\SYSTEM'

PRINT 'This SQL Server Instance "' + @ServerName + '" was insalled on '+ @date 

4 comments:

Rajesh said...

Are you Ready to learn java???

Java Training in Chennai

Anu Sri said...

Nice post. This is very useful. Thanks for sharing.

web designing course chennai

oracle R12 said...

Hi,
very simple with useful information thanks for posting. Erptree is best training center for oracle and its modules.for more info just visit our website .
Thank you.
Oracle EBS Online training

Brave Technologies said...

Thank you for Sharing. We are leading erp software solution providers in chennai. For more details call +91 9677025199. erp in Chennai

Post a Comment