BAckup Database, what about the Log

  • I have jobs set up the backup the databases to a different server using the following example:

    BACKUP DATABASE [tdc] TO  DISK = N'\\cpwsan\BACKUP\MCSERVER\tdc.bak' WITH  INIT ,  NOUNLOAD ,  NAME = N'tdc backup',  SKIP ,  STATS = 10,  NOFORMAT

    I noticed the Log files are still growing, the database is setup as 'Full'.

    I manually did the following:

    backup log tdc to disk = N'\\cpwsan\Backup\MCSERVER\tdc.trn'

    dbcc shrinkfile('tdc_Log',2)

    If I change the model to 'Simple', will the current backup job take care of the log file; If I do not change the model, what is the best practice?

     

    Thanks for the help, Richard

     

  • Full backups do not affect the transaction logs.  Either a database is in simple recovery mode where log records are released as soon as a transaction completes, the log is flushed, and data pages are updated, or the database is in full or bulk-logged recovery mode where log records are held until a log backup (or log truncation) is performed.

    You could do a full backup every hour and your transaction log files will continue to grow (if not using simple recovery) until you do a log backup or truncation.  Or until the server runs out of disk space.

Viewing 2 posts - 1 through 1 (of 1 total)

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