November 16, 2010 at 12:30 am
Comments posted to this topic are about the item Get SQLServer Name and Uptime SPROC
November 16, 2010 at 5:11 am
SELECT TOP 1 login_time FROM master..sysprocesses (NOLOCK)
ORDER BY login_time
Since I've noticed that on some of our SQL servers spid 1 is not the longest running process!
How, I don't know! Maybe someone more knowledgeable can explain
NigelHow to post questions
November 16, 2010 at 7:30 am
Thanks for the update, Nigel. I will update the SPROC code.
Hall of Fame
November 16, 2010 at 3:08 pm
There are many ways to skin a cat:
This is my way:
select crdate,[Name] from sys.sysdatabases where name = 'tempdb'
Why does this work?
Well... every time you MSSQL Starts, it recreates the TEMPDB.
November 17, 2010 at 2:03 am
MiguelSQL (11/16/2010)There are many ways to skin a cat:
Indeed there are 🙂
This is my way:select crdate,[Name] from sys.sysdatabases where name = 'tempdb'Why does this work?Well... every time you MSSQL Starts, it recreates the TEMPDB.🙂Miguel
And it looks like like the tempdb is created even sooner than the first process (at least it is on the couple of instances I tried). YMMV
May 18, 2016 at 6:57 am
Thanks for the script Chris.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply