# Oracle database extension for CDB/PDB

**URL:** <https://community.dynatrace.com/t/oracle-database-extension-for-cdb-pdb/48053>\
**Category:** Extensions\
**Tags:** databases, oracle, extensions\
**Created:** [September 30, 2024, 3:20pm UTC](https://community.dynatrace.com/t/oracle-database-extension-for-cdb-pdb/48053 "2024-09-30T15:20:19Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![suhanbongo](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/suhanbongo/32/6192_2.png) [@suhanbongo](https://community.dynatrace.com/u/suhanbongo)\
**Post date:** [September 30, 2024, 3:20pm UTC](https://community.dynatrace.com/t/oracle-database-extension-for-cdb-pdb/48053/1 "2024-09-30T15:20:19Z")

</div>

Hi,

The Oracle database extension page is mention “While the extension supports connecting directly to a Pluggable Database (PDB), our recommended approach is to connect your monitoring configuration to the Container Database (CDB) and **allow the extension to discover all PDBs automatically.** ”

So, where or how can I enable this automatic discovery? During the endpoint configuration, I did not see any option for this.

An Oracle-level user was created with all permissions granted according to the documentation, and it can connect to the CDB, but the PDBs are never listed unless I manually add them as new endpoints.

---

<div class="post-metadata">

**Author:** ![p\_devulapalli](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/p_devulapalli/32/41590_2.png) [@p\_devulapalli](https://community.dynatrace.com/u/p_devulapalli)\
**Post date:** [October 1, 2024, 1:29am UTC](https://community.dynatrace.com/t/oracle-database-extension-for-cdb-pdb/48053/2 "2024-10-01T01:29:48Z")

</div>

Hi&nbsp;[@suhanbongo](https://community.dynatrace.com/user/65925)

In the config, can you please check if you have the&nbsp;multitenancy feature set enabled?

> **[Oracle Database monitoring configuration](https://docs.dynatrace.com/docs/ingest-from/extensions/develop-your-extensions/data-sources/sql/oracle-monitoring)**
>
> Create and activate a monitoring configuration for an SQL data source based extension for Oracle Database.

---

<div class="post-metadata">

**Author:** ![suhanbongo](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/suhanbongo/32/6192_2.png) [@suhanbongo](https://community.dynatrace.com/u/suhanbongo)\
**Post date:** [October 1, 2024, 6:47am UTC](https://community.dynatrace.com/t/oracle-database-extension-for-cdb-pdb/48053/3 "2024-10-01T06:47:00Z")

</div>

Hi,

Yes, it does. In fact, all of the available features are enabled

---

<div class="post-metadata">

**Author:** ![p\_devulapalli](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/p_devulapalli/32/41590_2.png) [@p\_devulapalli](https://community.dynatrace.com/u/p_devulapalli)\
**Post date:** [October 1, 2024, 9:30pm UTC](https://community.dynatrace.com/t/oracle-database-extension-for-cdb-pdb/48053/4 "2024-10-01T21:30:53Z")

</div>

In that case I would review the roles granted to the&nbsp;user account used for monitoring and SELECT permissions on views ,&nbsp; specifically the below

```markup
The monitoring account may need explicit permission over PDBs. For example, you can use this statement:

alter user <your_username> set container_data=all for sys.v_$pdbs container = current;

```

---

<div class="post-metadata">

**Author:** ![suhanbongo](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/suhanbongo/32/6192_2.png) [@suhanbongo](https://community.dynatrace.com/u/suhanbongo)\
**Post date:** [October 2, 2024, 9:40am UTC](https://community.dynatrace.com/t/oracle-database-extension-for-cdb-pdb/48053/5 "2024-10-02T09:40:36Z")

</div>

This is also configured and confirmed by the Oracle administrators.

---

<div class="post-metadata">

**Author:** ![Tom\_sSeroteRoos](https://avatars.discourse-cdn.com/v4/letter/t/bb73d2/32.png) [@Tom\_sSeroteRoos](https://community.dynatrace.com/u/Tom_sSeroteRoos)\
**Post date:** [October 3, 2024, 9:18am UTC](https://community.dynatrace.com/t/oracle-database-extension-for-cdb-pdb/48053/6 "2024-10-03T09:18:10Z")

</div>

Hi [@suhanbongo](https://community.dynatrace.com/user/65925),

We are working on updating the permission documentation as we realize they are not very clear at the moment. As a workaround for now, could you run

```markup
alter user <your_username> set container_data=all container = current;

```

and see if that works? So similar to the command [@p\_devulapalli](https://community.dynatrace.com/user/21657) provided above, but without the specific view name

After running the alter statement, you can also try running the following query from the CDB when logged in as the monitoring user

```markup
SELECT 
                CONT.NAME,
                CAST(CONT.OPEN_TIME AS DATE) AS OPEN_TIME_CASTED,
                CONT.OPEN_MODE,
                CONT.RESTRICTED,
                INST.INSTANCE_NAME,
                CDB.CDB_NAME
            FROM
                GV$CONTAINERS CONT
                JOIN GV$INSTANCE INST ON INST.INST_ID = CONT.INST_ID
                CROSS JOIN (SELECT sys_context('USERENV', 'CDB_NAME') as CDB_NAME FROM DUAL) CDB

```

This is the query we use to detect PDBs, so if it returns all the PDBs, auto-detection should work.

---

<div class="post-metadata">

**Author:** ![suhanbongo](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/suhanbongo/32/6192_2.png) [@suhanbongo](https://community.dynatrace.com/u/suhanbongo)\
**Post date:** [October 3, 2024, 1:25pm UTC](https://community.dynatrace.com/t/oracle-database-extension-for-cdb-pdb/48053/7 "2024-10-03T13:25:58Z")

</div>

Thank you, that solved the issue

---

<div class="post-metadata">

**Author:** ![Peter\_Youssef](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/peter_youssef/32/14668_2.png) [@Peter\_Youssef](https://community.dynatrace.com/u/Peter_Youssef)\
**Post date:** [October 5, 2024, 6:24pm UTC](https://community.dynatrace.com/t/oracle-database-extension-for-cdb-pdb/48053/8 "2024-10-05T18:24:53Z")

</div>

Hello [@suhanbongo](https://community.dynatrace.com/user/65925)

1. First of all you should share the official [Oracle DB Monitoring requirements through extension](https://www.dynatrace.com/hub/detail/oracle-database/?query=oracle+database&filter=all) with Oracle team.
2. Ensure communication is conducted properly between the AGs and Oracle DBs on Port 1521 or the custom port by the customer.
3. Ensure the below commands are properly configured on all Oracle instances to fetch PDBs automatically after configuring CDBs

```auto
SELECT
                CONT.NAME,
                CAST(CONT.OPEN_TIME AS DATE) AS OPEN_TIME_CASTED,
                CONT.OPEN_MODE,
                CONT.RESTRICTED,
                INST.INSTANCE_NAME,
                CDB.CDB_NAME
            FROM
                GV$CONTAINERS CONT
                JOIN GV$INSTANCE INST ON INST.INST_ID = CONT.INST_ID
                CROSS JOIN (SELECT sys_context('USERENV', 'CDB_NAME') as CDB_NAME FROM DUAL) CDB

```

- alter user \<username\> set container\_data=all for sys.gv\_$containers container=current;
- alter user \<username\> set container\_data=all container = current;
- alter user \<your\_username\> set container\_data=all for sys.v\_$pdbs container = current;

It’s tested way of automatically fetching the PDBs after manual configurations of CDBs.

You can save it for future Oracle DB monitoring cases.

KR,

Peter.

---

<div class="post-metadata">

**Author:** ![anne\_platts](https://avatars.discourse-cdn.com/v4/letter/a/c37758/32.png) [@anne\_platts](https://community.dynatrace.com/u/anne_platts)\
**Post date:** [June 19, 2025, 6:33am UTC](https://community.dynatrace.com/t/oracle-database-extension-for-cdb-pdb/48053/9 "2025-06-19T06:33:16Z")

</div>

Hi Peter,

I have checked and rechecked the permissions for the dynatrace DB user account and can connect to the PDB’s but getting a WARNING&nbsp;Polling finished with issues for endpoints: DBHOSTNAME:1521/SERVICE.&nbsp; The extension has visibility of the CDB but I can onty see PDB’s when I configure each individually

AP

---

<div class="post-metadata">

**Author:** ![Tom\_sSeroteRoos](https://avatars.discourse-cdn.com/v4/letter/t/bb73d2/32.png) [@Tom\_sSeroteRoos](https://community.dynatrace.com/u/Tom_sSeroteRoos)\
**Post date:** [June 19, 2025, 7:03am UTC](https://community.dynatrace.com/t/oracle-database-extension-for-cdb-pdb/48053/10 "2025-06-19T07:03:22Z")

</div>

Hi Anne,

If you are sure that you ran

alter user \<your\_username\> set container\_data=all container = current;

for the monitoring user you have configured, double check that when you run the query that Peter mentions above&nbsp;you see all the PDBs (you should run it **as the user you configured in Dynatrace** , using the same connection details as the ones configured in Dynatrace). As mentioned, this is the query the extension runs to discover the PDBs.

If this shows all PDBs but you don’t see them in Dynatrace, please open a support ticket and we’ll help you out&nbsp;🙂

---

<div class="post-metadata">

**Author:** ![siegi\_mueller](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/siegi_mueller/32/16903_2.png) [@siegi\_mueller](https://community.dynatrace.com/u/siegi_mueller)\
**Post date:** [March 24, 2026, 8:08am UTC](https://community.dynatrace.com/t/oracle-database-extension-for-cdb-pdb/48053/11 "2026-03-24T08:08:37Z")

</div>

Unfortunatly it still did not make it into the documentation…

---

<div class="post-metadata">

**Author:** ![Tom\_sSeroteRoos](https://avatars.discourse-cdn.com/v4/letter/t/bb73d2/32.png) [@Tom\_sSeroteRoos](https://community.dynatrace.com/u/Tom_sSeroteRoos)\
**Post date:** [March 24, 2026, 8:16am UTC](https://community.dynatrace.com/t/oracle-database-extension-for-cdb-pdb/48053/12 "2026-03-24T08:16:01Z")

</div>

Hi&nbsp;[@siegi\_mueller](https://community.dynatrace.com/user/27139),

Did you have a look at [this documentation page](https://docs.dynatrace.com/docs/shortlink/oracle-database-extension#requirements)? At the end of the requirements section, we explicit the specific permissions that are needed for PDB auto-discovery.

Kind regards,  
Tomás
