• river-653653 (9/29/2009)


    Hi,

    I have a database in SQL Server 2000.

    This database is in full recovery model.

    The log size is now of 10GB.

    I have made a backup of the database (full backup) and i need to truncate the log, and then shrink it.

    how can i truncate all the log from a database that is in full recovery model?

    Thank you

    If your database is using the full recovery model, why don't you have regularly scheduled transaction log backups? Running scheduled transaction log backups will keep your transaction log file from continually growing. IF point in time recovery is not necessary, then I'd change your recovery model to simple.

    How large is your database itself? I'd use this to help determine the initial size for your transaction log.

    In SQL Server 2000, the simpliest way is BACKUP LOG WITH TRUNCATE_ONLY (hopefully that is correct, check BOL).

    After you do that, you can use DBCC SHRINKFILE (again, look in BOL for more info).

    Once that is done, run another full backup, and if you are leaving the database in full recovery, setup regularly scheduled transaction log backups to manage the size the transaction log.