Skip to main content

Database asset name doesn't match service name

Why Oracle database asset in Atlan shows different name than service name used to connect?

When you configure an Oracle connection in Atlan using a service name (for example, <service_name>), Atlan names the resulting database asset using the value returned by Oracle's SYS_CONTEXT('USERENV', 'DB_NAME') function—not the service name itself. If the internal database name that Oracle reports differs from your service name, the asset in Atlan appears under that internal name (for example, <internal_db_name>) rather than the service name you expect.

This is expected behavior: Atlan uses the authoritative name Oracle returns at the session level to identify the database, ensuring consistent asset identity across connections that may use different service names to reach the same underlying database.

There are two common reasons why the internal name and service name differ.


What causes name mismatch?

Container Database / Pluggable Database (CDB/PDB)

In a multitenant Oracle architecture, a single Container Database (CDB) hosts one or more Pluggable Databases (PDBs). Each PDB typically has its own service name (for example, <service_name>), which is what you connect to. However, DB_NAME at the session level returns the name of the CDB, not the PDB. As a result, the database asset in Atlan reflects the CDB name (<internal_db_name>) even though you connected using the PDB service name.

RMAN clone

When a database is cloned from another using Oracle Recovery Manager (RMAN) without explicitly renaming the internal database name, the clone retains the original database's DB_NAME. The clone may be served under a new service name, but DB_NAME still returns the source database's name—leading to the same mismatch.


How can I diagnose which scenario applies to my database?

Run the following query as your Oracle user, connected to the same service name you used when setting up the Atlan connector:

SELECT d.name AS cdb_name,
p.name AS pdb_name,
sys_context('USERENV', 'CON_NAME') AS con_name,
sys_context('USERENV', 'DB_NAME') AS db_name
FROM v$database d
LEFT JOIN v$pdbs p
ON p.con_id = sys_context('USERENV', 'CON_ID');

How do I interpret query results?

ColumnWhat it shows
cdb_nameThe name of the Container Database (the value DB_NAME returns). This is the name Atlan uses for the database asset.
pdb_nameThe name of the Pluggable Database you are connected to, if any. NULL if this isn't a CDB/PDB setup.
con_nameThe name of the current container session context. In a PDB connection this is the PDB name; in a non-CDB it matches DB_NAME.
db_nameThe internal database name Oracle reports for the session — the value Atlan uses to name the database asset.

Interpreting the results:

  • If pdb_name isn't NULL and differs from cdb_name, you're in a CDB/PDB setup. Your service name (<service_name>) routes connections to the PDB, but Atlan sees the CDB name (<internal_db_name>) from DB_NAME.
  • If pdb_name is NULL and db_name doesn't match your service name, the database was likely cloned via RMAN without updating the internal database name.

What next?

Share the output of the diagnostic query with Atlan Support. The support team can advise on the appropriate next step for your environment, which may include reconfiguring the connection to reference the correct internal database name or adjusting how the asset is identified in your Atlan workspace.