Autoconfig failed with the below error in one of our Oracle EBS Database instances while cloning.
Connected.
from ebs_system.fnd_oracle_userid
*
ERROR at line 17:
ORA-06550: line 17, column 23:
PL/SQL: ORA-00942: table or view does not exist
ORA-06550: line 16, column 5:
PL/SQL: SQL Statement ignored
ORA-06550: line 124, column 5:
PLS-00201: identifier 'EBS_SYSTEM.AD_DIR_OBJ_UTIL' must be declared
ORA-06550: line 124, column 5:
PL/SQL: Statement ignored
While troubleshooting in various ways, found that exporting ORACLE_PDB_SID is not working.
[oracle@ebsdb ~]$ export ORACLE_PDB_SID=anwp1
[oracle@ebsdb ~]$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Thu Jan 12 00:20:34 2023
Version 19.17.0.0.0
Copyright (c) 1982, 2022, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.17.0.0.0
SQL> show con_name
CON_NAME
------------------------------
CDB$ROOT
Resolution:
We need to set "_system_trig_enabled" parameter to true to make export ORACLE_PDB_SID work and run autconifg by exporting ORACLE_PDB_SID=<pdb_name>.
After setting the above parameter to TRUE:
[oracle@ebsdb ~]$ export ORACLE_PDB_SID=anwp1
[oracle@ebsdb ~]$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Thu Jan 12 00:39:08 2023
Version 19.17.0.0.0
Copyright (c) 1982, 2022, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.17.0.0.0
SQL> show con_name
CON_NAME
------------------------------
anwp1
Please find the Oracle reference note id for the same:
Export ORACLE_PID_SID=PDBSID Connects To CBD$ROOT instead of PDB (Doc ID 2826170.1)
So, finally, the thing we need to understand here is, even if we run auto-config by sourcing the PDB env file, it uses the
ORACLE_PDB_SID to connect to the pluggable database to run the auto-config. Here, in my case, it was not working due to
"_system_trig_enable" was set to "FALSE" which disables the system triggers after certain events happen.