Restore with NORECOVERY option isssue
andriancruz
Posts: 22
Hi All,
I'd like to ask if anyone encountered this issue: I'm restoring the database with NORECOVERY option, because I want to restore Differential/Transaction logs backup after. But when i restored the database, I'll expect the database status should be restoring state, but when i checked the database is already accessible and I'm not able to restore the Differential/Transaction log backup. Below are the scripts that I'm using.
EXEC master..sqlbackup '-SQL "RESTORE DATABASE [Db_Name]
FROM DISK = ''Drive:Filename.sqb''
WITH MOVE ''Logical_name'' TO ''Drive:DB_Name.mdf'',
MOVE ''Logical_name_log'' TO ''Drive:DB_Name.ldf REPLACE, NORECOVERY''"'
I'm using SQL Backup v7.7.0.7 server components.
Any help are highly appreciated. Thanks a lot!
Regards, Andrian
I'd like to ask if anyone encountered this issue: I'm restoring the database with NORECOVERY option, because I want to restore Differential/Transaction logs backup after. But when i restored the database, I'll expect the database status should be restoring state, but when i checked the database is already accessible and I'm not able to restore the Differential/Transaction log backup. Below are the scripts that I'm using.
EXEC master..sqlbackup '-SQL "RESTORE DATABASE [Db_Name]
FROM DISK = ''Drive:Filename.sqb''
WITH MOVE ''Logical_name'' TO ''Drive:DB_Name.mdf'',
MOVE ''Logical_name_log'' TO ''Drive:DB_Name.ldf REPLACE, NORECOVERY''"'
I'm using SQL Backup v7.7.0.7 server components.
Any help are highly appreciated. Thanks a lot!
Regards, Andrian
Comments
Can you please confirm the syntax you are using?
From your example you appear to be missing the closing two single quotation marks at the end of the move statement for the log file:
Where it should be:
Can you please retry your script based on your example using the code below?
Many Thanks
Eddie
Senior Product Support Engineer
Redgate Software Ltd
Email: support@red-gate.com
Your right I've missing the closing two single quotation marks Thanks a lot for the help it's working fine now.
Cheers!
Regards, Andrian