TLog shrinking process sql 2000

  • I have applied the following script for TLog shrinking process

    1.SELECT * FROM sysfiles WHERE name LIKE '%LOG%'

    2.alter database dblive set recovery simple

    3.checkpoint

    4.BACKUP LOG dblive WITH NO_LOG

    5.SELECT * FROM sysfiles WHERE name LIKE '%LOG%'

    6.DBCC SHRINKFILE (DBLIVE_Log, 2)

    7.SELECT * FROM sysfiles WHERE name LIKE '%LOG%'

    After finished above command, DBLIVE_Log size really comes to 2 GB before that 99 GB, so right now database full backup size is 182 GB, after depolyed Tlog shrinking process database backup size does not changed still 182 GB comming everyday.

    Please tell if any changes needed

  • You have to truncate the log first.

    Backup Log YourDatabaseName With Truncate_Only

    DBCC Shrinkfile('YourLogicalLogfileName',1000)

  • The size of your logfile has no effect on your full backup, neither has the recovery model. The full backup is a copy of your data and indexes (actually what's in your .mdf and .ndf files)

    A log backup, or truncation happens on your .ldf file, which contains all the transactions

    Wilfred
    The best things in life are the simple things

  • hi thanks for replay.. i am new sqldba

    what i am asking, before shrinking .ldf file 99GB, and full backup size is 182GB, ok

    after deployed the the following command

    BACKUP LOG dblive WITH NO_LOG

    DBCC SHRINKFILE (DBLIVE_Log, 2)

    .ldf file size was getting very low 2MB, so i have doubt before shrinking .ldf file 99GB after shrinking .ldf file 2 MB ie.,fine, so whenerver take database full backup the size is same 182 GB, will not effect backup file size, it was effect only .ldf file.

    please tell me if .ldf after shrinking , is it change in the full backup size?

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

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