Solved

sql error log file is very big in SQL 2008

Posted on 2014-01-27
10
935 Views
Last Modified: 2014-01-31
SQL error log file is rapidly growing and it has reached in size 43 GB so how can I delete it safely? I guess a transaction log file of a database has caused so when I look at the sql log file thera are lots of messages " Transaction log for the database XXX is full" so I guess this is the reason why error log file was huge..

the question is that how can I delete old error log file safely or another way?please attached file
other question. the transaction log of this database is alwasy rapidly growing and I am shrinking this log file everyday so How can I bring under control this transaction log of this database?
SQLErrorLog.JPG
0
Comment
Question by:TRocex
[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
10 Comments
 
LVL 18

Expert Comment

by:x-men
ID: 39811681
delete (or move) the old files at :...\MSSQL\Log\ERRORLOG##
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 39811697
do you ever recycle the error log file, at least regularly (i have a job scheduled monthly to do this):
Exec Sp_Cycle_Errorlog


in regards to the "errors" about transaction log file file: you need to implement & maintain regular transaction logbackups for all your databases that are in full recovery mode.
failing to do so will make the files will just grow (filling your disk), and if disk is full OR the log files are not set to auto-grow, filling the error log with the message you get.
0
 
LVL 15

Expert Comment

by:Aaron Shilo
ID: 39811747
hi

refer to this in order to monitor and change time retention of log.

http://archive.msdn.microsoft.com/SQLExamples/Wiki/View.aspx?title=ErrorLogMon&referringTitle=AutomatedDBA

Aaron.
0
Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

 

Author Comment

by:TRocex
ID: 39817213
thanks I have deleted the SQL Error log file that is very large in size as I said the reason that sql error log file is very big in size is to be the transaction log file of the database XXX is always growing so the backups and the related this transaction log backups are being taken regulary but although this, I dont know why the transaction log file is growing in this way
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 39817251
check the output of this:
DBCC OPENTRAN

do you have replication in place for this db?
0
 

Author Comment

by:TRocex
ID: 39817463
I have run this command and it says no active open transaction..when i check the transaction log file every morning, it reaches 13GB in size..when I shrink this log file but other day is the same situation..there is no replication or other thing like mirrror
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 39817596
>.when i check the transaction log file every morning, it reaches 13GB in size..when I shrink this log file but other day is the same situation..

then, first, stop shrinking the transaction log file every morning, you will just waste IO.

instead, try to increase the frequency of the transaction log backups. what is the current t-log backups ...
0
 

Author Comment

by:TRocex
ID: 39817902
the latest backup to be taken is at 8:07 am and the size of the current t-log backup is 8 gb and I think in the morning it will be 13 gb in size again then the result of this will be the errors of disk full
0
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 300 total points
ID: 39818044
as I wrote: take transaction log backup more often (like once per hour)

if you get "disk full", you have to get some more disk, or backup to tape, or ....

something else you need to check is "why" you get that much transaction log.
this may be some rogue sql (doing full table updates instead of just updating few rows...)
0
 
LVL 75

Assisted Solution

by:Anthony Perkins
Anthony Perkins earned 200 total points
ID: 39819575
TRocex,

SQL Error Log has nothing whatsoever to do with your Transaction Log, so you need to decide what is your specific problem.

thanks I have deleted the SQL Error log file
If that was your Transaction Log you are indeed playing with fire and you may want to make sure your resume is updated.

If you are unable to do more frequent Transaction log backups then just change your Recovery Model to Simple.  You will lose the possibility of a point-in-time restore, but with all the shrinking you are doing it is not likely that is even an option and you will have to rely on the last time you did a Full backup.
0

Featured Post

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

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

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
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 to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

734 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