[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 542
  • Last Modified:

SQL shutdown

How can i tell if sql shutdown last night.....i cannot remember the command of up time of sql
0
TRACEYMARY
Asked:
TRACEYMARY
  • 7
  • 5
  • 4
  • +1
2 Solutions
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
check out the ERRORLOG file, in the beginning it shows you when it started
0
 
TRACEYMARYAuthor Commented:
im on sql server logs i could not see anything in there.....i thought there was a command in query i could run..

Im getting all kinds of commands in sp_who2 like
sp_sqlagent_get_perf_counter
set noexec off set parse only off
set transaction isolation level read committed ....never seen these before
0
 
TRACEYMARYAuthor Commented:
checkpoint is 1783110 cpu
0
Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

 
Aneesh RetnakaranDatabase AdministratorCommented:
SELECT crdate from master..sysdatabases where name ='tempdb'
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
In the Enterprise manager -> management -> SQL Server logs.
the log named "Current - <datetime>" has the <datetime> of when the server last started.

not sure if there is a short command that shows this info
0
 
Aneesh RetnakaranDatabase AdministratorCommented:
remember ' tempdb' database will be re-created every time SQL Server starts.
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
interesting query, aneesh.
here some other:
select min(login_time) from master.dbo.sysprocesses
0
 
TRACEYMARYAuthor Commented:
so looks like did not shutdown then 2006-03-15 17:53:37.277
current log shows   current 07/06/2006 ...
0
 
Aneesh RetnakaranDatabase AdministratorCommented:
Yes Angel, I think we  are almost there .. right ?
0
 
TRACEYMARYAuthor Commented:
2006-03-15 17:54:14.770 for the cdate on temp
0
 
Aneesh RetnakaranDatabase AdministratorCommented:
So, your server was restarted on 2006-03-15 17:54
0
 
Eugene ZCommented:
you can find the info  in the server event viewer (Application Log)
Example:
search for:
================================
Event Type:      Information
Event Source:      MSSQLSERVER
Event Category:      (2)
Event ID:      17055
Date:            7/6/2006
Time:            2:08:18 PM
User:            N/A
Computer:      yourserver
Description:
17148 :
SQL Server is terminating due to 'stop' request from Service Control Manager.
 
Data:
0
 
TRACEYMARYAuthor Commented:
yeah ....network guy was looking at events on the server and said i think it shutdown so i wanted to check
but i have all the other things above going on ..
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
>current log shows   current 07/06/2006 ...
Actually, that information is indeed not accurate, as by
DBCC ERRORLOG

the errorlog gets rolled (to avoid it grows too big)

the queries shown by aneeshattingal and me will be accurate, the difference of +- 1 second is the time needed to create the tempdb
0
 
TRACEYMARYAuthor Commented:
That makes sense the tempdb gets created and the date...so i no know that it did not shutdown..
0
 
TRACEYMARYAuthor Commented:
Does the checkpoint of 1784700
seem high
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
>Does the checkpoint of 1784700
no, looks fine
0

Featured Post

Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

  • 7
  • 5
  • 4
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now