Thursday, March 8, 2012

Database Restore failure in SQL 2005

We are using following commands and options in SQL 2000 for backup and
restore a database:
Backup Database DatabaseName to Disk='file path' with INIT
Backup Log DatabaseName to Disk='file path' with INIT
Alter Database DatabaseName set offline with ROLLBACK IMMEDIATE
Restore Database From Disk='file path' with NORECOVERY
Restore Log From Disk='file path'
It fails in SQL 2005 bate 2. It complains the Log has not been backed up.
Does anybody have any ideal about it?Just test once using workbench ..Do you get same error there as well..
"Siemens" wrote:

> We are using following commands and options in SQL 2000 for backup and
> restore a database:
> Backup Database DatabaseName to Disk='file path' with INIT
> Backup Log DatabaseName to Disk='file path' with INIT
> Alter Database DatabaseName set offline with ROLLBACK IMMEDIATE
> Restore Database From Disk='file path' with NORECOVERY
> Restore Log From Disk='file path'
> It fails in SQL 2005 bate 2. It complains the Log has not been backed up.
> Does anybody have any ideal about it?|||Can you post the detailed error message?
Can you download the SQL 2005 June CTP and try it there?
--
Wei Xiao [MSFT]
SQL Server Storage Engine Development
http://blogs.msdn.com/weix
"Veeru" <Veeru@.discussions.microsoft.com> wrote in message
news:1E28D028-80FF-422A-AC55-8CB5D3ADC41C@.microsoft.com...[vbcol=seagreen]
> Just test once using workbench ..Do you get same error there as well..
> "Siemens" wrote:
>
up.[vbcol=seagreen]|||That is a new feature in 2005. If you want to restore over a database, SQL S
erver want you to backup
the tail of the log first. If you don't want to do that, you can use REPLACE
with the restore
command.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Siemens" <Siemens@.discussions.microsoft.com> wrote in message
news:CE1B6A41-57DC-4944-AC82-389E735FACD8@.microsoft.com...
> We are using following commands and options in SQL 2000 for backup and
> restore a database:
> Backup Database DatabaseName to Disk='file path' with INIT
> Backup Log DatabaseName to Disk='file path' with INIT
> Alter Database DatabaseName set offline with ROLLBACK IMMEDIATE
> Restore Database From Disk='file path' with NORECOVERY
> Restore Log From Disk='file path'
> It fails in SQL 2005 bate 2. It complains the Log has not been backed up.
> Does anybody have any ideal about it?

No comments:

Post a Comment