Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

SQL Server log file full

Posted on 2009-05-17
16
Medium Priority
?
1,168 Views
Last Modified: 2012-05-07
Hello,
I have a message that says  Database zbc log file is full. what should i do now.  help needed asap
0
Comment
Question by:aatishpatel
[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
  • 8
  • 4
  • 3
  • +1
16 Comments
 
LVL 60

Expert Comment

by:chapmandew
ID: 24408357
0
 
LVL 60

Expert Comment

by:chapmandew
ID: 24408372
you can do a back or truncate your log...you'll probably need to truncate though, it sounds.  

first, do this

backup log yourdatabasename with truncate_only

now do this

dbcc shrinkfile('yourdatabasename_log', 0)

now, set your database recovery mode to simple so that you don't need to worry about this anymore...you're obviously not needing to recover to a point in time.
HTH,
Tim
0
 

Author Comment

by:aatishpatel
ID: 24408394
but for safety purpose how do i backup the .lfd files. and if i shrink it the data will be loat right?
0
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 60

Expert Comment

by:chapmandew
ID: 24408399
if you truncate the log w/o backing it up, it will be lost (inactive transctions).  You can modify your maintenance plan to include log backups, or just simply set your recovery model to simple...which is probably the best option for you.
0
 

Author Comment

by:aatishpatel
ID: 24408636
that's the error message that the log is full please help


Step ID            13
Server            IHS-MAIN-DB-13
Job Name            P58 - Daily Maintenance
Step Name            poststep: ng_reconfigure to reset computer
Duration            00:00:00
Sql Severity            17
Sql Message ID            9002
Operator Emailed            
Operator Net sent            
Operator Paged            
Retries Attempted            0

Message
Executed as user: IHS\SqlAdmin. The transaction log for database 'P58' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases [SQLSTATE 42000] (Error 9002)Unable to open Step output file.  The step failed.


so now what exactly should i do.
0
 
LVL 60

Expert Comment

by:chapmandew
ID: 24408781
I've already told you how to fix the problem.
0
 
LVL 60

Expert Comment

by:chapmandew
ID: 24408797
You've already made several posts for the same problem...are you just not understanding what we're telling you to do?  

http://www.experts-exchange.com/Storage/Hard_Drives/Q_24414858.html#a24408796
0
 

Author Comment

by:aatishpatel
ID: 24408825
sorry friend but i am a newbe and sometimes having a hard time to understand. But i am following to what you said. thanx anyways
0
 
LVL 60

Expert Comment

by:chapmandew
ID: 24408899
sure...just follow the statements I showed above and you'll be all good.
0
 
LVL 31

Expert Comment

by:RiteshShah
ID: 24408929
0
 
LVL 60

Expert Comment

by:chapmandew
ID: 24409050
the article is wrong...no reason to shrink the file before you do a truncate on the backup.
0
 
LVL 31

Expert Comment

by:RiteshShah
ID: 24409212
hi chapman,

Why one can't shrink the file when it gets full?
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 24411347
>>Why one can't shrink the file when it gets full?<<
Because it will not shrink.  How is that for a reason?

In order for you to be able to shrink the transaction log you must first remove the active transactions.  This is done by using BACKUP LOG...
0
 
LVL 60

Accepted Solution

by:
chapmandew earned 2000 total points
ID: 24411365
Ritesh,
acperkins is right...there is nothing to shrink because the file is still full with inactive transactions.  If you could just shrink it, then you wouldn't need to perform a log truncation.  Read the first article I posted, I cover it.
0
 
LVL 31

Expert Comment

by:RiteshShah
ID: 24411373
thanks.
0
 

Author Closing Comment

by:aatishpatel
ID: 31582455
thanx
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

I have a large data set and a SSIS package. How can I load this file in multi threading?
When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

715 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