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


Instance installation date


Instance installation date

Author
Message
river1
river1
SSCommitted
SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)

Group: General Forum Members
Points: 1822 Visits: 1366
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?

Other question that I have is if I can know if there was a SQL Server installed on the same server and in wich date it was unistalled.

Thank you
george sibbald
george sibbald
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10668 Visits: 13687
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);

---------------------------------------------------------------------
river1
river1
SSCommitted
SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)

Group: General Forum Members
Points: 1822 Visits: 1366
Thank you.

What about the restores that were made.

Can I having only a database know how many restores were made to it?

I cannot use the msdb because I want to see what restires were made before the SQL Server instance was installed.
george sibbald
george sibbald
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10668 Visits: 13687
without the msdb you cannot retrieve that information.

If you still have the old msdb as a backup or OS files you could restore or attach it as a user database under a different name and then extract the information out of restorehistory in the normal way.

---------------------------------------------------------------------
river1
river1
SSCommitted
SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)

Group: General Forum Members
Points: 1822 Visits: 1366
Maybe they have the old OS files. I will check with them.

Thanks
Eirikur Eiriksson
Eirikur Eiriksson
SSCoach
SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)

Group: General Forum Members
Points: 15700 Visits: 18626
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.
Cool
george sibbald
george sibbald
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10668 Visits: 13687
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.
Cool


I'll tell Glenn :-)
Wasn't expecting the server name or create date to change.

---------------------------------------------------------------------
Sean Lange
Sean Lange
One Orange Chip
One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)

Group: General Forum Members
Points: 26852 Visits: 17557
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.
Cool


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.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
Eirikur Eiriksson
Eirikur Eiriksson
SSCoach
SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)

Group: General Forum Members
Points: 15700 Visits: 18626
My memory playing tricks on me:-P
Thanks Sean!
Cool
Sean Lange
Sean Lange
One Orange Chip
One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)

Group: General Forum Members
Points: 26852 Visits: 17557
Eirikur Eiriksson (5/7/2014)
My memory playing tricks on me:-P
Thanks Sean!
Cool


I lost my memory long ago...thank {insert your supreme being here} for BOL. BigGrin

_______________________________________________________________

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.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search