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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

full database backup and log file truncate

Status
Not open for further replies.

cmmrfrds

Programmer
Joined
Feb 13, 2000
Messages
4,690
Location
US
Can anybody tell me the definition of a full database backup. I have heard and read that with a full database backup the log file will get truncated. This does not seem to be happening. I backup the log and then backup the database, but the log file still grows. What options do I need set? Do I need to run dbcc shrinkfile after the backup?
 
A full backup copies everything in the databse including necessary portions of the transaction log required to completely restore the database.

A backup of the database or log truncates the inactive portion of the log. It does not shrink the file size. You can set AUTO shrink on and SQL will attempt to shrink the database and the files. We've found that this doesn't work as consistently as we need due to the structure of the log. Therefore, we run a nightly maintenance on some of our larger, most active databases to force the database and log to shrink. We use DBCC Shrinkdatabase and DBCC Shrinkfile to do this maintenance.

If your log is large you may want to take action to shrink it immediately and then allow maintenance runs to maintain it. See the article at SWYNK about how to shrink the log.

Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top