Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

Can I determine SQL install date using a TSQL script? Expand / Collapse
Author
Message
Posted Tuesday, November 25, 2008 10:36 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, October 26, 2009 1:58 AM
Points: 36, Visits: 132
Is it possible to determine the date SQL was installed using a TSQL script command?
Post #608856
Posted Sunday, November 30, 2008 6:57 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, October 26, 2009 1:58 AM
Points: 36, Visits: 132
I would like to know when several SQL Servers were created.

Could it be the date the earliest non system database was created?

select @@servername + ' '+ convert(varchar(20),crdate,111)  + ' '+ [Name] from sys.sysdatabases order by crdate desc

Post #610987
Posted Sunday, November 30, 2008 7:50 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Yesterday @ 8:58 PM
Points: 36,794, Visits: 31,253
Just curious... why do you need to do this?

--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #610993
Posted Sunday, November 30, 2008 9:34 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, October 26, 2009 1:58 AM
Points: 36, Visits: 132
Mainly because I am decommissioning SQL servers and building some SQL servers concurrently. I want to let people requesting them know that the life of the servers is too short, if in fact, it is. As I am contracting I do not know, for certain, when they were made.
Post #611009
Posted Sunday, November 30, 2008 10:06 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Yesterday @ 5:13 PM
Points: 33,100, Visits: 15,210
The script above should help, but why would that date impact whether or not something was being decommissioned? I'd think it was being used or not.






Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #611015
Posted Sunday, November 30, 2008 10:40 PM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Thursday, June 5, 2014 10:54 AM
Points: 9,902, Visits: 9,480
Try looking at the installation folder's creation dates

-- RBarryYoung, (302)375-0451 blog: MovingSQL.com, Twitter: @RBarryYoung
Proactive Performance Solutions, Inc.
"Performance is our middle name."
Post #611033
Posted Sunday, November 30, 2008 10:51 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, October 26, 2009 1:58 AM
Points: 36, Visits: 132
I think that the ability create virtual servers can mean less thought is going into their design. Therefore they need to be removed. I want to know how long they last. I think we need to plan them better so they last longer.

By the way finding out the installation date via T-SQL means I can run the command across multiple servers. Then there is no need to go to windows explorer for folder date in each instance.
Post #611034
Posted Sunday, November 30, 2008 10:54 PM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Thursday, June 5, 2014 10:54 AM
Points: 9,902, Visits: 9,480
rbarryyoung (11/30/2008)
Try looking at the installation folder's creation dates

This can be done from SQL server.


-- RBarryYoung, (302)375-0451 blog: MovingSQL.com, Twitter: @RBarryYoung
Proactive Performance Solutions, Inc.
"Performance is our middle name."
Post #611036
Posted Sunday, November 30, 2008 10:59 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, October 26, 2009 1:58 AM
Points: 36, Visits: 132
Is that using DIR ? How would you get that to work over different install paths?
Post #611038
Posted Monday, December 1, 2008 5:19 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Yesterday @ 8:58 PM
Points: 36,794, Visits: 31,253
Ummmm... you may want to double check the methods above if these are, in fact, virtual machines... even the installation folders may contain nothing but an image of what the "mother" VM machine has on it... could be real deceiving. Not sure where to look on VM machines, but can find out at work, today.

--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #611207
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse