May 2, 2008 at 9:12 am
Hi,
I need a programmatic way to find out when the instatnce last started up.
Thanks
May 2, 2008 at 9:43 am
I don't know if there's a direct way to do that (might be), but you could log that with a start-up proc.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
May 2, 2008 at 9:46 am
SELECT min(login_time) FROM Master..Sysprocesses
MS SQL has a process that is always running - so the minimum login time for any process is when the service started.
May 2, 2008 at 9:56 am
Or on SQL 2005, SELECT min(login_time) FROM sys.dm_exec_sessions
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
May 2, 2008 at 10:12 am
Yup - thanks Gail - better to use the new schema.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply