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
onyxaAsked:
Who is Participating?
 
Paul JacksonConnect With a Mentor Software EngineerCommented:
Using the wizard you have to go to the options page and specify overwrite existing database.
0
 
onyxaAuthor Commented:
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
0
 
Paul JacksonSoftware EngineerCommented:
Ensure your destination paths are correct you seem to be missing the \ after the E: in the above tsql.
0
 
Paul JacksonSoftware EngineerCommented:
Only other workaround I can think of, is to backup the target database, then delete it and then restore your database backup.
0
 
onyxaAuthor Commented:
thanks.  didn't work.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.