Solved

transaction log in sql server

Posted on 2011-02-24
4
244 Views
Last Modified: 2012-05-11
Why will Transactional Log becomes full, and what will you do if it
happens?
0
Comment
Question by:sqlcurious
  • 2
4 Comments
 
LVL 39

Accepted Solution

by:
lcohan earned 125 total points
ID: 34971370
You must do periodic maintenance/backups and please see more details at:

How to stop the transaction log of a SQL Server database from growing

http://support.microsoft.com/kb/873235

0
 
LVL 32

Assisted Solution

by:ewangoya
ewangoya earned 125 total points
ID: 34971579

The are two things you can do to avoid the log growing to large

1. Set database recovery mode to SIMPLE
OR
2. Schedule regular backups
0
 
LVL 9

Assisted Solution

by:mayank_joshi
mayank_joshi earned 250 total points
ID: 34978410
try the folllowing script:-

USE [Database_Name]
GO
DBCC SHRINKDATABASE(N'Database_Name' )
GO
0
 
LVL 9

Assisted Solution

by:mayank_joshi
mayank_joshi earned 250 total points
ID: 34978447
The above script will shrink both data and log files.That's absolutely harmless.
But if you want to shrink only the log file use:-

USE [Database_Name]
GO
DBCC SHRINKFILE (N'DataBase_Log' , 0, TRUNCATEONLY)
GO

here DataBase_Log is the logical name of log file of database.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
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.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

762 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now