rmdussa
rmdussa

Reputation: 1557

Truncate_only deprecated in SQL2008

The following statement

BACKUP LOG [AMS_Prod_log] WITH TRUNCATE_ONLY

works fine in SQL Server 2005 but it doesn't with 2008. It seems truncate_only is deprecated in 2008. Could you please let me know how to achieve this in 2008? What care needs to be taken like backup... etc?

Upvotes: 0

Views: 664

Answers (2)

Matej
Matej

Reputation: 7627

You can backup log to nul device:

BACKUP LOG [databaseName]  
TO DISK = 'nul:' WITH STATS = 10

This will mark transaction log as backed-up like TRUNCATE_ONLY option did. The nul: device is like black hole - so you could not restore from such backup.

Upvotes: 1

Ganesh R.
Ganesh R.

Reputation: 4385

This is the list of features depreciated in SQL 2005 i.e. they will not be available in SQL 2008.

http://msdn.microsoft.com/en-us/library/ms143729%28SQL.90%29.aspx

Your alternative is provided in the link.

Upvotes: 0

Related Questions