Changing Password file in Oracle RAC
1. First check the current configuration of the system and the password file location .
[oracle@rac1-test ~]$ srvctl config database -d testdb
Database unique name: testdb
Database name: testdb
Oracle home: /home/oracle/DB/19.0.0/db_home
Oracle user: oracle
Spfile: +DATA/testdb/PARAMETERFILE/spfile.295.1172710733
Password file: +DATA/testdb/PASSWORD/pwdtestdb.318.1178841871
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools:
Disk Groups: DATA,ARCH
Mount point paths:
Services:
Type: RAC
Start concurrency:
Stop concurrency:
OSDBA group: oinstall
OSOPER group: oinstall
Database instances: testdb1,testdb2
Configured nodes: rac1-test,rac2-test
CSS critical: no
CPU count: 0
Memory target: 0
Maximum memory: 0
Default network number for database services:
Database is administrator managed
[oracle@rac1-test ~]$
2. Take Backup of the Password file
asmcmd
ASMCMD> pwcopy +DATA/BROK/PASSWORD/pwdbrok.256.1108650351 ‘/tmp’
copying +DATA/BROK/PASSWORD/pwdbrok.256.1108650351 -> /tmp/pwdbrok.256.1108650351
OR
cp +DATA/BROK/PASSWORD/pwdbrok.256.1108650351 ‘/tmp’
3. Modify the password parameter from the OCR.
srvctl modify database -d testdb -pwfile
4. Verify the changes again.
[oracle@rac1-test ~]$ srvctl config database -d testdb
Database unique name: testdb
Database name: testdb
Oracle home: /home/oracle/DB/19.0.0/db_home
Oracle user: oracle
Spfile: +DATA/testdb/PARAMETERFILE/spfile.295.1172710733
Password file:
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools:
Disk Groups: DATA,ARCH
Mount point paths:
Services:
Type: RAC
Start concurrency:
Stop concurrency:
OSDBA group: oinstall
OSOPER group: oinstall
Database instances: testdb1,testdb2
Configured nodes: rac1-test,rac2-test
CSS critical: no
CPU count: 0
Memory target: 0
Maximum memory: 0
Default network number for database services:
Database is administrator managed
5. Add the new password file now.
orapwd file=’+DATA’ dbuniquename=’testdb’
it will prompt for the SYS password
once entered it will create a password file.
check the password file parameter using
srvctl config database -d testdb
6. Change the password in the database also (this will allow client to connect to the database).
Case:-
If we have an authentication enabled when logging into the database directly through the instance so password with “@” will not connect:-
Solution:-
To connect database in such cases we will have to disable the (SQLNET.Authentication service=NONE) parameter in the sqlnet.ora file
connect to the database as sys and change the password as:_
alter user sys identified by new_password;
7. Once done we can check the password by connecting through toad or any other client, and on database as:-
conn sys/new_passowrd
————————- this should work ——————————