Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Best Way to Truncate Log After Performing Full Backup (SQL Server 20

Status
Not open for further replies.

pittpanther

Programmer
Jan 29, 2007
1
US
Hello all - I have a SQL Server 2000 database setup using the Full Recovery Model. Each night, we backup the entire database, and as such would like to truncate the log at this time as well.

Is the best way to do this to also backup the Transaction Log, and then perform a DBCC SHRINKFILE command? It just seems like there should be an easier way...?

Thanks!

 
If your not backing up the TLOG throughout the day why would you keep the database in FULL Recovery model. Set the Recovery model to simple and forget about it.
However, If you need to be able to recover you databaes to a point in time. Then create incremental TLOG backup to run throughout the day. I run Log backups every 30 min. So the most data that I could loose would be 30 min worth.

To answer your original question yes. Backup the log then run a DBCC SHRINKFILE (logname, TRUNCATEONLY)

- Paul
- If at first you don't succeed, find out if the loser gets anything.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top