• Eirikur Eiriksson (5/7/2014)


    george sibbald (5/7/2014)


    river1 (5/7/2014)


    Hi,

    I would like to know in with date did a SQL Server 2005 instance was installed on a server.

    Can I know This using t-sql?

    from glenn Berrys diagnostic queries

    -- When was SQL Server installed

    SELECT @@SERVERNAME AS [Server Name], create_date AS [SQL Server Install Date]

    FROM sys.server_principals WITH (NOLOCK)

    WHERE name = N'NT AUTHORITY\SYSTEM'

    OR name = N'NT AUTHORITY\NETWORK SERVICE' OPTION (RECOMPILE);

    Be very careful with NOLOCK and READ UNCOMMITED, apart from possibly bringing back incorrect data these two options will not be supported in future versions of sql server.

    😎

    NOLOCK is deprecated but READ UNCOMMITED is not.

    http://technet.microsoft.com/en-us/library/ms187373.aspx

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/