Exforsys

Online Training

Hi All

This is a discussion on Hi All within the SQL Server 2005 Tutorials forums, part of the Articles and Tutorials category; I am facing one problem in sql server on transaction log. It is keep on growing. I want to remove ...


Go Back   Exforsys > Articles and Tutorials > SQL Server 2005 Tutorials

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-07-2006, 07:05 AM
Junior Member
 
Join Date: Feb 2006
Posts: 3
SrikanthA is on a distinguished road
Hi All

I am facing one problem in sql server on transaction log. It is keep on growing.

I want to remove the log automatically using a Stored Procedure or by other way.

Please help in this regards
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-13-2006, 06:36 AM
admin's Avatar
Administrator
 
Join Date: Mar 2005
Location: New York, USA
Posts: 302
admin has disabled reputation
Send a message via Yahoo to admin
You can use auto shrink feature .. read books online which has very good help on it...

Shrinking the transaction log file (.ldf)

Before this make sure there are free entries by setting the recovery model to simple or backing up the log.

Enterprise manager
Right click on the database, All tasks, Shrink database, Files, Select log file, OK.

or

dbcc shrinkfile ([db_log_name])
Here [db_log_name] is the logical name of the log file as found from sp_helpdb or the table sysfiles

there is alternative method aslo using Shrink the log file via detach/attach

Last edited by admin : 02-13-2006 at 06:38 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 03-03-2006, 06:58 AM
Junior Member
 
Join Date: Feb 2006
Posts: 3
SrikanthA is on a distinguished road
Tq Admin

Thankq very much for the reply, but i don't want to use that method. My ldf is of 20GB and i used the following steps to shrink the log but not worked, can u please help in this regard

Steps:
------

1. First created the backup devices for database and log separetly
2. Taken full database backup giving that Database backup device name
3. Scheduled the following statements daily
BACKUP DATABASE SqlTest TO SqlTest_Data WITH DIFFERENTIAL
BACKUP LOG SqlTest TO SqlTest_Log
4. After the scheduled time if i see it is taking the backup but log file it is not getting shrinked.

can u tell me why it is not doing it.

Thanks & Regards

Srikanth A
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new questions
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 06:39 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2004 - 2007 Exforsys Inc. All rights reserved.