Note_Tech

All technological notes.


Project maintained by simonangel-fong Hosted on GitHub Pages — Theme by mattgraham

DBA - Instance: Parameter File

Back


Parameter File

parameter_file_diagram


Server Parameter Files


Text Initialization Parameter Files

parameter_file_diagram

注意 pfile 是在连接 DB 的客户端上, spfile 是在 DB 服务器上.


V$SPPARAMETER

SELECT *
FROM v$spparameter
WHERE isspecified='TRUE';

Lab: V$SPPARAMETER

show 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';

lab_spf


Lab: Explore PFile and SPFile

lab01

lab01

lab01

lab01


Lab: Startup without parameter file

lab_order

lab_order

lab_order

lab_order


Lab: Create PFile from SPFile

CREATE PFILE='initorcl.ora' FROM SPFILE;

lab_order

lab_order


Lab: Startup with PFile

lab_order lab_order


Lab: Whether instance start with PFile or SPfile

show parameter spfile;

lab_pf0201

lab_pf0201

lab_pf0201


Lab: Startup with a specific pfile

CREATE PFILE='test.ora' FROM SPFILE;
*.max_idle_time=10

lab_pf0301

startup pfile=/u01/app/oracle/product/19.0.0/dbhome_1/dbs/test.ora

show parameter spfile

show parameter max_idle_time

lab_pf0301


TOP