[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1172
  • Last Modified:

SQL Server log file full

Hello,
I have a message that says  Database zbc log file is full. what should i do now.  help needed asap
0
aatishpatel
Asked:
aatishpatel
  • 8
  • 4
  • 3
  • +1
1 Solution
 
chapmandewCommented:
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
 
aatishpatelAuthor Commented:
but for safety purpose how do i backup the .lfd files. and if i shrink it the data will be loat right?
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
chapmandewCommented:
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
 
aatishpatelAuthor Commented:
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
 
chapmandewCommented:
I've already told you how to fix the problem.
0
 
chapmandewCommented:
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
 
aatishpatelAuthor Commented:
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
 
chapmandewCommented:
sure...just follow the statements I showed above and you'll be all good.
0
 
RiteshShahCommented:
0
 
chapmandewCommented:
the article is wrong...no reason to shrink the file before you do a truncate on the backup.
0
 
RiteshShahCommented:
hi chapman,

Why one can't shrink the file when it gets full?
0
 
Anthony PerkinsCommented:
>>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
 
chapmandewCommented:
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
 
RiteshShahCommented:
thanks.
0
 
aatishpatelAuthor Commented:
thanx
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 8
  • 4
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now