Solved

SQL shutdown

Posted on 2006-07-06
17
534 Views
Last Modified: 2008-01-09
How can i tell if sql shutdown last night.....i cannot remember the command of up time of sql
0
Comment
Question by:TRACEYMARY
  • 7
  • 5
  • 4
  • +1
17 Comments
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 250 total points
ID: 17052681
check out the ERRORLOG file, in the beginning it shows you when it started
0
 
LVL 7

Author Comment

by:TRACEYMARY
ID: 17052705
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
 
LVL 7

Author Comment

by:TRACEYMARY
ID: 17052726
checkpoint is 1783110 cpu
0
 
LVL 75

Assisted Solution

by:Aneesh Retnakaran
Aneesh Retnakaran earned 250 total points
ID: 17052750
SELECT crdate from master..sysdatabases where name ='tempdb'
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 17052753
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
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 17052769
remember ' tempdb' database will be re-created every time SQL Server starts.
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 17052774
interesting query, aneesh.
here some other:
select min(login_time) from master.dbo.sysprocesses
0
 
LVL 7

Author Comment

by:TRACEYMARY
ID: 17052800
so looks like did not shutdown then 2006-03-15 17:53:37.277
current log shows   current 07/06/2006 ...
0
Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 17052801
Yes Angel, I think we  are almost there .. right ?
0
 
LVL 7

Author Comment

by:TRACEYMARY
ID: 17052803
2006-03-15 17:54:14.770 for the cdate on temp
0
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 17052817
So, your server was restarted on 2006-03-15 17:54
0
 
LVL 42

Expert Comment

by:EugeneZ
ID: 17052824
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
 
LVL 7

Author Comment

by:TRACEYMARY
ID: 17052830
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
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 17052831
>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
 
LVL 7

Author Comment

by:TRACEYMARY
ID: 17052867
That makes sense the tempdb gets created and the date...so i no know that it did not shutdown..
0
 
LVL 7

Author Comment

by:TRACEYMARY
ID: 17053027
Does the checkpoint of 1784700
seem high
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 17054113
>Does the checkpoint of 1784700
no, looks fine
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now