Reduce Transaction log -Urgent Help

  • Hi All,

    I have a database with 74gb of data and 25 gb of transaction log. I want to reduce the size to a reasonable amount, say <5gb. The recovery model is full.

    I have the command:

    DBCC SHRINKFILE(dbname_Log, 5000)

    BACKUP LOG dbname WITH TRUNCATE_ONLY

    DBCC SHRINKFILE(dbname_Log, 5000)

    Will this work.. as i want only to reduce the size but not truncate (as i dnt want to lose anything) the log.

    Thanks

    Akb

  • You may do normal BACKUP LOG, it will remove pages from LOG file as well.

    Just make sure you direct backup to some network drive, because backup file takes space for itself as well. 🙂

    _____________
    Code for TallyGenerator

  • Are you on SQL2k or2k5?

    Do you have Enterprise Manager?

    _____________
    Code for TallyGenerator

  • Hello,

    Am using 2k. Do you mean that if i do a back log, space will be regained?

    Thanks

    Akb

  • If you are using 2k you may click on DB in EM, then right-click and select View-Taskpad.

    Tell us what it will show you.

    _____________
    Code for TallyGenerator

  • There is nothing as view taskpad in the EM which i can see.

  • You should left-click on the database first.

    _____________
    Code for TallyGenerator

Viewing 7 posts - 1 through 6 (of 6 total)

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