November 21, 2011 at 12:22 am
Hi,
Could you please let me know the T-SQL script or DMV or dictionary table which helps me in finding the restart history of SQL Server instance or sql server services.
Thanks,
Nagarjun.
November 21, 2011 at 12:29 am
It's not going to be in any table or DMV.
You can use the error logs for the most recent. Unless cycled, a new error log is started each time SQL restarts. Same with the default trace files (though that gives a max of 5)
Otherwise it's going to be a case of looking through the windows application event log for the SQL startup messages.
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
November 21, 2011 at 1:07 am
Thanks for the reply!
If i want to check all 6 log files (at a time) for all server restart msgs?
Thanks,
Nagarjun.
November 21, 2011 at 4:24 am
I'd suggest using Gail's second choice there. Most shops I've worked in set the logs to cycle. Of course, maybe that's true because I'm the one that sets them to do that.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply