'How to connect as an user under PDB, using Oracle SQL Developer, to generate ERD for those table stored in PDB

Using Oracle XE 18c Home, when login in sqlplus like / as sysdba I would be land on CDB$ROOT, and can't retrieve tables created with user001 that parked under XEPDB1, same to SQL Developer, but...

in order to view those table in sqlplus, I could have these

/ as sysdba
connect user001/user001@localhost/xepdb1

then I can retrieve my data.

Now come into SQL Developer, even though I connect successfully as user001 using query (initially connect as sysdba), the tables still do not appear at database explorer, no way for me to create ERD.



Solution 1:[1]

<username>/<password>@<hostname>:<port_number>/<servicename>
sysdba/[email protected]:1521/xepdb1

hence when setting up connection, use the default service name come along with the default pluggable db, both named as XEPDB1, so no need to create a custom one to connect a certain db. If want to create custom service for any db except PDB$SEED, pls refer to this site that helped me: https://dbaliveblog.wordpress.com/establish-connections-to-cdbs-and-pdbs/

When it's all about no clarification from lecturer nor practical slides nor I know the fastest way to solve it, posting here is just to help students

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 null