Aaron Digulla
Aaron Digulla

Reputation: 328764

Which user can execute SHOW PDBS on Oracle 18.4?

I'm struggling with creating users in Oracle XE 18.4 when using the official docker image.

This answer suggests to run the command SHOW PDBS but when I connect as user SYSTEM, I don't have the permissions to run this:

SQL> show con_name

CON_NAME
------------------------------
CDB$ROOT
SQL> show pdbs
SP2-0382: The SHOW PDBS command is not available

help show will list it as valid option, though. I can't login as SYS or PDBADMIN (ORA-01017: invalid username/password; logon denied).

I tried to reset the passwords using bash /opt/oracle/setPassword.sh new_password but that doesn't help.

What do I need to do to run show pdbs?

Upvotes: 3

Views: 5128

Answers (1)

Jon Heller
Jon Heller

Reputation: 36902

Although the manual claims the SHOW PDBS command works for any user with "DBA privileges", the support document "SP2-0382: The SHOW PDBS Command Is Not Available (Doc ID 2669189.1)" explains there is a bug and only SYSDBA can use that command.

As a workaround, you can query the same data with V$PDBS instead. (Although the results won't be formatted as nicely.)

select con_id, name, open_mode, restricted from v$pdbs;

Upvotes: 5

Related Questions