All technological notes.
To start a database instance, Oracle Database must read:二选一
server parameter file, which is recommended,text initialization parameter file, which is a legacy implementation.Without theses file, instance cannot start.
parameter file:
files location: $ORACLE_HOME/dbs

Automatically search order for a paramter file when an instance is started up: 自动寻找顺序
spfile<sid>.oraspfile.orainit<sid>.oracan create pfile from spfile but you should name it Init<sid>.ora in order the instance can use it automatically incase the spfile not available.自动寻找时, 需要命名.
If you name it another name, then you have to specify it during startup: Startup pfile=pfilename否则必须使用参数 pfile
server parameter file
characteristics:
server parameter file exists for a database. This file must reside on the database host.必须在 DB 服务器上alter system command for changing ParametersCreation:
CREATE SPFILE statement.Database Configuration Assistant.
DBCA when you create CDB.Default name for spfile: spfile<sid>.ora
text initialization parameter file
key=value pairs, one per line.characteristics:
ALTER SYSTEM are only in effect for the current instance.
Sample pfile name : init.ora

注意 pfile 是在连接 DB 的客户端上, spfile 是在 DB 服务器上.
V$SPPARAMETERV$SPPARAMETER:
If a server parameter file was not used to start the instance, then each row of the view will contain FALSE in the ISSPECIFIED column.
Used to view the parameters in the spfile within the Oracle.无需退出 oracle, 即可查阅 spfile.
SELECT *
FROM v$spparameter
WHERE isspecified='TRUE';
V$SPPARAMETERshow con_name;
# CON_NAME
# ------------------------------
# CDB$ROOT
select name,value,isses_modifiable , issys_modifiable , ispdb_modifiable ,ISDEFAULT,con_id
from V$system_PARAMETER
where name='open_cursors';
# open_cursors 410 FALSE IMMEDIATE TRUE FALSE 0
# ISDEFAULT indicates the value is coming from the spfile.
alter system set open_cursors=310 container=all scope=memory;
# open_cursors 310 FALSE IMMEDIATE TRUE FALSE 0
# only in memory, not in the spfile
select * from V$SPPARAMETER
where name='open_cursors';
# * open_cursors integer 410 410 TRUE 1 1
# ISSPECIFIED is true, indicating the 410 is specified in the spfile.
SELECT *
FROM v$spparameter
WHERE isspecified='TRUE';






ORA-01078: failure in processing system parametersLRM-00109: could not open parameter file '/u01/app/oracle/product/19.0.0/dbhome_1/dbs/initorcl.ora'


CREATE PFILE='initorcl.ora' FROM SPFILE;

$ORACLE_HOME/dbs

show parameter spfile;



$ORACLE_HOME/dbsCREATE PFILE='test.ora' FROM SPFILE;
*.max_idle_time=10

startup pfile=/u01/app/oracle/product/19.0.0/dbhome_1/dbs/test.ora
show parameter spfile
show parameter max_idle_time
