How Srvctl Modify Database SPFILE

Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
  • User AvatarANKUSH THAVALI
  • 26 Oct, 2023
  • 0 Comments
  • 1 Min Read

How Srvctl Modify Database SPFILE

In this post, we didn’t move the actual SPFILE, we just make a link to redirect it to the actual location. Follow the below steps :
    1. 1.   Make File Alias for Spfile.

ASMCMD> cd +DATA/PRIM/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/PRIM/PARAMETERFILE/spfile.271.1055166363
ASMCMD> exit

Modify SFILE Location for Database :


[oracle@node1 ~]$ srvctl modify database -d PRIM -spfile +DATA/PRIM/spfile

Let’s check the result.

[oracle@node1 ~]$ srvctl config database -d PRIM
Database unique name: PRIM
Database name: PRIM
Oracle home: /u01/app/oracle/product/19c/db_1
Oracle user: oracle
Spfile: +DATA/PRIM/spfile
Password file: +DATA/PRIM/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: PRIM1
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 PRIM
[oracle@node1 ~]$ srvctl start database -d PRIM
[oracle@node1 ~]$ sqlplus / as sysdba
...
SQL> show parameter spfile;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      +DATA/PRIM/spfile

Please Note :

 if you want to remove the alias files, don’t use rm, use rmalias command in ASMCMD to remove the links instead.

Hope it Helps!