Monday, March 19, 2012

BackUp Question

When you do a full back-up of a sql server db, does that include the transaction logs or do they still have to be backed up seperately?
Thanks!Depends what your question is - does a full backup include all transactions in T-log? Yes. Does full backup checkpoint the T-log and truncate it? No. Does it shrink the T-log in a full backup? No.

To test this run this command:

dbcc sqlperf('logspace')

this will show you the percentage of your T-log used. Run a full backup then run the command again and you will see that the percentage did not go down. If you are having T-log growth problems, you probably want to back it up periodically.

Another good command to know for the T-log is this one:

select * from ::fn_dblog(null,null)

This will show you the entries in your active T-log.

HTH

No comments:

Post a Comment