Solved

transaction log in sql server

Posted on 2011-02-24
4
271 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 40

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

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…
In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

830 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