September 8, 2014 at 4:48 pm
let us say my database in source server is cake_test and the database in the target server is also named as cake_test.
Now the backup of the database from the source server has the following files:
OriginalFile Name   Restore As
cake_test     cake_test.mdf
cream_data     cake_test.ndf
creamlayer_data     cake_test.ndf
cream_dat    cake_test.ndf
cake_test_log    cake_test.ldf
cream_log     cake_test.ldf
As instructed by you I have done the following:
RESTORE DATABASE cake_test
FROM DISK='D:\cake_test.bak'
WITH
MOVE 'cake_test' TO 'D:\MSSQL\DATA\cake_test.mdf'
,MOVE 'cream_data' TO 'D:\MSSQL\DATA\cake_test.ndf'
,MOVE 'creamlayer_data' TO 'D:\MSSQL\DATA\cake_test.ndf'
,MOVE 'cream_dat' TO 'D:\MSSQL\DATA\cake_test.ndf'
,MOVE 'cake_test_log' TO 'D:\MSSQL\DATA\cake_test.ldf'
,MOVE 'cream_log' TO 'D:\MSSQL\DATA\cake_test.ldf'
,stats=1
but no luck. I got the following error " RESTORE cannot process database 'cake_test' because it is in use by this session. It is recommended that the master database be used when performing this operation. "
Am i doing anything wrong here??
Please suggest.
November 16, 2014 at 12:14 am
If built-in DBCC CHECKDB/repair tools fail to repair and restore the corrupt or damaged SQL server databases, it is good to opt for a third party application like this: http://www.serversdatarecovery.com/sqldatabase.html
This third party tool has been developed with strong scanning technology to analyze the database deeply and repair the corrupted items.
November 17, 2014 at 5:10 am
Try putting
USE Master
Go
before your "restore database" statement - you've probably got management studio pointing at the database you're trying to restore - it's a common slip up.
November 21, 2014 at 11:09 pm
This was removed by the editor as SPAM
February 1, 2017 at 10:28 am
This was removed by the editor as SPAM
February 3, 2017 at 3:53 am
This was removed by the editor as SPAM
Viewing 6 posts - 16 through 20 (of 20 total)
You must be logged in to reply to this topic. Login to reply