I am using sql server 2000 over win 2000 server with service pack 4.
I have been given a back up of a database (I have tried both from T-SQL and
Enterprise Manager)
T-SQL
RESTORE FILELISTONLY
FROM DISK = 'c:\A.bck'
RESTORE DATABASE B
FROM DISK = 'c:\A.bck'
WITH MOVE 'A_Data' TO 'c:\test\B.mdf',
MOVE 'A_Log' TO 'c:\test\B.ldf'
and as I try to restore I get the following error :
Server: Msg 3154, Level 16, State 2, Line 1
The backup set holds a backup of a database other than the existing 'B'
database.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
Would you kindly help me ''?
Thank you in advance,
YassYou need to specify the REPLACE option. This is needed when the target
database exists and the backup was created from a database with a different
name.
RESTORE DATABASE B
FROM DISK = 'c:\A.bck'
WITH MOVE 'A_Data' TO 'c:\test\B.mdf',
MOVE 'A_Log' TO 'c:\test\B.ldf',
REPLACE
Hope this helps.
Dan Guzman
SQL Server MVP
"Yass" <gol_e_yass@.yahoo.com> wrote in message
news:bv0tq4$1r58@.news.emirates.net.ae...
quote:
> Dear Newsgroup,
>
> I am using sql server 2000 over win 2000 server with service pack 4.
> I have been given a back up of a database (I have tried both from T-SQL
and
quote:
> Enterprise Manager)
> T-SQL
> RESTORE FILELISTONLY
> FROM DISK = 'c:\A.bck'
> RESTORE DATABASE B
> FROM DISK = 'c:\A.bck'
> WITH MOVE 'A_Data' TO 'c:\test\B.mdf',
> MOVE 'A_Log' TO 'c:\test\B.ldf'
> and as I try to restore I get the following error :
> Server: Msg 3154, Level 16, State 2, Line 1
> The backup set holds a backup of a database other than the existing 'B'
> database.
> Server: Msg 3013, Level 16, State 1, Line 1
> RESTORE DATABASE is terminating abnormally.
> Would you kindly help me ''?
> Thank you in advance,
> Yass
>
>
>
No comments:
Post a Comment