dr-test

Follow

Test activating the standby database

Subcommands

start Backup the standby database and optionally activate it
resume Activate the standby database for testing
reinstate Reinstate the standby database from backup

start

dbvcli dr-test start {-d|--name} CONFIGURATION_NAME [--OPTIONS]

Backup the standby database and optionally activate it

Option

Type

Description

--backup-type

string, required

image or backupset

--backup-format

string

RMAN formatSpec, default value ensures uniqueness

--backup-dir

string

directory to write backup files to

--stop-before-activation

Y or N

Y to backup only, N to backup and activate

Example
[oracle@nzoel19c2 bin]$ ./dbvcli -d orclcdb dr-test start
Connecting to the Control Center at localhost:4433 ✓

Checking available actions for this configuration ✓

Configuration orclcdb (nzoel19c1.oraclekiwi.co.nz -> nzoel19c2.oraclekiwi.co.nz)

┌───────────────┐┌───────────────┐
│               ││               │
│    Primary    ││    Standby    │
│               ││               │
│    ONLINE     ││  RECOVERING   │
│               ││               │
└───────────────┘└───────────────┘

Backup Options 1/3
Two options are available: using an RMAN backupset or making use of RMAN image
copies.
If you are using a backupset, the restore (reinstate) process later will remove
the original standby database files and restore from the backupset created.
If you are using image copies, you will be required to have the same amount of
free local disk space as the current database files occupy.
The advantage of image copies is that you can easily and quickly switch to this
if the need arises, and it can also be used to perform a restore operation.
Note that both of these operations will take time, as a full backup of the
standby database will be performed.

Backup Type:

( ) Image copy
(•) Backupset

Backup Options 2/3
This option allows you to make use of the RMAN formatSpec. For more detail on
the options please see the RMAN documentation. The default value ensures
uniqueness.

Backup Format:

> %U.bkp

Backup Options 3/3
Specify a local disk location that the user running Oracle has permissions to
write backup files to.
If using the backupset option, the backups will be compressed (using default
RMAN compression).
If using the image copy option, you will need to have enough free space
available to hold a complete copy of the standby database.

Backup Directory:

> /home/oracle/temp

Stop Before Activation
Select whether to stop the DR test after the backup of the standby database has
been created.
If you choose Yes, you can use the resume subcommand to resume the DR Test and
activate the standby database.
If you choose No, the standby database will be activated as soon as the backup
is complete.

Stop Before Activation:

( ) Yes
(•) No

Confirmation
The standby database will be activated immediately after the backup is created.
Select Yes to proceed with the DR test, including activating the standby
database, or No to cancel the operation.

Confirm DR Test With Activation:

(•) Yes
( ) No

2024-11-14 15:58:49
2024-11-14 15:58:49  Preparing to test activation of standby database
2024-11-14 15:58:49  Disabling Observer
2024-11-14 15:58:49  done
2024-11-14 15:58:49  Disabling Automated Standby Update
2024-11-14 15:58:49  done
2024-11-14 15:58:50  Running pre-checks please wait...
2024-11-14 15:58:50  done
2024-11-14 15:58:56  Standby database size is 4.74GB. Backing up database might take some time.
2024-11-14 15:58:56  Backing up standby database...
2024-11-14 16:02:00  done
2024-11-14 16:02:00  Validating backup of the standby database...
2024-11-14 16:02:00  done
2024-11-14 16:02:00  Activating now...
2024-11-14 16:03:22  Activation complete. Please ensure a backup of this Database is made
2024-11-14 16:03:22  Old archives from before the activation should be removed to avoid mix-up between new and old archive logs
2024-11-14 16:03:22  Process complete
2024-11-14 16:03:22
Task succeeded

resume

dbvcli dr-test resume {-d|--name} CONFIGURATION_NAME

Activate the standby database for testing

reinstate

dbvcli dr-test reinstate {-d|--name} CONFIGURATION_NAME [--OPTIONS]

Reinstate the standby database from backup

Option

Type

Description

--switch-to-image

Y or N

switch to the image copy (image copy backup only)

Example
[oracle@nzoel19c2 bin]$ ./dbvcli -d orclcdb dr-test reinstate
Connecting to the Control Center at localhost:4433 ✓

Checking available actions for this configuration ✓

Configuration orclcdb (nzoel19c1.oraclekiwi.co.nz -> nzoel19c2.oraclekiwi.co.nz)

┌───────────────┐┌───────────────┐
│               ││               │
│    Primary    ││    Standby    │
│               ││               │
│    ONLINE     ││    ONLINE     │
│               ││               │
└───────────────┘└───────────────┘

This backup was created: 2024-11-14 16:02:00

Name                                        Size  Type
DBV_ORCLCDB_1359_713a4ba1_225_1_1.bkp  477.34 MB  DATA
DBV_ORCLCDB_1359_723a4bbe_226_1_1.bkp  251.37 MB  DATA
DBV_ORCLCDB_1359_733a4bc8_227_1_1.bkp  311.47 MB  DATA
DBV_ORCLCDB_1359_CONTROL.CTL            26.45 MB  CTL

Switch to Image Copy Prompt Skipped (Using Switch to Image Copy: N)

2024-11-14 16:06:25
2024-11-14 16:06:26  Shutting down the database...
2024-11-14 16:07:02  done
2024-11-14 16:07:02  Removing database files...
2024-11-14 16:07:05  done
2024-11-14 16:07:05  Restoring standby control file...
2024-11-14 16:07:52  done
2024-11-14 16:07:52  Starting standby database...
2024-11-14 16:08:28  done
2024-11-14 16:08:28  Restoring standby database...
2024-11-14 16:10:27  done
2024-11-14 16:10:29  Standby database reinstated.
2024-11-14 16:10:29  Finishing DR test
2024-11-14 16:10:29  Applying Automated Standby Update settings
2024-11-14 16:10:29  done
2024-11-14 16:10:29  Automated Standby Update was not enabled prior to task; leaving it disabled.
2024-11-14 16:10:29  Observer was not enabled prior to task; leaving it disabled.
2024-11-14 16:10:29
Task succeeded
Have more questions? Submit a request

Comments