![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi how to put the database to standby mode for log shipping: *** Error: The restore operation cannot proceed because the secondary database 'mydatabase' is not in NORECOVERY/STANDBY mode.(Microsoft.SqlServer.Management.LogShipping) Thanks... |
#3
| |||
| |||
|
|
You can't. I.e., you need to re-do a prior database restore and get going from there. -- Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://sqlblog.com/blogs/tibor_karaszi someone (AT) js (DOT) com> wrote in message news:#ww1cVQpKHA.5224 (AT) TK2MSFTNGP05 (DOT) phx.gbl... Hi how to put the database to standby mode for log shipping: *** Error: The restore operation cannot proceed because the secondary database 'mydatabase' is not in NORECOVERY/STANDBY mode.(Microsoft.SqlServer.Management.LogShipping) Thanks... |
#4
| |||
| |||
|
|
Thanks Tibor, In this case, I'm going to do a full backup and restore from there, but for restoring log, I have few days logs in folder, is it the SQL server will handle that or I have to sepcify from which log file to begin? "Tibor Karaszi" <tibor_please.no.email_karaszi (AT) hotmail (DOT) nomail.com> wrote in message news:uGm2jmQpKHA.3748 (AT) TK2MSFTNGP02 (DOT) phx.gbl... You can't. I.e., you need to re-do a prior database restore and get going from there. -- Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://sqlblog.com/blogs/tibor_karaszi someone (AT) js (DOT) com> wrote in message news:#ww1cVQpKHA.5224 (AT) TK2MSFTNGP05 (DOT) phx.gbl... Hi how to put the database to standby mode for log shipping: *** Error: The restore operation cannot proceed because the secondary database 'mydatabase' is not in NORECOVERY/STANDBY mode.(Microsoft.SqlServer.Management.LogShipping) Thanks... |
#5
| |||
| |||
|
|
You can't. I.e., you need to re-do a prior database restore and get going from there. -- Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://sqlblog.com/blogs/tibor_karaszi someone (AT) js (DOT) com> wrote in message news:#ww1cVQpKHA.5224 (AT) TK2MSFTNGP05 (DOT) phx.gbl... Hi how to put the database to standby mode for log shipping: *** Error: The restore operation cannot proceed because the secondary database 'mydatabase' is not in NORECOVERY/STANDBY mode.(Microsoft.SqlServer.Management.LogShipping) Thanks... |
#6
| |||
| |||
|
|
Hi Tibor, How to put database in standby mode when restoring from a full back? Thanks. "Tibor Karaszi" <tibor_please.no.email_karaszi (AT) hotmail (DOT) nomail.com> wrote in message news:uGm2jmQpKHA.3748 (AT) TK2MSFTNGP02 (DOT) phx.gbl... You can't. I.e., you need to re-do a prior database restore and get going from there. -- Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://sqlblog.com/blogs/tibor_karaszi someone (AT) js (DOT) com> wrote in message news:#ww1cVQpKHA.5224 (AT) TK2MSFTNGP05 (DOT) phx.gbl... Hi how to put the database to standby mode for log shipping: *** Error: The restore operation cannot proceed because the secondary database 'mydatabase' is not in NORECOVERY/STANDBY mode.(Microsoft.SqlServer.Management.LogShipping) Thanks... |
#7
| |||
| |||
|
|
Use the STANDBY option of the RESTORE command (along with a file to be created by the restore process where to keep the info needed in order to undo the UNDO performed by the recovery process). Or, you can also use NORECOVERY. What you can't use is ECOVERY (or none of these options). -- Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://sqlblog.com/blogs/tibor_karaszi someone (AT) js (DOT) com> wrote in message news:ugSsJMRpKHA.1548 (AT) TK2MSFTNGP02 (DOT) phx.gbl... Hi Tibor, How to put database in standby mode when restoring from a full back? Thanks. "Tibor Karaszi" <tibor_please.no.email_karaszi (AT) hotmail (DOT) nomail.com> wrote in message news:uGm2jmQpKHA.3748 (AT) TK2MSFTNGP02 (DOT) phx.gbl... You can't. I.e., you need to re-do a prior database restore and get going from there. -- Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://sqlblog.com/blogs/tibor_karaszi someone (AT) js (DOT) com> wrote in message news:#ww1cVQpKHA.5224 (AT) TK2MSFTNGP05 (DOT) phx.gbl... Hi how to put the database to standby mode for log shipping: *** Error: The restore operation cannot proceed because the secondary database 'mydatabase' is not in NORECOVERY/STANDBY mode.(Microsoft.SqlServer.Management.LogShipping) Thanks... |
#8
| |||
| |||
|
|
Thanks Tibor, I restore as: RESTORE DATABASE cashx FROM disk ='C:\Database\SecondaryData\DatabaseBackup\mydb.ba k' WITH STANDBY='C:\Database\SecondaryData\DatabaseBackup\ ROLLBACK_UNDO_DisasterData base.BAK' The old log files system will handle: Skipped log backup file. Secondary DB: xxx and the database is Standby/Read-Only, but store log failed: Message 2010-02-05 00:45:26.50 *** Error: Could not apply log backup file '\\Database\SecondaryData\Logs\x_20100205011501.tr n' to secondary database 'cashx'.(Microsoft.SqlServer.Management.LogShippin g) *** 2010-02-05 00:45:26.50 *** Error: During startup of warm standby database 'x' (database ID 7), its standby file ('\\X-Database\SecondaryData\Logs\x_20100205054523.tuf') was inaccessible to the RESTORE statement. The operating system error was '5(Access is denied.)'. Diagnose the operating system error, correct the problem, and retry startup. RESTORE LOG is terminating abnormally. Processed 0 pages for database 'x', file 'x_Data' on file 1. Processed 841 pages for database 'x', file 'x_Log' on file 1.(.Net SqlClient Data Provider) *** I checked, I don't have tuf file. Can you please help here? "Tibor Karaszi" <tibor_please.no.email_karaszi (AT) hotmail (DOT) nomail.com> wrote in message news:OBZrblRpKHA.4348 (AT) TK2MSFTNGP06 (DOT) phx.gbl... Use the STANDBY option of the RESTORE command (along with a file to be created by the restore process where to keep the info needed in order to undo the UNDO performed by the recovery process). Or, you can also use NORECOVERY. What you can't use is ECOVERY (or none of these options). -- Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://sqlblog.com/blogs/tibor_karaszi someone (AT) js (DOT) com> wrote in message news:ugSsJMRpKHA.1548 (AT) TK2MSFTNGP02 (DOT) phx.gbl... Hi Tibor, How to put database in standby mode when restoring from a full back? Thanks. "Tibor Karaszi" <tibor_please.no.email_karaszi (AT) hotmail (DOT) nomail.com wrote in message news:uGm2jmQpKHA.3748 (AT) TK2MSFTNGP02 (DOT) phx.gbl... You can't. I.e., you need to re-do a prior database restore and get going from there. -- Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://sqlblog.com/blogs/tibor_karaszi someone (AT) js (DOT) com> wrote in message news:#ww1cVQpKHA.5224 (AT) TK2MSFTNGP05 (DOT) phx.gbl... Hi how to put the database to standby mode for log shipping: *** Error: The restore operation cannot proceed because the secondary database 'mydatabase' is not in NORECOVERY/STANDBY mode.(Microsoft.SqlServer.Management.LogShipping) Thanks... |
#9
| |||
| |||
|
|
There is something strange going on here. You say you do STANDBY with below and undo file name: STANDBY='C:\Database\SecondaryData\DatabaseBackup\ ROLLBACK_UNDO_DisasterData |
|
But the error message from SQL Server tells a very different story. According to the error message, the prior restore was done with below as standby file: \\X-Database\SecondaryData\Logs\x_20100205054523.tuf' And, according to the error message, above file doesn't exist. So, the process seems messed up. Or perhaps above is the standby file for a following log restore? Ah, yes, I now see that in the error message. So, probably the first log restore using the standby file (the one you created) was OK. But a following log restore failed, because a prior standby file was inaccessible (network drive not available, somebody deleted the file or something like that). -- Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://sqlblog.com/blogs/tibor_karaszi someone (AT) js (DOT) com> wrote in message news:OCJa4XnpKHA.1548 (AT) TK2MSFTNGP02 (DOT) phx.gbl... Thanks Tibor, I restore as: RESTORE DATABASE cashx FROM disk ='C:\Database\SecondaryData\DatabaseBackup\mydb.ba k' WITH STANDBY='C:\Database\SecondaryData\DatabaseBackup\ ROLLBACK_UNDO_DisasterData base.BAK' The old log files system will handle: Skipped log backup file. Secondary DB: xxx and the database is Standby/Read-Only, but store log failed: Message 2010-02-05 00:45:26.50 *** Error: Could not apply log backup file '\\Database\SecondaryData\Logs\x_20100205011501.tr n' to secondary database 'cashx'.(Microsoft.SqlServer.Management.LogShippin g) *** 2010-02-05 00:45:26.50 *** Error: During startup of warm standby database 'x' (database ID 7), its standby file ('\\X-Database\SecondaryData\Logs\x_20100205054523.tuf') was inaccessible to the RESTORE statement. The operating system error was '5(Access is denied.)'. Diagnose the operating system error, correct the problem, and retry startup. RESTORE LOG is terminating abnormally. Processed 0 pages for database 'x', file 'x_Data' on file 1. Processed 841 pages for database 'x', file 'x_Log' on file 1.(.Net SqlClient Data Provider) *** I checked, I don't have tuf file. Can you please help here? "Tibor Karaszi" <tibor_please.no.email_karaszi (AT) hotmail (DOT) nomail.com> wrote in message news:OBZrblRpKHA.4348 (AT) TK2MSFTNGP06 (DOT) phx.gbl... Use the STANDBY option of the RESTORE command (along with a file to be created by the restore process where to keep the info needed in order to undo the UNDO performed by the recovery process). Or, you can also use NORECOVERY. What you can't use is ECOVERY (or none of these options). -- Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://sqlblog.com/blogs/tibor_karaszi someone (AT) js (DOT) com> wrote in message news:ugSsJMRpKHA.1548 (AT) TK2MSFTNGP02 (DOT) phx.gbl... Hi Tibor, How to put database in standby mode when restoring from a full back? Thanks. "Tibor Karaszi" <tibor_please.no.email_karaszi (AT) hotmail (DOT) nomail.com wrote in message news:uGm2jmQpKHA.3748 (AT) TK2MSFTNGP02 (DOT) phx.gbl... You can't. I.e., you need to re-do a prior database restore and get going from there. -- Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://sqlblog.com/blogs/tibor_karaszi someone (AT) js (DOT) com> wrote in message news:#ww1cVQpKHA.5224 (AT) TK2MSFTNGP05 (DOT) phx.gbl... Hi how to put the database to standby mode for log shipping: *** Error: The restore operation cannot proceed because the secondary database 'mydatabase' is not in NORECOVERY/STANDBY mode.(Microsoft.SqlServer.Management.LogShipping) Thanks... |
#10
| |||
| |||
|
|
Thanks Tibor, Using NORECOVERY mode, is it possbile to run some query to simple check the secondary data, for example, how many records in clients table compare with primary database. "Tibor Karaszi" <tibor_please.no.email_karaszi (AT) hotmail (DOT) nomail.com> wrote in message news:%23e$dsLJqKHA.5696 (AT) TK2MSFTNGP04 (DOT) phx.gbl... There is something strange going on here. You say you do STANDBY with below and undo file name: STANDBY='C:\Database\SecondaryData\DatabaseBackup\ ROLLBACK_UNDO_DisasterData base.BAK' But the error message from SQL Server tells a very different story. According to the error message, the prior restore was done with below as standby file: \\X-Database\SecondaryData\Logs\x_20100205054523.tuf' And, according to the error message, above file doesn't exist. So, the process seems messed up. Or perhaps above is the standby file for a following log restore? Ah, yes, I now see that in the error message. So, probably the first log restore using the standby file (the one you created) was OK. But a following log restore failed, because a prior standby file was inaccessible (network drive not available, somebody deleted the file or something like that). -- Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://sqlblog.com/blogs/tibor_karaszi someone (AT) js (DOT) com> wrote in message news:OCJa4XnpKHA.1548 (AT) TK2MSFTNGP02 (DOT) phx.gbl... Thanks Tibor, I restore as: RESTORE DATABASE cashx FROM disk ='C:\Database\SecondaryData\DatabaseBackup\mydb.ba k' WITH STANDBY='C:\Database\SecondaryData\DatabaseBackup\ ROLLBACK_UNDO_DisasterData base.BAK' The old log files system will handle: Skipped log backup file. Secondary DB: xxx and the database is Standby/Read-Only, but store log failed: Message 2010-02-05 00:45:26.50 *** Error: Could not apply log backup file '\\Database\SecondaryData\Logs\x_20100205011501.tr n' to secondary database 'cashx'.(Microsoft.SqlServer.Management.LogShippin g) *** 2010-02-05 00:45:26.50 *** Error: During startup of warm standby database 'x' (database ID 7), its standby file ('\\X-Database\SecondaryData\Logs\x_20100205054523.tuf') was inaccessible to the RESTORE statement. The operating system error was '5(Access is denied.)'. Diagnose the operating system error, correct the problem, and retry startup. RESTORE LOG is terminating abnormally. Processed 0 pages for database 'x', file 'x_Data' on file 1. Processed 841 pages for database 'x', file 'x_Log' on file 1.(.Net SqlClient Data Provider) *** I checked, I don't have tuf file. Can you please help here? "Tibor Karaszi" <tibor_please.no.email_karaszi (AT) hotmail (DOT) nomail.com wrote in message news:OBZrblRpKHA.4348 (AT) TK2MSFTNGP06 (DOT) phx.gbl... Use the STANDBY option of the RESTORE command (along with a file to be created by the restore process where to keep the info needed in order to undo the UNDO performed by the recovery process). Or, you can also use NORECOVERY. What you can't use is ECOVERY (or none of these options). -- Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://sqlblog.com/blogs/tibor_karaszi someone (AT) js (DOT) com> wrote in message news:ugSsJMRpKHA.1548 (AT) TK2MSFTNGP02 (DOT) phx.gbl... Hi Tibor, How to put database in standby mode when restoring from a full back? Thanks. "Tibor Karaszi" <tibor_please.no.email_karaszi (AT) hotmail (DOT) nomail.com wrote in message news:uGm2jmQpKHA.3748 (AT) TK2MSFTNGP02 (DOT) phx.gbl... You can't. I.e., you need to re-do a prior database restore and get going from there. -- Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://sqlblog.com/blogs/tibor_karaszi someone (AT) js (DOT) com> wrote in message news:#ww1cVQpKHA.5224 (AT) TK2MSFTNGP05 (DOT) phx.gbl... Hi how to put the database to standby mode for log shipping: *** Error: The restore operation cannot proceed because the secondary database 'mydatabase' is not in NORECOVERY/STANDBY mode.(Microsoft.SqlServer.Management.LogShipping) Thanks... |
![]() |
| Thread Tools | |
| Display Modes | |
| |