orapwd
and PDB
The orapwd creates
a password file which is used to authenticate the users.
The password
provided for the orapwd and the password of sys can be different and Sys can
login with the password locally .
And the password
given for orapwd comes in only for the REMOTE Login (“@”) .
Changing the
password of the orapwd (password file) will not affect the password of the
local sys user,
But changing the
password of the sys user syncs the password file also.
Lets see an
example :
-
Login
with the sys using the password “oracle3”
--> sqlplus sys/oracle3@sri12c
as sysdba
SQL*Plus: Release 12.1.0.1.0
Production on Fri Jul 26 06:31:22 2013
Copyright (c) 1982, 2013,
Oracle. All rights reserved.
Connected to:
Oracle Database 12c
Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP,
Advanced Analytics and Real Application Testing options
SQL> show user
USER is "SYS"
SQL> show con_name
CON_NAME
------------------------------
CDB$ROOT
SQL>
-
Create a password file with the password “oracle1”
-->
orapwd file=orapwsri12c password=oracle
-
Now lets the passwords,
--> sqlplus sys/oracle3@sri12c as sysdba
ERROR:
ORA-01017: invalid username/password; logon denied
Enter user-name:
sys/oracle1@sri12c as sysdba
Connected to:
Oracle Database 12c
Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP,
Advanced Analytics and Real Application Testing options
SQL> conn sys/oracle3 as
sysdba
Connected.
The connection failed for the old password
when connected using the Network (“@”) and it went fine when we used the
password provided in the orapwd.
Also while using the old password and
logged in locally, it worked.
-
Alter the sys password to oracle3 and let’s
check if the password of the orapwd changes?
SQL> alter user sys
identified by oracle3;
User altered.
SQL> conn sys/oracle3@sri12c
as sysdba
Connected.
It
got changed.
Now 12c PDB, the password file on 12c is for the CDB ,so when
you change the password in the password file for the CDB , it goes the same for
the PDB’s too.
Once the password is changed, the changed password file -password should be used to login from the next time.
And without the password file ,you will not be able to login to
the PDB as we use to login to the PDB as a service “@” .