## Copying Log Volumes with Operating System Commands and Starting a Standby Instance as the Active Instance

### Use

If you want to start a standby instance as the active instance, you must first update the standby instance to the most current status of the original instance. To do this, you back up the log area of the original instance and import this log backup into the standby instance. If a problem with the original instance makes it impossible to execute a final log backup, but the log volumes of the original instance are still intact, you can use operating system commands to copy their contents to the volumes of the standby instance.

If you automatically import the log backups from the original instance into the standby instance, then cancel this operation now (recover_cancel). Then you transfer the standby instance to the OFFLINE operational state. Now you copy the log volume of the original instance to the standby instance.

You can now start using the standby instance as the active instance with all the data of the original instance or in a state the instance was in at some point in time in the past.

Database Manager CLI, recover_cancel, db_restart

Concepts of the Database, Standby Database

### Scenario

You have the database instance DEMODB and its standby instance TESTDB. The data volume of DEMODB has stopped working. The log volume of DEMODB is still intact. The log backups from DEMODB are automatically imported into TESTDB. You now want to make TESTDB the active instance with all the data available in DEMODB.

### Prerequisites

● You have set up a standby instance.

● The standby instance has not yet been in the ONLINE operational state.

● The log volumes of the original instance are not damaged.

● The original instance is in the OFFLINE operational state.

### Procedure

...

1. Call the Database Manager CLI, log on as operator OLEG with password MONDAY, connect to the database instance TESTDB:

>dbmcli –u OLEG,MONDAY –d TESTDB

dbmcli on TESTDB>

2. If you automatically import the log backups from the original instance into the standby instance, then cancel this operation now; otherwise continue with step 3.

dbmcli on TESTDB>recover_cancel

OK

3. Transfer the standby instance to the OFFLINE operational state:

dbmcli on TESTDB>db_offline

OK

4. Using operating system commands, copy the files of the log volume from DEMODB to the log volume of TESTDB.

5. Restart the standby instance:

dbmcli on TESTDB>db_restart

OK

### Result

The database instance TESTDB contains the complete dataset of DEMODB. It is in the ONLINE operational state and can be used as the active instance.

To ensure the continued security of the system in case of failure, we recommend that you now set up DEMODB as the standby instance for TESTDB and update it.

See also:

Setting Up and Updating Standby Instances