hi,
transaction log has 2 possible configuration:
* SIMPLE
means that any transaction get's written to the transaction log, but once it is committed, it is overwritable in the log.
you cannot perform transaction log backups
you cannot perform restore to a point of time
you should let the transaction log file size as it is, because if you shrink it (regulary) to a small size, it has to grow again.
* FULL
means that any transaction get's written to the transaction log, but only once the transaction log backup has been performed, it is overwritable in the log
you have to (should) perform transaction log backups
you can perform restore to a point of time
you should let the transaction log file size as it is, because if you shrink it (regulary) to a small size, it has to grow again.
note: if you had a database in full recovery mode, but did not do any transaction log backups, the log file will indeed grow endlessy until it fills the hard disk(s) completely.
if that happened, you should change to SIMPLE, and try several times the DBCC SHRINKFILE ( log_name, <some size here) until the file shrinks (as the log file is internally a circular buffer, and in case the pointer is at the end of the file, the file won't shrink, hence the retries)
Main Topics
Browse All Topics





by: rmaranhaoPosted on 2007-04-07 at 10:45:21ID: 18870001
I think it's safe, once you performed a FULL database backup.
To truncate my log, I use the following commands:
DBCC SHRINKFILE('logfilename', 1)
BACKUP LOG redeoba WITH TRUNCATE_ONLY DBCC SHRINKFILE('logfilename', 1)
LogfileName is usually databasename_log, I.E. 'northwind_log'
Roberto.