Bani Shehi
Bani Shehi

Reputation: 1

A problem while getting access for hr in sql developer

I am a student and I have a project in the oracle database. I am trying to get access in hr schema and I am using cmd to do that, but I have an issue. I want to see the name and the con_id of v$pdbs but when I execute the select command of this table, it shows no value just like that

enter image description here

Thank you very much for your consideration. I would be very happy if someone helps me with this issue.

Upvotes: 0

Views: 212

Answers (1)

Barbaros Özhan
Barbaros Özhan

Reputation: 65363

For a pluggable DB, you need to set the container first in order to alter a user

Check your current container( most probably it would return the CDB$ROOT container ) :

SQL> SHOW CON_NAME

List available containers :

SQL> SELECT name,open_mode FROM v$containers;

and then set the desired one among listed containers :

SQL> ALTER SESSION SET CONTAINER = PDB1;  

Now you can alter user as you did in the question.

Upvotes: 1

Related Questions