Even though I chose NOT to use Oracle Managed Files (OMF) during Oracle 19c RAC database creation, I still got OMF spfile and password file 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
I really like to virtualize the two files.
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 instead.
For revert this setting, I first make alias files for current spfile and password file.
1. Make File Alias for Spfile
ASMCMD> cd +DATA/ORCLCDB/PARAMETERFILE
ASMCMD> ls -l
Type Redund Striped Time Sys Name
PARAMETERFILE UNPROT COARSE OCT 30 14:00:00 Y spfile.271.1055166363
ASMCMD> cd ..
ASMCMD> mkalias PARAMETERFILE/spfile.271.1055166363 spfile
ASMCMD> ls -l spfile
Type Redund Striped Time Sys Name
PARAMETERFILE UNPROT COARSE OCT 30 14:00:00 N spfile => +DATA/ORCLCDB/PARAMETERFILE/spfile.271.1055166363
2. 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
3. Modify Both File Locations for Database
[oracle@node1 ~]$ srvctl modify database -d orclcdb -spfile +DATA/ORCLCDB/spfile
[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/spfile
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
[oracle@node1 ~]$ sqlplus / as sysdba
...
SQL> show parameter spfile;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string +DATA/ORCLCDB/spfile
It works.
By the way, if you want to remove the alias files, don't use rm, use rmalias to remove the links instead.