June 10, 2007 at 11:00 pm
I am trying to restore a backup file from a SQL 2000 database onto my new SQL 2005 sp2 install. It errors out with error 3154. The backup set holds a backup of a database other than the existing "CM101" database. I have it checked off to overwrite existing database. Under options I select the mdf and the ldf path to the right file.
I read on one post that you can overwrite a sql 2005 database in a restore from a sql 2000, that you had to create a new database from the restore. So I tried THAT AND GET an error 3129 the file or file group "gpscm101log.ldf" cannot be selected for the file or file group.
Don
June 11, 2007 at 2:07 am
Check what is the type of the backup. I think you are trying to restore a diff backup without restoring a full backup.
Cheers,
Sugeshkumar Rajendran
SQL Server MVP
http://sugeshkr.blogspot.com
June 11, 2007 at 10:13 am
Your first attempt probably didn't work because the backup was for a database with a different name than the one you want to overwrite. "WITH REPLACE" only works for overwriting a database with a backup of a database with the same name.
Did you use "WITH MOVE" in your second attempt to create the database from the backup?
Greg
Greg
June 11, 2007 at 3:08 pm
It is from a Full Backup.
Here is the command and results.
RESTORE DATABASE [CM101] FILE = N'GPSCM101Dat.mdf', FILE = N'GPSCM101Log.ldf' FROM DISK = N'D:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\cm101back.bak' WITH FILE = 1, MOVE N'GPSCM101Dat.mdf' TO N'D:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\GPSCM101Dat.mdf', MOVE N'GPSCM101Log.ldf' TO N'D:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\GPSCM101Log.ldf', NOUNLOAD, REPLACE, STATS = 10
GO
--Results
Msg 3154, Level 16, State 4, Line 1
The backup set holds a backup of a database other than the existing 'CM101' database.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
Don
June 11, 2007 at 3:11 pm
Here is the error I get trying the Move cammand
RESTORE DATABASE [CM101B] FILE = N'GPSCM101Dat.mdf', FILE = N'GPSCM101Log.ldf' FROM DISK = N'D:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\cm101back.bak' WITH FILE = 1, MOVE N'GPSCM101Dat.mdf' TO N'D:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\CM101B.mdf', MOVE N'GPSCM101Log.ldf' TO N'D:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\CM101B_0.ldf', NOUNLOAD, STATS = 10
GO
Msg 3219, Level 16, State 3, Line 1
The file or filegroup "GPSCM101Log.ldf" cannot be selected for this operation.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
Don
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply