Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

SQL shutdown

Posted on 2006-07-06
17
Medium Priority
?
541 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 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Viewers will learn how the fundamental information of how to create a table.

886 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