Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Other SQL Server 2008 Topics
 backup log not working sql2008

Author  Topic 

mike123
Master Smack Fu Yak Hacker

1462 Posts

Posted - 2009-01-15 : 10:48:18
Hi,

I am running the following command

backup log databasename WITH TRUNCATE_ONLY

However I get this error:

'TRUNCATE ONLY' is not a recognized BACKUP OPTION

I am able to run this fine on SQL2005, but not SQL2008, any ideas?

Thanks very much!
mike123

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2009-01-15 : 11:04:17
It was decommissioned in SQL 2008. You should rather change database to simple recovery model and shrink log file.
Go to Top of Page

cshah1
Constraint Violating Yak Guru

347 Posts

Posted - 2009-01-15 : 11:22:11
as sodeep said, it is deprecated in SQL 2008 because it breaks the log chain


alter database pubs set recovery simple
go

checkpoint
go

alter database pubs set recovery full
go

backup database pubs to disk = 'c:\pubs.bak' with init
go

Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2009-01-15 : 11:29:33
quote:
Originally posted by cshah1

as sodeep said, it is deprecated in SQL 2008 because it breaks the log chain


alter database pubs set recovery simple
go

checkpoint
go

alter database pubs set recovery full
go

backup database pubs to disk = 'c:\pubs.bak' with init
go





This also break log chain but I see what you are doing.
Go to Top of Page

cshah1
Constraint Violating Yak Guru

347 Posts

Posted - 2009-01-15 : 11:39:55
>>This also break log chain

after you take a full backup...?
Go to Top of Page

mike123
Master Smack Fu Yak Hacker

1462 Posts

Posted - 2009-01-15 : 11:44:48
got it, thanks guys!
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2009-01-15 : 11:49:29
quote:
Originally posted by cshah1

>>This also break log chain

after you take a full backup...?


No . I mean when you change to simple from full.
Go to Top of Page
   

- Advertisement -