以下实验过程来自10.2.0.3
引用
SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
PL/SQL Release 10.2.0.3.0 - Production
CORE 10.2.0.3.0 Production
TNS for Linux: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - Production
我们知道Oracle启动实例寻找参数文件的顺序为spfile<sid>.ora,spfile.ora,init<sid>.ora。那么Oracle启动一个实例最小化参数是什么呢?以下就是实验过程。
创建任意名字实例
引用
[ora10g@mcprod ~]$ export ORACLE_SID=zhoul
启动实例需要参数文件initzhoul.ora
引用
[ora10g@mcprod ~]$ sqlplus "/as sysdba"
SQL*Plus: Release 10.2.0.3.0 - Production on Sat Jan 9 13:55:35 2010
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Connected to an idle instance.
SQL> startup
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/ora10g/oracle/product/10.2.0/db_1/dbs/initzhoul.ora'
SQL> exit
Disconnected
创建参数文件initzhoul.ora
引用
[ora10g@mcprod ~]$ touch /ora10g/oracle/product/10.2.0/db_1/dbs/initzhoul.ora
再次尝试启动,提示需要参数db_name
引用
SQL> startup nomount
ORA-01506: missing or illegal database name
添加db_name至参数文件
引用
[ora10g@mcprod ~]$ echo "db_name=zhoul">initzhoul.ora
再次尝试启动zhoul实例,启动成功
引用
SQL> startup nomount
ORACLE instance started.
Total System Global Area 117440512 bytes
Fixed Size 1260384 bytes
Variable Size 58721440 bytes
Database Buffers 50331648 bytes
Redo Buffers 7127040 bytes
查看数据字典v$parameter,发现启动该实例的只有db_name是非默认,
也就是说只要只要设置参数db_name,即可启动数据库实例,其他参数均可采用初始值。
引用
SQL> select name from v$parameter where isdefault='FALSE';
NAME
--------------------------------------------------------------------------------
db_name
观察alert_zhoul.log,可以看到Oracle在启动实例zhoul中调成了部分初始值。注意到undo retention自动调整被关闭。
引用
SQL> show parameter background_core_dump
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
background_core_dump string partial
[ora10g@mcprod log]$ cat alert_zhoul.log
Sat Jan 9 13:58:08 2010
Adjusting the default value of parameter parallel_max_servers
from 40 to 25 due to the value of parameter processes (40)
Sat Jan 9 13:58:08 2010
Starting ORACLE instance (normal)
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
Sat Jan 9 13:58:19 2010
Adjusting the default value of parameter parallel_max_servers
from 40 to 25 due to the value of parameter processes (40)
Sat Jan 9 13:58:19 2010
Starting ORACLE instance (normal)
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
Sat Jan 9 13:59:52 2010
Adjusting the default value of parameter parallel_max_servers
from 40 to 25 due to the value of parameter processes (40)
Sat Jan 9 13:59:52 2010
Starting ORACLE instance (normal)
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
Sat Jan 9 14:01:25 2010
Adjusting the default value of parameter parallel_max_servers
from 40 to 25 due to the value of parameter processes (40)
Sat Jan 9 14:01:25 2010
Starting ORACLE instance (normal)
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
Shared memory segment for instance monitoring created
Picked latch-free SCN scheme 2
Using LOG_ARCHIVE_DEST_1 parameter default value as /ora10g/oracle/product/10.2.0/db_1/dbs/arch
Autotune of undo retention is turned off.
LICENSE_MAX_USERS = 0
SYS auditing is disabled
ksdpec: called for event 13740 prior to event group initialization
Starting up ORACLE RDBMS Version: 10.2.0.3.0.
System parameters with non-default values:
db_name = zhoul
PMON started with pid=2, OS id=32133
PSP0 started with pid=3, OS id=32135
MMAN started with pid=4, OS id=32137
DBW0 started with pid=5, OS id=32139
LGWR started with pid=6, OS id=32141
CKPT started with pid=7, OS id=32143
SMON started with pid=8, OS id=32145
RECO started with pid=9, OS id=32147
MMON started with pid=10, OS id=32149
MMNL started with pid=11, OS id=32151