Srvctl Modify Database Password
Even though I chose NOT to use Oracle Managed Files (OMF) during Oracle RAC database creation, I still got OMF password file and SPFILE with system-generated names like the following.
[oracle@node1 ~]$ srvctl config database -d orclcdb
Database unique name: ORCLCDB
Database name: ORCLCDB
Oracle home: /u01/app/oracle/product/19.0.0/db_1
Oracle user: oracle
Spfile: +DATA/ORCLCDB/PARAMETERFILE/spfile.271.1055166363
Password file: +DATA/ORCLCDB/PASSWORD/pwdorclcdb.256.1055163645
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools:
Disk Groups: DATA
Mount point paths:
Services:
Type: RAC
Start concurrency:
Stop concurrency:
OSDBA group: dba
OSOPER group: oper
Database instances: ORCLCDB1
Configured nodes: node1
CSS critical: no
CPU count: 0
Memory target: 0
Maximum memory: 0
Default network number for database services:
Database is administrator managed
In this post, our goal is make the password file name common by virtualizing its path. If you have your own password file and want the password file copy into ASM, you have more works to do.
Solution
The best solution is to make a symbolic link that points to the original file, but we have no ln command in ASMCMD. Luckily, we can use mkalias command in ASMCMD instead.
First, I make an alias file for current password file.
1. Make File Alias for Password File
ASMCMD> cd +DATA/ORCLCDB/PASSWORD
ASMCMD> ls -l
Type Redund Striped Time Sys Name
PASSWORD UNPROT COARSE OCT 30 13:00:00 Y pwdorclcdb.256.1055163645
ASMCMD> cd ..
ASMCMD> mkalias PASSWORD/pwdorclcdb.256.1055163645 pwfile
ASMCMD> ls -l pwfile
Type Redund Striped Time Sys Name
PASSWORD UNPROT COARSE OCT 30 13:00:00 N pwfile => +DATA/ORCLCDB/PASSWORD/pwdorclcdb.256.1055163645
ASMCMD> exit
2. Modify File Locations for Database
[oracle@node1 ~]$ srvctl modify database -d orclcdb -pwfile +DATA/ORCLCDB/pwfile
Let's check the result.
[oracle@node1 ~]$ srvctl config database -d orclcdb
Database unique name: ORCLCDB
Database name: ORCLCDB
Oracle home: /u01/app/oracle/product/19.0.0/db_1
Oracle user: oracle
Spfile: +DATA/ORCLCDB/PARAMETERFILE/spfile.271.1055166363
Password file: +DATA/ORCLCDB/pwfile
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools:
Disk Groups: DATA
Mount point paths:
Services:
Type: RAC
Start concurrency:
Stop concurrency:
OSDBA group: dba
OSOPER group: oper
Database instances: ORCLCDB1
Configured nodes: node1
CSS critical: no
CPU count: 0
Memory target: 0
Maximum memory: 0
Default network number for database services:
Database is administrator managed
Let's restart the database to verify the new file.
[oracle@node1 ~]$ srvctl stop database -d orclcdb
[oracle@node1 ~]$ srvctl start database -d orclcdb
Next, let's see how to change SPFILE location by srvctl modify database.