Oracle Discovery retrieves DB_UNIQUE_NAME during pattern execution but does not persist to Oracle Instance CI / ECC payloadIssue Oracle Discovery retrieves DB_UNIQUE_NAME during pattern execution but does not persist to Oracle Instance CI / ECC payload Symptoms When running the Oracle DB On Unix pattern, the db_unique_name is successfully retrieved during the initial execution steps and is visible in debug mode, but the value is ultimately empty in the final discovery payload. As a result, it is not persisted to the Oracle Instance CI, which can cause subsequent Business Rules or integrations to fail. Observations during pattern execution: 1. The value is temporarily visible during the "Update Live Oracle Instance" step (often populated by custom or shared libraries). 2. The Out-Of-The-Box (OOTB) step "get db name and db unique name Unix with SID" fails with Oracle errors: ORA-01034 (Oracle not available) or ORA-27101 (Shared memory realm does not exist), despite the database being online. 3. The fallback Clusterware execution step via srvctl fails with error: PRCZ-3002 ("failed to locate Oracle base") Release All Releases Cause This issue is caused by a simultaneous failure of both the primary (SID-based) and secondary (srvctl-based) connection routes within the OOTB pattern, compounded by restrictive OS-level folder permissions. 1. The Local SID-Based Connection Failure (Symlink vs. Real Path) The Oracle databases are registered and started using a symbolic link (e.g., /u01/app/oracle/191), which points to a real installation path (e.g., /u01/app/oracle/19.3.0.0/db). During discovery, the pattern identifies $ORACLE_HOME by looking at the running pmon process. The OS resolves this process to the real path, not the symlink. Oracle strictly ties local DB connections to the exact $ORACLE_HOME string used to start the instance. Because the pattern attempts to connect using the real path, Oracle rejects the connection and reports "Connected to an idle instance" (resulting in ORA-01034 / ORA-27101). 2. The Fallback srvctl Connection Failure (Missing ACLs) When the SID-based connection fails, the pattern automatically falls back to retrieving database details from Clusterware via srvctl. srvctl requires reading the orabasetab file located at $ORACLE_HOME/install/orabasetab. If the /install/ directory lacks appropriate Access Control Lists (ACLs) for the MID Server discovery user (e.g., permissions set to drwxrwx--- oracle:oinstall), the user cannot read the file. Consequently, srvctl throws PRCZ-3002, leaving the pattern with no route to query the database. Why was the value visible earlier in the pattern? A preceding custom or shared library step may connect successfully by hardcoding or utilizing the symlink path. However, the subsequent OOTB "Extend Oracle Instance" step runs its own query using the resolved real path. Because this OOTB query fails on both connection routes, it overwrites the variable with an empty result just before generating the final ECC payload Resolution To resolve this issue without altering the database sqlnet.ora configuration, the DBA team must grant the MID Server discovery user read and execute access to the $ORACLE_HOME/install directory and its contents via OS-level ACLs. Run the following commands on the affected Unix host (replace <discovery_user> with the actual MID Server credential username, and update the path to the real $ORACLE_HOME path): # Grant Read/Execute on the install directory setfacl -m u:<discovery_user>:rx /u01/app/oracle/<version_path>/db/install # Grant Read on the orabasetab file setfacl -m u:<discovery_user>:r /u01/app/oracle/<version_path>/db/install/orabasetab Once the ACLs are applied, run a Quick Discovery against the host. The fallback srvctl command will successfully read the orabasetab file, retrieve the database details, and populate the db_unique_name on the Oracle Instance CI.