Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / DB Engine / SQL Server / July 2008

Tip: Looking for answers? Try searching our database.

Trouble with SQL2005 sp_cycle_errorlog

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chris Wood - 03 Jul 2008 17:57 GMT
Hi,

We reboot our servers only once a month for patching and so we cycle the SQL
errorlogs twice a week to keep them to a reasonable size. Every now and
again a problem happens with our SQL Agent job that cycles the errorlog.
Last night the job reported as run successfull but a new errorlog file was
not produced. The older errorlogs have been renamed but errorlog was not
renamed as errorlog.1

If I use SSMS to view the current errorlog I can see the attempting to cycle
error log message from last night and all the entries from before that time.
I have attempted to see if I could force the cycling by running the job
again and now I do not have either an errorlog.1 or errorlog.2 file. At the
same time if I use notepad to view the errorlog I have a real mix of the
latest entries along with the ones that followed the cycling last night
followed by all the entries for the errorlog that I could see by using SSMS.

I know that the only way out of this mess is to get SQL stopped and
re-started but why is SQL2005 doing this? The previous errorlog was not
massive so it should have been able to handle the complete cycling. We are
running with 10 archives so we can have a months worth of logs on disk. This
server has build 3159 on it, soon to go to build 3239.

Thanks

Chris
Linchi Shea - 03 Jul 2008 22:16 GMT
Most likely that's because your errorlog.1 file was locked by some other
process. You can confirm this by opening errorlog.1 with Word, and then issue
sp_cycle_errorlog.

Linchi

> Hi,
>
[quoted text clipped - 22 lines]
>
> Chris
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.