Solved

recommended procedure for dbcc errorlog / sp_cycle_errorlog

Posted on 2006-11-16
5
1,646 Views
Last Modified: 2012-08-14
sp_cycle_errorlog is generally better to use than dbcc errorlog, correct?

and, what is the procedure when switching the log over like that?  is it possible to keep the old error log at that point (back it up or archive it)?   just wanted to know what people generally do, procedurally.

0
Comment
Question by:nespa
  • 4
5 Comments
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 17962016
nespa,
> sp_cycle_errorlog is generally better to use than dbcc errorlog, correct?

sp_cycle_errorlog will indeed call dbcc ErrorLog, so there is no difference at all
0
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 17962020
Every time SQL Server is started, the current error log is renamed to errorlog.1; errorlog.1 becomes errorlog.2, errorlog.2 becomes errorlog.3, and so on. sp_cycle_errorlog enables you to cycle the error log files without stopping and starting the server.

0
 
LVL 1

Author Comment

by:nespa
ID: 17962127
i'm away from EM at the moment & am just trying to understand this -- is it possible to view errorlog.2 & errorlog.3?    they're part of the database itself (and contribute to filesize), correct?    if it's not possible to view them now, can i replace errorlog.1 with errorlog.2 at a later time?  

that is, i'm trying to understand the procedure for archiving/viewing these logs.   i got the impression that you don't simply cycle the error log & then delete it - it's kept for a later date; just trying to confirm this.   thanks!
0
 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 500 total points
ID: 17962142
nespa,
> is it possible to view errorlog.2 & errorlog.3?

Use 'sp_readerrorlog' for this pupose

sp_readerrorlog 2  --will read the second log
0
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 17962146
In order to recycle it , right click on the SQLServerLog from EM, and set the option there
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

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

Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
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 …
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

895 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

17 Experts available now in Live!

Get 1:1 Help Now