Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

Truncate SQL 2008 R2 database log file

$
0
0

I've been looking about trying to work out how to truncate a db log file on SQL 2008 R2.

I've seen a lot of examples, but I'm not clear on what to do. The most simple example is this:

DBCC SHRINKFILE(TestDBLog, 1)
BACKUP LOG TestDB WITH TRUNCATE_ONLY
DBCC SHRINKFILE(TestDBLog, 1)
GO

But I think this is for SQL 2005. I also don't understand the need for a backup in this? My database backup isn't covering this?

Thanks.


Viewing all articles
Browse latest Browse all 4871

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>