Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

SQL shutdown

Posted on 2006-07-06
17
Medium Priority
?
540 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 5
  • 4
  • +1
17 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 1000 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 75

Assisted Solution

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

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 143

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
 
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 43

Expert Comment

by:Eugene Z
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 143

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 143

Expert Comment

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

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Ready to get certified? Check out some courses that help you prepare for third-party exams.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how the fundamental information of how to create a table.

718 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