truncationg logs

  • I have a Database of size 200 MB and my transactio log is 13GB(very high).So can I truncate the log file by taking a fresh full backup?

    Thanks.

  • First back up by issuing

    BACKUP LOG {db_name}

    WITH NO_LOG

    Then

    DBCC SHRINKFILE (MYDB_Log, 100)

    where MYDB_Log is the logical log file name

    and 100 is the target size in MB.

  • I always use BACKUP LOG DataBaseName WITH TRUNCATE_ONLY

    Seems to work great for me.


    Shalom!,

    Michael Lee

  • Just backing up won't shrink the transaction log file.  It will eliminate the entries, but not change the file allocation.  Use the DBCC command, as shown above.

    So long, and thanks for all the fish,

    Russell Shilling, MCDBA, MCSA 2K3, MCSE 2K3

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply