11g 以上rac创建spfile
由于各种原因 rac数据库需要创建spfile
创建spfile时不指定位置,spfile创建成功但是不会生效
SQL> create spfile from pfile='/home/oracle/pfile0407'; File created. SQL> show parameter spfile; NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ spfile string +DATADG/QDTAIS/PARAMETERFILE/s pfile.268.1066893759 [ods1]@ht01[/home/oracle]$srvctl config database -d qdtais Database unique name: qdtais Database name: qdtais Oracle home: /u01/app/oracle/product/19c/dbhome_1 Oracle user: oracle Spfile: +DATADG/QDTAIS/PARAMETERFILE/spfile.268.1066893759 Password file: +DATADG/QDTAIS/PASSWORD/pwdqdtais.256.1066893211 Domain: Start options: open Stop options: immediate Database role: PRIMARY Management policy: AUTOMATIC Server pools: Disk Groups: ARCHDG,DATADG Mount point paths: Services: Type: RAC Start concurrency: Stop concurrency: OSDBA group: dba OSOPER group: oper Database instances: ods1,ods2 Configured nodes: ht01,ht02 CSS critical: no CPU count: 0 Memory target: 0 Maximum memory: 0 Default network number for database services: Database is administrator managed ASMCMD> ls -lrt WARNING:option 'r' is deprecated for 'ls' please use 'reverse' Type Redund Striped Time Sys Name PARAMETERFILE UNPROT COARSE APR 07 20:00:00 Y spfile.268.1066893759 PARAMETERFILE UNPROT COARSE APR 07 20:00:00 Y spfile.269.1101413259
需要指定具体磁盘组后 spfile后生效,写入srvctl 配置参数里面,
PARAMETERFILE目录会自动创建
SQL> create spfile='+DATADG' from pfile='/home/oracle/pfile0407'; File created. SQL> show parameter spfile; NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ spfile string +DATADG/QDTAIS/PARAMETERFILE/s pfile.269.1101413781 [ods1]@ht01[/home/oracle]$srvctl config database -d qdtais Database unique name: qdtais Database name: qdtais Oracle home: /u01/app/oracle/product/19c/dbhome_1 Oracle user: oracle Spfile: +DATADG/QDTAIS/PARAMETERFILE/spfile.269.1101413781 Password file: +DATADG/QDTAIS/PASSWORD/pwdqdtais.256.1066893211 Domain: Start options: open Stop options: immediate Database role: PRIMARY Management policy: AUTOMATIC Server pools: Disk Groups: ARCHDG,DATADG Mount point paths: Services: Type: RAC Start concurrency: Stop concurrency: OSDBA group: dba OSOPER group: oper Database instances: ods1,ods2 Configured nodes: ht01,ht02 CSS critical: no CPU count: 0 Memory target: 0 Maximum memory: 0 Default network number for database services: Database is administrator managed