In non-rac environments, the parameter files of oracle databases are stored in the $ ORACLE_HOMEdbs directory by default. oracle automatically searches for parameter files in the order of spfile $ ORACLE_SID.ora.
In non-rac environments, the parameter files of oracle databases are stored in the $ ORACLE_HOME/dbs directory by default. oracle automatically searches for parameter files in the order of spfile $ ORACLE_SID.ora.
The parameter files used in Oracle startup are generally in the following situations:
1 single instance
1.1 default start:
In non-rac environments, the parameter files of oracle databases are stored in the $ ORACLE_HOME/dbs directory by default. The order in which oracle automatically searches for parameter files is
Spfile $ ORACLE_SID.ora-> spfile. ora-> init $ ORACLE_SID.ora
1.2 manually specify parameter files
You can also manually start non-default pfile and spfile files.
Startup pfile =/u01/oracle/dbs/myinit. ora
If you want to start a non-default spfile file, we recommend that you use the following method:
Pfile startup
Startup pfile =/u01/oracle/dbs/spf_init.ora
Use the SPFILE parameter in the pfile file to specify the position of the spfile file.
Cat/u01/oracle/dbs/spf_init.ora
SPFILE =/u01/oracle/dbs/test_spfile.ora
1.3 parameter files used in ASM and bare Devices
If you use a bare device or ASM to store spfile files, you can modify the default pfile file.
Vi $ ORACLE_HOME/dbs/init $ ORACLE_SID.ora
Spfile = '+ Data/TYOLAP/spfile $ ORACLE_SID.ora'
2 RAC Environment
In the oracle rac environment, the situation is a little complicated. pfile startup is similar to that of a single instance. Each instance has its own pfile file. When spfile is started, it is generally recommended that spfile files be stored in shared storage.
2.1 Sqlplus startup
2.1.1 shared storage is a bare device or ASM
If the shared storage is a bare device, we recommend that you use the pfile connection method in the official documentation. Bare devices are common in the oracle 10g rac version. The method is as follows:
1. Start with the default pfile file of each instance
$ ORACLE_HOME/dbs/init $ ORACLE_SID.ora
2. Point the pfile to the shared SPFILE.
SPFILE = '/dev/vx/rdsk/vg_zw_data1/lv_zw_spfile'
If you use ASM to place the spfile file, point the SPFILE parameter to the path in ASM.
SPFILE = '+ disk_group_name/dbunique_name/spfiledbname. ora'
2.2 Srvctl start
2.2.1 The parameter file is not configured in OCR,
It is started with sqlplus and found in the default directory.
[Oracle @ dtydb5 ~] $ Srvctl config database-d ms4adb-
Database unique name: ms4adb
Database name: ms4adb
Oracle home:/oracle/app/oracle/product/11.2.0/db_1
Oracle user: oracle
Spfile: + DATA/ms4adb/spfiletest. ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: ms4adb
Database instances: ms4adb1, ms4adb2, ms4adb3
Disk Groups: DATA
Mount point paths:
Services:
Type: RAC
Database is enabled
Database is administrator managed