Solved

SQL shutdown

Posted on 2006-07-06
17
538 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 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
Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

Suggested Solutions

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Viewers will learn how the fundamental information of how to create a table.
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.

738 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