Friday , November 22 2024

Recovering a Datafile Deleted in Primary with Standby

We can recover a datafile that is corrupted or deleted in the Primary Database, or from a datafile in the Standby Database, which is briefly damaged.

Since our topic is Standby, in this section, we will restore a damaged Datafile using the Standby database.

Let’s Test

1. To set up the test environment, we first create a Tablespace on the Primary side.

2. We check if Tablespace is formed in Primary and Physical Standby.

The reason for adding Datafile to Physical Standby automatically is because STANDBY_FILE_MANAGEMENT parameter is in AUTO and DB_FILE _NAME_CONVERT parameter on Standby side is (Primary,Physical).

3. A table is created as the tablespace that creates the tablespace.

4. We check if the table is formed.

5. A disaster situation is created by changing the datafile.

6. We close the primary database with Abort.

7. Primary database is requested to be opened.

8. The database gave the expected error and did not open. We question his status.

When switching to OPEN mode, the database could not switch to OPEN mode because it opened Datafile and remained in MOUNT mode.

9. Datafile is taken offline.

10. The database opens.

11. The status of the problematic Datafile is questioned.

12. From RMAN, it is connected to Physical Standby as TARGET and to Primary as Auxiliary. The reason for connecting like this is taking backup of Datafile in Physical Standby.

13. Backup of problematic Datafile is taken.

14. Connects from RMAN to Primary as TARGET and to Catalog.

15. I saved the received backup to the catalog.

16. I change the name of the Datafile and recover it.

17. I’m taking Tablespace online.

18. Checking the functionality of Tablespace.

19. I am converting the name of Datafile to standard format.

20. I’m querying the status of the configuration from the broker.

21. Tests are passed.

a. Log Switch operation is tested. Previously, the existing archive sequence numbers are queried.

b. The archive sequence numbers are checked by performing the Log Switch operation.

 

 

 

 

Loading

About Onur ARDAHANLI

Leave a Reply

Your email address will not be published. Required fields are marked *