09-02-2015 04:48 AM
@abhinav wrote:
RESTORE DATABASE demoDatabse FROM DISK='"C:\actdatabases\Backup\database.bak"
You have an extra ' before the double quotes. It should read
RESTORE DATABASE demoDatabse FROM DISK="C:\actdatabases\Backup\database.bak"
09-02-2015 05:00 AM
I mistyped it will writing
This is the script
RESTORE DATABASE demoDatabse FROM DISK='C:\actdatabases\Backup\database.bak'
This is having the same issue that I mentioned.
Do you have any Idea how this can be done.
Thanks,
09-02-2015 05:23 AM - edited 09-02-2015 05:27 AM
Ok, is the name of the dB: demodatabase exactly the same as the name of the manifest of the bak file. I.e. if the bak file was created from a dB called demoDb, using the RESTORE command as above you would need to do a RESTORE DATABASE demodb FROM DISK .... Else you're going to need to a RESTORE WITH MOVE
*EDIT*
Actually thinking about it that is most probably what the problem is. The original location of the manifest file was most probably on a V:\ drive somewehre and you are working on it locally on your machine. You'll need to check the FILELIST and do a MOVE.
*EDIT 2*
Yeah just checked your error message. Original dB was ARAMaster from the log file.
09-02-2015 05:29 AM
10-20-2015 03:47 AM
This should do the trick.
--IN THIS EXAMPLE THE DATABASE ORIGINALLY RESIDED IN R:\ THIS SCRIPT DEMONSTRATES HOW TO IDENTIFY --THE ORIGINAL LOCATION AND NAME OF THE DATABASE AND THEN RESTORES THE DATABASE TO A NEW LOCATION WITH A --NEW NAME WITH THE CORRECT EXTENSIONS FOR AN ACT! DATABASE --SET MASTER DB CONTEXT use master --FILELISTONLY WILL SHOW YOU THE ORIGINAL FILE NAMES IF THEY'RE NOT KNOWN RESTORE FILELISTONLY FROM DISK = 'C:\DataBackups\DBBackup.bak' --RESTORE THE DATABASE TO THE DESIRED LOCATION WITH NEW FILE NAMES RESTORE DATABASE testing FROM DISK = 'C:\DataBackups\DBBackup.bak' WITH MOVE 'testing' TO 'C:\BOOM\supernewdata.adf', MOVE 'testing_log' TO 'C:\BOOM\supernewdata.alf' --RENAMES THE DATABASE ITSELF ALTER DATABASE testing MODIFY Name = supernewdata
Regards,
Russ