An automated process that refreshes a Development database from Production by doing a RMAN duplicate failed with ‘RMAN-06403: could not obtain a fully authorized session’:
Starting Duplicate Db at 25-JUL-2017 17:44 RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of Duplicate Db command at 07/25/2017 17:44:46 RMAN-05501: aborting duplication of target database RMAN-06403: could not obtain a fully authorized session RMAN-04006: error from auxiliary database: ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist Linux-x86_64 Error: 2: No such file or directory Additional information: 3651 Additional information: 1054940735
This was initially puzzling as nothing appeared to have changed. A ‘My Oracle Support’ (MOS) search, revealed the following MOS note:
Duplicating database using RMAN fails with errors RMAN-06403, RMAN-04006, ORA-01034, ORA-27101 (Doc ID 274233.1)
The errors are occurring because the auxiliary database is not started in nomount state.
The auxiliary instance must be in a nomount state during duplication of database using RMAN.
Startup the auxiliary instance in nomount state. Then try to duplicate the database again.
SQL> connect / as sysdba
Also you have to verify the following:
1. Ensure that the ORACLE_SID and ORACLE_HOME were set correctly when starting the auxiliary instance. Especially any additional backslash at the end of the ORACLE_HOME can cause mismatches
2. Verify that the ORACLE_HOME directory is not a linked directory.
Make a hard copy of the init.ora in the ORACLE_HOME/dbs directory.
3. Double check the ‘listener.ora’ and ‘tnsnames.ora’ for correctness.”
The database was in nomount state started with a basic pfile:
But upon checking point 3, I noticed the static listener registration that is required as the database is in nomount and thus doesn’t register with the listener had the wrong home:
SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = V1DEV1) (GLOBAL_DBNAME = V1DEV) (ORACLE_HOME = /u01/app/oracle/product/220.127.116.11/dbhome_1) ) )
I recently changed the Oracle Home to use the dbhome_2 Oracle Home, so that the Development databases were not locked in with the DR databases using the dbhome_1 Oracle Home. This allows for independent patching between the Oracle Homes, which allows soak testing of patches in Development before applying to Production:
Once this was changed:
SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = V1DEV1) (GLOBAL_DBNAME = V1DEV) (ORACLE_HOME = /u01/app/oracle/product/18.104.22.168/dbhome_2) ) )
It started working again 🙂 :
Starting Duplicate Db at 26-JUL-2017 11:38 allocated channel: ORA_AUX_DISK_1 channel ORA_AUX_DISK_1: SID=515 device type=DISK allocated channel: ORA_AUX_DISK_2 channel ORA_AUX_DISK_2: SID=1475 device type=DISK allocated channel: ORA_AUX_DISK_3 channel ORA_AUX_DISK_3: SID=643 device type=DISK allocated channel: ORA_AUX_DISK_4 channel ORA_AUX_DISK_4: SID=835 device type=DISK current log archived
If you found this blog post useful, please like as well as follow me through my various Social Media avenues available on the sidebar and/or subscribe to this oracle blog via WordPress/e-mail.
Zed DBA (Zahid Anwar)