Link to home
Start Free TrialLog in
Avatar of onyxa
onyxaFlag for Afghanistan

asked on

restore 2005 sql .bak to 2005 or 2008 sql server

I keep receiving existing database error either in the wizard or thru the query.  here is what I entered and received back

RESTORE DATABASE Patra
 FROM DISK = 'E:Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Backup\Patra_backup_201203052200.bak'
 WITH REPLACE, MOVE 'Patra' TO 'E:Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\data\Patra.mdf',
 MOVE 'Patra_log' TO 'E:Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\data\Patra_log.ldf'

Msg 28102, Level 16, State 1, Line 2
Batch execution is terminated because of debugger request.
Msg 3154, Level 16, State 4, Line 2
The backup set holds a backup of a database other than the existing 'Patra' database.
Msg 3013, Level 16, State 1, Line 2
ASKER CERTIFIED SOLUTION
Avatar of Paul Jackson
Paul Jackson
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of onyxa

ASKER

I have done that on 2005 and 2008 and still receive the same error.  I have attached a screenshot and you can see the checkbox is marked.
pic.jpg
Ensure your destination paths are correct you seem to be missing the \ after the E: in the above tsql.
Only other workaround I can think of, is to backup the target database, then delete it and then restore your database backup.
Avatar of onyxa

ASKER

thanks.  didn't work.