Friday, July 26, 2024

Procedure to manage Oracle Physical Standby Database using DGMGRL for Oracle 19c

Procedure to manage Oracle Physical Standby Database using DGMGRL for Oracle 19c:


*Step 1: Create a Standby Database*


- Create a physical standby database using RMAN duplicate command.

- Ensure the standby database is in recovery mode.


*Step 2: Configure DGMGRL*


- Connect to the primary database using DGMGRL.

- Configure the standby database using the following commands:

```

DGMGRL> CREATE CONFIGURATION 'standby_config';

DGMGRL> ADD DATABASE 'standby_db' AS 'physical_standby';

```

*Step 3: Enable DGMGRL*


- Enable DGMGRL using the following command:

```

DGMGRL> ENABLE CONFIGURATION;

```

*Step 4: Monitor Standby Database*


- Monitor the standby database using the following command:

```

DGMGRL> SHOW DATABASE 'standby_db';

```

*Step 5: Perform Switchover*


- Perform a switchover to the standby database using the following command:

```

DGMGRL> SWITCHOVER TO 'standby_db';

```

*Step 6: Perform Failover*


- Perform a failover to the standby database using the following command:

```

DGMGRL> FAILOVER TO 'standby_db';

```

*Step 7: Reinstate Primary Database*


- Reinstate the primary database using the following command:

```

DGMGRL> REINSTATE 'primary_db';

```

*Step 8: Remove Standby Database*


- Remove the standby database using the following command:

```

DGMGRL> REMOVE DATABASE 'standby_db';

```

*Additional Commands*


- To check the configuration: `DGMGRL> SHOW CONFIGURATION;`

- To check the database status: `DGMGRL> SHOW DATABASE <db_name>;`

- To check the switchover status: `DGMGRL> SHOW SWITCHOVER STATUS;`


Note: Ensure you have the necessary privileges and credentials to perform these operations.


Also, please note that this is a general procedure and you should consult the Oracle documentation and your organization's policies and procedures for specific instructions and guidelines on managing Oracle Physical Standby Database using DGMGRL.