onyxa
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.MSSQLSER VER\MSSQL\ Backup\Pat ra_backup_ 2012030522 00.bak'
WITH REPLACE, MOVE 'Patra' TO 'E:Microsoft SQL Server\MSSQL10_50.MSSQLSER VER\MSSQL\ data\Patra .mdf',
MOVE 'Patra_log' TO 'E:Microsoft SQL Server\MSSQL10_50.MSSQLSER VER\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
RESTORE DATABASE Patra
FROM DISK = 'E:Microsoft SQL Server\MSSQL10_50.MSSQLSER
WITH REPLACE, MOVE 'Patra' TO 'E:Microsoft SQL Server\MSSQL10_50.MSSQLSER
MOVE 'Patra_log' TO 'E:Microsoft SQL Server\MSSQL10_50.MSSQLSER
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
ASKER
thanks. didn't work.
ASKER
pic.jpg