09-01-2015 12:07 AM
I need to write a script to restore data from .bak to .adf and .alf
i need to restore data to sql server. Need to write the script.
Thanks
09-01-2015 07:13 AM
09-01-2015 10:56 PM
Yes. But I need to write own custom script/code
Is it possible.
If yes. Then how should I proceed
09-02-2015 01:29 AM
If you read through the following kb article, you should be able to write your own bat or PS1 file.
http://kb.swiftpage.com/app/answers/detail/a_id/27607
You could also just create your own sqlcmd script using a SQL backup statement.
09-02-2015 03:54 AM - edited 09-02-2015 04:06 AM
Thanks for the reply Vivek.
First of all I tried to write a sql script to restore data. But I am not able to restore data using that script.
I have a zip file in which I have the .bak file
So script that I have written is
RESTORE DATABASE demoDatabse FROM DISK='"C:\actdatabases\Backup\database.bak"
But using this script I am only able to restore data that has .mfd extension not adf extension
When I try to restore the database inside the zip file I get this exception.
{"Directory lookup for the file \"V:\\ACT\\ARAMaster.ADF\" failed with the operating system error 3(The system cannot find the path specified.).\r\nFile 'ACT_DATA' cannot be restored to 'V:\\ACT\\ARAMaster.ADF'. Use WITH MOVE to identify a valid location for the file.\r\nDirectory lookup for the file \"V:\\ACT\\ARAMaster.ALF\" failed with the operating system error 3(The system cannot find the path specified.).\r\nFile 'ACT_LOG' cannot be restored to 'V:\\ACT\\ARAMaster.ALF'. Use WITH MOVE to identify a valid location for the file.\r\nProblems were identified while planning for the RESTORE statement. Previous messages provide details.\r\nRESTORE DATABASE is terminating abnormally."}
Dont know ehy this issue is coming and I don't have any dirive as V drive.
Please help me with this. I really need to figure this out.
Also I tried to folow the steps mentioned on http://kb.swiftpage.com/app/answers/detail/a_id/27607
So I wrote the following command to Restore As SQL .BAK backup file
ACTDiag RestoreAs act2011demoNew C:\actdatabases\Backup\database.bak c:\ActDatabases
But again the exception is coming.
Need your help!!
Thanks
09-02-2015 04:30 AM - edited 09-02-2015 04:30 AM
Plz can anyone help!
How it can be done.
I just want to write a script or c# code to attach the .bak database in zip file to sql server management studio
09-02-2015 04:36 AM
Are you able to paste up the entire script?
Also can you confirm that the ACT7 instance is on the same machine as the restoration location and the bak location.
09-02-2015 04:40 AM
Paste the entire script?
means??
Yes the ACT7 instance is on the same machine as the restoration location and the bak location.
Thanks,
09-02-2015 04:42 AM
Ok, I just had a quick re-read. Can yo confirm that you have extracted the BAK file out of the zip?
09-02-2015 04:44 AM