I am connected to pdb and getting the error while trying to change the password of system user
PDB1@ORCL> conn system/oracle
ERROR:
ORA-28002: the password will expire within 7 days
Connected.
PDB1@ORCL>
What I did is connected to root container and changed the password there
PDB1@ORCL> alter user SYSTEM identified by oracle;
alter user SYSTEM identified by oracle
*
ERROR at line 1:
ORA-65066: The specified changes must apply to all containers
PDB1@ORCL> alter user SYSTEM identified by oracle container=all;
alter user SYSTEM identified by oracle container=all
*
ERROR at line 1:
ORA-65050: Common DDLs only allowed in CDB$ROOT
PDB1@ORCL> select con_id, dbid, name, open_mode from v$containers;
CON_ID DBID NAME OPEN_MODE
---------- ---------- ------------------------------ ----------
3 3345156736 PDB1 READ WRITE
PDB1@ORCL>
PDB1@ORCL> show con_id
CON_ID
------------------------------
3
PDB1@ORCL>
PDB1@ORCL> alter session set container=CDB$ROOT;
Session altered.
PDB1@ORCL> show con_id
CON_ID
------------------------------
1
PDB1@ORCL> alter user SYSTEM identified by oracle container=all;
User altered.
PDB1@ORCL> alter session set container=pdb1;
Session altered.
PDB1@ORCL> show con_id
CON_ID
------------------------------
3
PDB1@ORCL> conn system/oracle
Connected.
PDB1@ORCL>
PDB1@ORCL> conn system/oracle
ERROR:
ORA-28002: the password will expire within 7 days
Connected.
PDB1@ORCL>
What I did is connected to root container and changed the password there
PDB1@ORCL> alter user SYSTEM identified by oracle;
alter user SYSTEM identified by oracle
*
ERROR at line 1:
ORA-65066: The specified changes must apply to all containers
PDB1@ORCL> alter user SYSTEM identified by oracle container=all;
alter user SYSTEM identified by oracle container=all
*
ERROR at line 1:
ORA-65050: Common DDLs only allowed in CDB$ROOT
PDB1@ORCL> select con_id, dbid, name, open_mode from v$containers;
CON_ID DBID NAME OPEN_MODE
---------- ---------- ------------------------------ ----------
3 3345156736 PDB1 READ WRITE
PDB1@ORCL>
PDB1@ORCL> show con_id
CON_ID
------------------------------
3
PDB1@ORCL>
PDB1@ORCL> alter session set container=CDB$ROOT;
Session altered.
PDB1@ORCL> show con_id
CON_ID
------------------------------
1
PDB1@ORCL> alter user SYSTEM identified by oracle container=all;
User altered.
PDB1@ORCL> alter session set container=pdb1;
Session altered.
PDB1@ORCL> show con_id
CON_ID
------------------------------
3
PDB1@ORCL> conn system/oracle
Connected.
PDB1@ORCL>
6 comments:
Thanks a lot.
I was struggling a lot for this. It worked perfectly for me. I am using Oracle on virtual box on a mac system.
Bhupendra,
I am grad that this has helped.
Thanks so much. I don't remember encountering this with 11g.
Thanks a bunch!!
I am new to Oracle 12c and you saved me from spending a long time to crack this out.
Very Very helpful :)
thank you for clear instructions. it worked.
Post a Comment