Showing posts with label DATAGUARD. Show all posts
Showing posts with label DATAGUARD. Show all posts

Friday, 30 August 2024

Step by Step Oracle RAC Standby Database Switchover

1. On Primary:

a. Verify there is no log file gap between the primary and the standby database

SELECT status, gap_status 
FROM v$archive_dest_status 
WHERE dest_id = 2;

STATUS    GAP_STATUS
--------- ------------------------
VALID     NO GAP

b. Verify that the primary can be switched to the standby role.

SET lines 4000
SELECT name, log_mode, controlfile_type, open_mode, database_role, switchover_status 
FROM v$database;

NAME      LOG_MODE     CONTROL OPEN_MODE            DATABASE_ROLE    SWITCHOVER_STATUS
--------- ------------ ------- -------------------- ---------------- --------------------
ORADB     ARCHIVELOG   CURRENT READ WRITE           PRIMARY          TO STANDBY

c. Check Temp files match count in Primary and Standby

COL name FOR a45
SELECT ts#, name, status 
FROM v$tempfile;

col name for a45
    select ts#,name,ts#,status  from v$tempfile;
 
 
       TS# NAME                                                 TS# STATUS
---------- --------------------------------------------- ---------- -------
         3 /u01/app/oracle/oradata/ORADB/temp01.dbf               3 ONLINE
         3 /u01/app/oracle/oradata/ORADB/pdbseed/temp012          3 ONLINE
           020-09-03_00-49-51-498-AM.dbf
 
         3 /u01/app/oracle/oradata/ORADB/pdb1/temp01.dbf          3 ONLINE


d. Clear Potential Blocking Parameters & Jobs

SHOW PARAMETER job_queue_processes
ALTER SYSTEM SET job_queue_processes=0 SCOPE=BOTH;

show parameter job_queue_processes         
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
job_queue_processes                  integer     40
 
ALTER SYSTEM SET job_queue_processes=0 SCOPE=BOTH;
System altered.



COL owner FOR a30
COL job_name FOR a40
COL start_date FOR a30
COL end_date FOR a30        
SELECT owner, job_name, start_date, end_date, enabled 
FROM dba_scheduler_jobs 
WHERE enabled='TRUE' AND owner NOT IN 'SYS'

OWNER                JOB_NAME                         START_DATE                     END_DATE                       ENABL
-------------------- -------------------------------- ------------------------------ ------------------------------ -----
ORACLE_OCM           MGMT_CONFIG_JOB                  04-SEP-20 12.53.14.000000 AM +                                TRUE
                                                      04:00
											   
ORACLE_OCM           MGMT_STATS_CONFIG_JOB            04-SEP-20 12.53.14.000000 AM +                                TRUE
                                                      04:00
											   
EXECUTE DBMS_SCHEDULER.DISABLE('ORACLE_OCM.MGMT_CONFIG_JOB');

PL/SQL procedure successfully completed.

EXECUTE DBMS_SCHEDULER.DISABLE('ORACLE_OCM.MGMT_STATS_CONFIG_JOB');

PL/SQL procedure successfully completed.

e. Create Guaranteed Restore Point on Primary and Standby and make sure they are dropped post successful switchover

SHOW PARAMETER db_recovery_file_dest

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest                string      /u01/app/oracle/fra
db_recovery_file_dest_size           big integer 22732M

SQL> show parameter db_recovery_file_dest_size
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest_size           big integer 22732M
 
 
SQL> alter system set db_recovery_file_dest_size=5G;
System altered.
 
SQL> show parameter db_recovery_file_dest_size
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest_size           big integer 5G

SQL> create restore point switchover_restore_point  guarantee flashback database;
 
Restore point created.

select NAME,TIME,GUARANTEE_FLASHBACK_DATABASE,storage_size/1024/1024/1024 from v$restore_point;
 
NAME                           TIME                                     GUA STORAGE_SIZE/1024/1024/1024
------------------------------ ---------------------------------------- --- ---------------------------
SWITCHOVER_RESTORE_POINT       08-FEB-24 10.04.30.000000000 AM          YES                    .1953125


2. On Primary:

a. Switch the Primary to the Standby Role:

ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY WITH SESSION SHUTDOWN;

Database altered.

b. Verify the standby has received the end-of-redo (EOR) log(s) in standby alert log

Alert log sample message :
PR00 (PID:5275): Resetting standby activation ID 2803353007 (0xa717c5af)
2020-09-04T01:32:44.494716+04:00
Media Recovery End-Of-Redo indicator encountered
2020-09-04T01:32:44.494784+04:00
Media Recovery Continuing
PR00 (PID:5275): Media Recovery Waiting for T-1.S-32
2020-09-04T01:32:45.535769+04:00
.... (PID:5531): The Time Management Interface (TMI) is being enabled for role transition
.... (PID:5531): information.  This will result in messages beingoutput to the alert log
.... (PID:5531): file with the prefix 'TMI: '.  This is being enabled to make the timing of
.... (PID:5531): the various stages of the role transition available for diagnostic purposes.
.... (PID:5531): This output will end when the role transition is complete.
SWITCHOVER: received request 'ALTER DATABASE COMMIT TO SWITCHOVER  TO PRIMARY' from primary database.
2020-09-04T01:32:45.536371+04:00
ALTER DATABASE SWITCHOVER TO PRIMARY (oradb_s2)
Maximum wait for role transition is 15 minutes.
TMI: kcv_commit_to_so_to_primary wait for MRP to finish BEGIN 2020-09-04 01:32:45.536801
Switchover: Media recovery is still active
 rmi (PID:5531): Role Change: Canceling MRP - no more redo to apply
2020-09-04T01:32:45.538289+04:00
PR00 (PID:5275): MRP0: Background Media Recovery cancelled with status 16037

c. Shutdown and restart the database in standby mode

[oracle@srv1 ~]$ sqlplus / as sysdba
 
SQL*Plus: Release 19.0.0.0.0 - Production on Thu Feb 8 10:10:15 2024
Version 19.3.0.0.0
 
Copyright (c) 1982, 2019, Oracle.  All rights reserved.
 
Connected to an idle instance.
 
SQL> startup nomount
ORACLE instance started.
 
Total System Global Area 1073738888 bytes
Fixed Size                  9143432 bytes
Variable Size             276824064 bytes
Database Buffers          780140544 bytes
Redo Buffers                7630848 bytes
SQL> alter database mount standby database
  2  ;
 
Database altered.


3. On Standby:

a. Check the MRP process state

Select process,status,sequence# from v$managed_standby;
PROCESS   STATUS        SEQUENCE#
--------- ------------ ----------
ARCH      CLOSING              86
DGRD      ALLOCATED             0
DGRD      ALLOCATED             0
ARCH      CLOSING              94
ARCH      CONNECTED             0
ARCH      CONNECTED             0
MRP0      WAIT_FOR_LOG         95


b. Switch the Standby to Primary

SQL> Alter database commit to switchover to primary with session shutdown;
 
Database altered.
 
SQL> Alter database open;
 
Database altered.
SQL> Select name, open_mode, database_role from v$database;
 
NAME      OPEN_MODE            DATABASE_ROLE
--------- -------------------- ----------------
ORADB     READ WRITE           PRIMARY

4. Start Redo Apply on the new physical standby database

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;
 
Database altered.

5. Enable log shipping on new primary

ALTER SYSTEM SET log_archive_dest_state_2=ENABLE SCOPE=BOTH;

System altered.

6. Set job_queue_processes parameter on new standby database

SHOW PARAMETER job_queue_processes    
ALTER SYSTEM SET job_queue_processes=40 SCOPE=BOTH;

7. Start secondary new primary instance

In case of standalone database no action needed, as we already have database open. Start all the instances in RAC environment which were stopped before start of the activity.
srvctl status database -d prod -v
srvctl start instance -d prod -i prod2
srvctl status database -d prod -v

8. Start secondary new standby instance

In case of standalone database no action needed, as we already have database open in mount mode. Start all the instances in RAC environment which were stopped before start of the activity.
srvctl status database -d stby -v
srvctl start instance -d stby -i stby2
srvctl status database -d stby -v

9. Schedule backups on new primary and create DB links if they exist on primary new

START all cronjobs and DBMS_SCHEDULER jobs

EXECUTE DBMS_SCHEDULER.ENABLE('ORACLE_OCM.MGMT_CONFIG_JOB');

PL/SQL procedure successfully completed.

EXECUTE DBMS_SCHEDULER.ENABLE('ORACLE_OCM.MGMT_STATS_CONFIG_JOB');

PL/SQL procedure successfully completed.

SQL> SELECT OWNER, JOB_NAME, START_DATE, END_DATE, ENABLED FROM DBA_SCHEDULER_JOBS WHERE ENABLED='TRUE' AND OWNER NOT IN 'SYS';
 
OWNER      JOB_NAME                       START_DATE                               END_DATE                       ENABL
---------- ------------------------------ ---------------------------------------- ------------------------------ -----
ORACLE_OCM MGMT_CONFIG_JOB                04-SEP-20 12.53.14.000000 AM +04:00                                     TRUE
ORACLE_OCM MGMT_STATS_CONFIG_JOB          04-SEP-20 12.53.14.000000 AM +04:00                                     TRUE
 

Note: Post switchover, ensure sufficient Temporary tablespace is available on the new primary. If not, add it.

On New Standby:

10. Drop the restore point created earlier

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
 
Database altered.
 
SQL> select NAME,TIME,GUARANTEE_FLASHBACK_DATABASE,storage_size/1024/1024/1024 from v$restore_point;
NAME
--------------------------------------------------------------------------------
TIME                                                                        GUA
--------------------------------------------------------------------------- ---
STORAGE_SIZE/1024/1024/1024
---------------------------
SWITCHOVER_RESTORE_POINT
08-FEB-24 10.04.30.000000000 AM                                             YES
                   .1953125
  
SQL> DROP RESTORE POINT switchover_restore_point;
 
Restore point dropped.
 
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT from session parallel 6;
Database altered.

Sunday, 9 May 2021

Effect of adding datafiles on primary when you don't have sufficient space left on standby database

Effect of adding datafiles on primary when you don't have sufficient space left on standby database
In this demonstration, I will show you how standby behaves when you add a datafile on primary database where standby don't have enough space to replicate that change.
Here are my configuration details.
Primary Server: orcldbvm01 IP :192.168.0.120 Primary CDB :SRCDB
Standby Server: orcldbvm02 IP :192.168.0.121 Standby CDB :TRCDB


Primary database details-


[oracle@orcldbvm01 ~]$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Sat May 1 04:09:41 2021
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle.  All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
SQL> select name,db_unique_name,open_mode,database_role,protection_mode from v$database;
NAME      DB_UNIQUE_NAME                 OPEN_MODE            DATABASE_ROLE    PROTECTION_MODE
--------- ------------------------------ -------------------- ---------------
SRCDB     SRCDB                          READ WRITE           PRIMARY          MAXIMUM AVAILABILITY
SQL> show pdbs
    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 APP1_PRD_PDB                   READ WRITE NO
SQL>



Standby database details-


[oracle@orcldbvm02 ~]$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Sat May 1 04:10:25 2021
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle.  All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

SQL> select name,db_unique_name,open_mode,database_role,protection_mode from v$database;
NAME      DB_UNIQUE_NAME                 OPEN_MODE            DATABASE_ROLE    PROTECTION_MODE
--------- ------------------------------ -------------------- ---------------
SRCDB     TRCDB                          READ ONLY WITH APPLY PHYSICAL STANDBY MAXIMUM AVAILABILITY

SQL> show pdbs
    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 APP1_PRD_PDB                   READ ONLY  NO

SQL> show parameter standby_file_management
NAME                                 TYPE        VALUE
------------------------------------ ----------- ----------------------------
standby_file_management              string      AUTO

SQL> select distinct substr ( name , 1,23) "datafile_location"  from v$datafile;
datafile_location
-----------------------------------------------------------------------------
/u01/app/oracle/oradata

SQL> show parameter db_Create_file_dest
NAME                                 TYPE        VALUE
------------------------------------ ----------- ---------------------------
db_create_file_dest                  string      /u01/app/oracle/oradata

SQL> show parameter db_recovery_file_dest

NAME                                 TYPE        VALUE
------------------------------------ ----------- ----------------------------
db_recovery_file_dest                string      /u02/app/oracle/orafra/fast_recovery_area/
db_recovery_file_dest_size           big integer 12918M

SQL> select SOURCE_DB_UNIQUE_NAME,NAME,VALUE,TIME_COMPUTED from v$dataguard_stats;

SOURCE_DB_UNI NAME                             VALUE            TIME_COMPUTED
------------- -------------------------------- ---------------- ------------------------------
SRCDB         transport lag                    +00 00:00:00     05/01/2021 04:13:36
SRCDB         apply lag                        +00 00:00:00     05/01/2021 04:13:36
SRCDB         apply finish time                +00 00:00:00.000 05/01/2021 04:13:36
              estimated startup time           186              05/01/2021 04:13:36
SQL>


As you can see, my datafiles have been configured under /u01, let's check the free space available.


[oracle@orcldbvm02 ~]$ df -h

Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        967M     0  967M   0% /dev
tmpfs           982M  9.5M  973M   1% /run
tmpfs           982M     0  982M   0% /sys/fs/cgroup
/dev/sda3        25G  7.6G   16G  33% /
/dev/sdb1        30G   16G   14G  55% /u01
tmpfs           197M   28K  197M   1% /run/user/1000
tmpfs           197M  4.0K  197M   1% /run/user/42
/dev/sda1       499M  168M  332M  34% /boot
/dev/sdc1        15G   37M   15G   1% /u02
tmpfs           197M     0  197M   0% /run/user/0

[oracle@orcldbvm02 ~]$


Now using fallocate command, create a large dummy file to fill up the /u01 filesystem.

[oracle@orcldbvm02 ~]$ cd /u01
[oracle@orcldbvm02 u01]$ fallocate -l 13G test.img
[oracle@orcldbvm02 u01]$  df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        967M     0  967M   0% /dev
tmpfs           982M  9.5M  973M   1% /run
tmpfs           982M     0  982M   0% /sys/fs/cgroup
/dev/sda3        25G  7.6G   16G  33% /
/dev/sdb1        30G   29G  457M  99% /u01
tmpfs           197M   28K  197M   1% /run/user/1000
tmpfs           197M  4.0K  197M   1% /run/user/42
/dev/sda1       499M  168M  332M  34% /boot
/dev/sdc1        15G   37M   15G   1% /u02
tmpfs           197M     0  197M   0% /run/user/0

[oracle@orcldbvm02 u01]$



Now we've only 457 MB left in /u01, lets try to add one datafile with size > 457 MB.

At Primary,


SQL> select TABLESPACE_NAME,FILE_NAME from dba_data_files where TABLESPACE_NAME='SYSAUX';

TABLESPACE_NAME                FILE_NAME
------------------------------ ----------------------------------------------
SYSAUX                         /u01/app/oracle/oradata/SRCDB/datafile/o1_mf_sysaux_j1tfb52y_.dbf
SQL>
At standby,

SQL> select TABLESPACE_NAME,FILE_NAME from dba_data_files where TABLESPACE_NAME='SYSAUX';

TABLESPACE_NAME                FILE_NAME
------------------------------ ----------------------------------------------
SYSAUX                         /u01/app/oracle/oradata/TRCDB/datafile/o1_mf_sysaux_j1ypkmx8_.dbf
SQL>


Add one datafile to SYSAUX tablespace.

SQL> alter tablespace SYSAUX add datafile size 600M autoextend on ;

Tablespace altered.

SQL>  select TABLESPACE_NAME,FILE_NAME from dba_data_files where TABLESPACE_NAME='SYSAUX';

TABLESPACE_NAME                FILE_NAME
------------------------------ ----------------------------------------------
SYSAUX                         /u01/app/oracle/oradata/SRCDB/datafile/o1_mf_sysaux_j1tfb52y_.dbf
SYSAUX                         /u01/app/oracle/oradata/SRCDB/datafile/o1_mf_sysaux_j8wxgdyp_.dbf

SQL>



Standby alertlog file reported following errors.


File #33 added to control file as 'UNNAMED00033'.
Originally created as:
'/u01/app/oracle/oradata/SRCDB/datafile/o1_mf_sysaux_j8wxgdyp_.dbf'
Recovery was unable to create the file as a new OMF file.
PR00 (PID:18366): MRP0: Background Media Recovery terminated with error 1274
Non critical error ORA-48113 caught while writing to trace file "/u01/app/oracle/diag/rdbms/trcdb/TRCDB/trace/TRCDB_pr00_18366.trc"
Error message:
Writing to the above trace file is disabled for now...
2021-05-02T05:51:22.622641-04:00
Errors in file /u01/app/oracle/diag/rdbms/trcdb/TRCDB/trace/TRCDB_pr00_18366.trc:
ORA-01274: cannot add data file that was originally created as '/u01/app/oracle/oradata/SRCDB/datafile/o1_mf_sysaux_j8wxgdyp_.dbf'
PR00 (PID:18366): Managed Standby Recovery not using Real Time Apply
2021-05-02T05:51:35.464556-04:00
Recovery interrupted!
2021-05-02T05:51:37.129072-04:00
Non critical error ORA-48180 caught while writing to trace file "/u01/app/oracle/diag/rdbms/trcdb/TRCDB/trace/TRCDB_mz00_18939.trc"
Error message: Linux-x86_64 Error: 28: No space left on device
Additional information: 1
Writing to the above trace file is disabled for now...
2021-05-02T05:51:42.679478-04:00
IM on ADG: Start of Empty Journal
IM on ADG: End of Empty Journal
Recovered data files to a consistent state at change 4792358
stopping change tracking
2021-05-02T05:51:42.682605-04:00
Errors in file /u01/app/oracle/diag/rdbms/trcdb/TRCDB/trace/TRCDB_pr00_18366.trc:
ORA-01274: cannot add data file that was originally created as '/u01/app/oracle/oradata/SRCDB/datafile/o1_mf_sysaux_j8wxgdyp_.dbf'
2021-05-02T05:51:42.728424-04:00
Background Media Recovery process shutdown (TRCDB)


As you could see MRP has been crashed.


SQL> select name,db_unique_name,open_mode,database_role,protection_mode from v$database; NAME DB_UNIQUE_NAME OPEN_MODE DATABASE_ROLE PROTECTION_MODE ---------- ---------------- -------------------- ---------------- ----------- SRCDB TRCDB READ ONLY PHYSICAL STANDBY MAXIMUM AVAILABILITY SQL> SELECT PROCESS,STATUS, THREAD#,SEQUENCE#, BLOCK#, BLOCKS FROM V$MANAGED_STANDBY ; PROCESS STATUS THREAD# SEQUENCE# BLOCK# BLOCKS --------- ------------ ---------- ---------- ---------- ---------- DGRD ALLOCATED 0 0 0 0 ARCH CLOSING 1 60 28672 366 DGRD ALLOCATED 0 0 0 0 ARCH CLOSING 1 62 6144 395 ARCH CLOSING 1 59 1 32 ARCH CLOSING 1 63 8192 959 RFS IDLE 1 0 0 0 RFS IDLE 1 64 5682 1 RFS IDLE 0 0 0 0 RFS IDLE 0 0 0 0 10 rows selected. SQL> select file#,name from v$datafile where name like '%UNNAMED%'; FILE# NAME ---------- ------------------------------------------------------------------ 33 /u01/app/oracle/product/version/db_1/dbs/UNNAMED00033 SQL> select TABLESPACE_NAME,FILE_NAME from dba_data_files where TABLESPACE_NAME='SYSAUX'; TABLESPACE_NAME FILE_NAME ------------------------------ ---------------------------------------------- SYSAUX /u01/app/oracle/oradata/TRCDB/datafile/o1_mf_sysaux_j1ypkmx8_.dbf SQL>

Let's recover the datafile which is created with name '%UNNAMED%'. For that remove the dummy file created.

[oracle@orcldbvm02 u01]$ rm -rf test.img

[oracle@orcldbvm02 u01]$ df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        967M     0  967M   0% /dev
tmpfs           982M  9.6M  973M   1% /run
tmpfs           982M     0  982M   0% /sys/fs/cgroup
/dev/sda3        25G  7.6G   16G  33% /
/dev/sdb1        30G   17G   14G  56% /u01
tmpfs           197M   28K  197M   1% /run/user/1000
tmpfs           197M  4.0K  197M   1% /run/user/42
/dev/sda1       499M  168M  332M  34% /boot
/dev/sdc1        15G   37M   15G   1% /u02
tmpfs           197M     0  197M   0% /run/user/0
[oracle@orcldbvm02 u01]$


Now we've enough space in /u01, let's create the datafile.


[oracle@orcldbvm02 u01]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Sun May 2 06:02:25 2021
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle.  All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

SQL> show parameter standby_file_management

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
standby_file_management              string      AUTO

SQL> alter system set standby_file_management='MANUAL';
System altered.

SQL> show parameter standby_file_management

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
standby_file_management              string      MANUAL

SQL> alter database create datafile '/u01/app/oracle/product/version/db_1/dbs/UNNAMED00033' as new;
Database altered.

SQL>  select TABLESPACE_NAME,FILE_NAME from dba_data_files where TABLESPACE_NAME='SYSAUX';

TABLESPACE_NAME               FILE_NAME
----------------------------- -----------------------------------------------
SYSAUX                        /u01/app/oracle/oradata/TRCDB/datafile/o1_mf_sysaux_j1ypkmx8_.dbf

SQL>


Start managed recovery.

SQL> recover managed standby database disconnect from session;
Media recovery complete.

SQL> SELECT PROCESS,STATUS, THREAD#,SEQUENCE#, BLOCK#, BLOCKS FROM V$MANAGED_STANDBY ;

PROCESS   STATUS          THREAD#  SEQUENCE#     BLOCK#     BLOCKS
--------- ------------ ---------- ---------- ---------- ----------
DGRD      ALLOCATED             0          0          0          0
ARCH      CLOSING               1         60      28672        366
DGRD      ALLOCATED             0          0          0          0
ARCH      CLOSING               1         62       6144        395
ARCH      CLOSING               1         59          1         32
ARCH      CLOSING               1         63       8192        959
RFS       IDLE                  1          0          0          0
RFS       IDLE                  1         64     111491          2
RFS       IDLE                  0          0          0          0
RFS       IDLE                  0          0          0          0
MRP0      APPLYING_LOG          1         64      18832     409600
11 rows selected.

SQL> select TABLESPACE_NAME,FILE_NAME from dba_data_files where TABLESPACE_NAME='SYSAUX';

TABLESPACE_NAME               FILE_NAME
----------------------------- -----------------------------------------------
SYSAUX                        /u01/app/oracle/oradata/TRCDB/datafile/o1_mf_sysaux_j1ypkmx8_.dbf
SYSAUX                        /u01/app/oracle/oradata/TRCDB/datafile/o1_mf_sysaux_j8wybm5n_.dbf

SQL> alter system set standby_file_management='AUTO';
System altered.
SQL>


Standby has successfully recovered the datafile which was originally created with 'UNNAMED%' name.






I hope this article helped you. Your suggestions/feedback are most welcome.

Keep learning... Have a great day!!!


Thank you,
Amit Pawar
Email: amitpawar.dba@gmail.com
WhatsApp No: +91-8454841011