Exforsys
+ Reply to Thread
Results 1 to 3 of 3

Hi All

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

  1. #1
    SrikanthA is offline Junior Member Array
    Join Date
    Feb 2006
    Answers
    3

    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


  2. #2
    admin's Avatar
    admin is offline Administrator Array
    Join Date
    Mar 2005
    Location
    New York, USA
    Answers
    58
    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 07:38 AM.

  3. #3
    SrikanthA is offline Junior Member Array
    Join Date
    Feb 2006
    Answers
    3

    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


    •    Sponsored Ads



Latest Article

Network Security Risk Assessment and Measurement

Read More...