2

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?

Jon Heller
  • 34,999
  • 6
  • 74
  • 132
Aaron Digulla
  • 321,842
  • 108
  • 597
  • 820

1 Answers1

4

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;
Jon Heller
  • 34,999
  • 6
  • 74
  • 132