Truncate log on MS Sql 2005

When the transaztion log is full, you can truncate it by using this query:

 

USE DatabaseName

GO

DBCC SHRINKFILE(<TransactionLogName>, 1)

BACKUP LOG <DatabaseName> WITH TRUNCATE_ONLY

DBCC SHRINKFILE(<TransactionLogName>, 1)

GO

 

<TransactionLogName> is the name of the t log without extension and path

 

_____________________________________

Stefano Mazgon

 

Commenti

Post popolari in questo blog

Acer Aspire ONE AOA150 won't boot, display black, only power led on

Force umount of a busy volume, mac os X