SQL Server 2005 SP2
Using SSMS, I've just backed up my transaction log (which is around 314
megs) on a smallish database. I purposely generated a bunch of dummy
transactions to grow the trans log.
I scripted the action in SSMS, and it said this:
BACKUP LOG [test] TO DISK = N'C:\data\test. trn' WITH NOFORMAT, INIT,
NAME = N'test-Transaction Log Backup', SKIP, NOREWIND, NOUNLOAD, STATS
= 10
GO
However, when its done, my trans log is still 314 megs. Shouldn't the
BACKUP LOG command truncate the log?
I used DBCC LOGINFO to figure out where the VLF w/ status=2 is, and its
at the bottom of the many VLF's which I think explains why the trans log
is not being truncated.
Why is this happening? How do I actually truncate the log?
When/Why would I use DBCC shrinkfile rather than relying on BACKUP LOG
to decrease the size of the log file?
Thanks in advance for any help..
aj
Using SSMS, I've just backed up my transaction log (which is around 314
megs) on a smallish database. I purposely generated a bunch of dummy
transactions to grow the trans log.
I scripted the action in SSMS, and it said this:
BACKUP LOG [test] TO DISK = N'C:\data\test. trn' WITH NOFORMAT, INIT,
NAME = N'test-Transaction Log Backup', SKIP, NOREWIND, NOUNLOAD, STATS
= 10
GO
However, when its done, my trans log is still 314 megs. Shouldn't the
BACKUP LOG command truncate the log?
I used DBCC LOGINFO to figure out where the VLF w/ status=2 is, and its
at the bottom of the many VLF's which I think explains why the trans log
is not being truncated.
Why is this happening? How do I actually truncate the log?
When/Why would I use DBCC shrinkfile rather than relying on BACKUP LOG
to decrease the size of the log file?
Thanks in advance for any help..
aj
Comment