Errorlog file

  • I'm seeing a ERRORLOG file in my mssql7\log folder. The size of the errorlog keeps increasing and it eats up my hard-disk.

    I have manually removed them as and when needed.

    How do I prevent this file from being generated automatically for every error?

    Cheers

    Regards

    Parasu Raman


    Regards
    Parasu Raman

  • Well, first off this is actualy the SQL Server Logs, and contrary to the name not only errors are stored there. If they are filling up fast then make sure in SQL Server properties for the server in question (I am referring under Enterprise Manager) that in Startup Parameters (the top button at the bottom of the properties dialog) that you have not defined too many trace settings. The following items will be in the by default:

    -dX:\PLUS\PATH\TO\MASTERDB

    -lX:\PLUS\PATH\TO\MASTERLOG

    -eX:\PLUS\PATH\TO\SQLLOGS\AND\LOGFIRSTNAME

    If you really want you can stop having a SQL Log by removing the -e item. Then just restart that SQL Server. However keep in mind you will loose any information you were getting from these under SQL Server Logs.

  • I run a job daily that calls sp_cycle_errorlog - that way I have one log per day to keep the size manageable. More of an issue for easy browsing than anything else.

    Andy

  • Thanx Antares686 and Andy,

    1. If I stop from logging, what are going to be the is going to impact other than loosing the existing log

    2. Is this file being used in the SQL Server log which is shown in the Enterprise Manager?

    3. Andy, I'd like to know what are u are doing in the batch file which u've saying. I'm planning to automate my entire sql server maintenance things. Kindly help me and also, tell me some links or doc which would help me what to do for automating the maintenance (backups, cleaning etc).

    Cheers

    Regards

    Parasu Raman


    Regards
    Parasu Raman

  • Honestly I dont think you want to stop logging. Turn off trace flags to reduce the volume maybe, but its a valuable resource - I'd encourage you to leave it running. If disk space is that tight you'll soon have problems anyway!

    Yes.

    I use the maintenance wizard mostly, it does almost everything I need. Plus the job I mentioned earlier. Just create a TSQL job that executes the cycle error stored proc.

    Andy

  • The log files are there for your own protection, so it's generally not a good idea to turn logging off. With respect to dealing with the log files, you may want to take a look at the following article by Brian Knight:

    http://www.sqlservercentral.com/columnists/bknight/readpurgelog.asp

    K. Brian Kelley

    bkelley@sqlservercentral.com

    http://www.sqlservercentral.com/columnists/bkelley/

    K. Brian Kelley
    @kbriankelley

  • I agree with all, I mean even if you can turn it off you are creating a larger issue for yourself, especially when that occasionally problem occurrs and you don't have any details from the server what was going on.

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply