July 9, 2008 at 1:13 am
Hi,
i have seen that error log files in my
C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG
is occupying almost 5gb can i delete these files without causing any damage to the user data or functioning of sql server express
please recommend
July 9, 2008 at 1:21 am
You can, but you shouldn't need to. SQL only keeps a certain number of log files (default I think is 6).
Every time the service is restarted or the log is cycled the oldest log file will be discarded and a new one created.
5 GB? Even my biggest, most active server only has 75 MB worth of error logs dating back almost 3 months.
Which files are the largest?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 9, 2008 at 1:41 am
Hi,
the file name are ERRORLOG AND ERRORLOG.1 are the biggest first one is 3gb and second one is 2gb
please recommend
July 9, 2008 at 1:45 am
Those are SQL's latest 2 error logs. How often do you restart the SQL Service there?
Do you ever check SQL's error logs? I can't think of any reason they should get that big, uless you're having very frequent errors.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 9, 2008 at 2:00 am
Hi,
Those are SQL's latest 2 error logs. How often do you restart the SQL Service there?
Not very often only when sql server reports some error or stops responding
Do you ever check SQL's error logs? I can't think of any reason they should get that big, uless you're having very frequent errors.
its been very long since i checked the sql server error log, but in recent days i found that hard disk was consuming at a high rate but not considerable space was shown used by the helm COntrol panel by users, so i think sql server log is using this space, now with the log size so big its impossible to open or analyse what do you recommend what should i do.
thanx
July 9, 2008 at 3:08 am
[font="Verdana"]You can use sp_cycle_errorlog procedure in master database to recycle the errorlog, so that a new errorlog file name ERRORLOG will be generated and it will be used. Once this done, you can delete the old files. Before delete make sure which is filling up the errorlog and rectify it.[/font]
Regards..Vidhya Sagar
SQL-Articles
July 9, 2008 at 4:31 am
Hi,
thanx for reply
can you tell me the whole command sp_cycle_errorlog so that i can use it, as i am very new to sql server and what do you recommedn how can i open a 3 GB file, i think it will not open in notepad or any other editor.
is it possible that i stop sql server and then delete the error log file and then restart it
please recommend
July 9, 2008 at 4:48 am
That is the entire command. EXEC sp_cycle_errorlog
You can get full info on it in Books online.
I would suggest you cycle the error log, then watch the new log file to see what's getting written into it.
Maybe set up a job (SQL Agent) to cycle the error log every month if you don't restart SQL often
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply