-->

Ads 720 x 90

Deprecated Features – SQL Server 2008

BACKUP LOG .. WITH NO_LOG / TRUNCATE_ONLY

Almost every dba  uses “BACKUP LOG <mydb> WITH TRUNCATE_ONLY or NO_LOG” statement to truncate the database; Basically when you truncate the log files using the above statement(s), the log chain will be broken and I think because of this, Microsoft is planning to discontinue this feature in future editions of the sql server. As an alternative, we should change the recovery model to Simple and bring it back to the previous state.

   1: ALTER DATABASE DBName SET RECOVERY SIMPLE



   2: GO



   3: CHECKPOINT



   4: GO



   5: ALTER DATABASE DBName SET RECOVERY FULL



   6: GO



   7: BACKUP DATABASE DBName TO DISK = 'N:\Backups\DBName.Bak' WITH INIT



   8: GO



   9:  


Related Posts

There is no other posts in this category.

Total Pageviews

Subscribe Our Newsletter