全部博文(113)
分类: Oracle
2010-02-01 10:41:13
Oracle Server 两大组成部分:
Instance:指后台进程、线程和共享内存区域,如:pmon ,dbwr,PGA,SGA
Database:指存储在存储器上的物理文件
---
1.数据库的启动
Oracle数据库的启动包含以下3步:
(1)启动到nomount状态;
(2)启动到mount状态;
(3)启动到open状态。
---
nomount状态
a.Oracle先找参数文件(pfile/spfile)。
b.根据参数文件,创建实例,分配内存,启后台进程。
PS:
1.只要有可用的参数文件->启动实例(Instance),这步不会用到:控制文件、数据文件。
2.这步出现问题,可能是内核参数,共享内存等问题,需检查是否分配了足够资源。
启动方法:
1.cd $ORACLE_HOME/dbs
2.sqlplus "/as sysdba"
3.startup nomount
PS:9i里,选择参数文件的顺序。
1.spfile
2.以上3个文件都不存在,Oracle将无法创建和启动instance 。
3.为保证pfile文件的一致,很多时间会将spfile
========以下是启到nomount状态时alert_
Tue Feb 2 19:34:35 2010
Starting ORACLE instance (normal)
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
Picked latch-free SCN scheme 2
Using LOG_ARCHIVE_DEST_10 parameter default value as USE_DB_RECOVERY_FILE_DEST
Autotune of undo retention is turned on.
IMODE=BR
ILAT =18
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.1.0.
System parameters with non-default values:
processes = 150
__shared_pool_size = 75497472
__large_pool_size = 4194304
__java_pool_size = 4194304
__streams_pool_size = 0
nls_language = SIMPLIFIED CHINESE
nls_territory = CHINA
sga_target = 264241152
control_files = /opt/oracle/oradata/modl/control01.ctl, /opt/oracle/oradata/modl/contr
ol02.ctl, /opt/oracle/oradata/modl/control03.ctl
db_block_size = 8192
__db_cache_size = 171966464
compatible = 10.2.0.1.0
db_file_multiblock_read_count= 16
db_recovery_file_dest = /opt/oracle/flash_recovery_area
db_recovery_file_dest_size= 2147483648
undo_management = AUTO
undo_tablespace = UNDOTBS1
remote_login_passwordfile= EXCLUSIVE
db_domain = localhost
dispatchers = (PROTOCOL=TCP) (SERVICE=modlXDB)
job_queue_processes = 10
background_dump_dest = /opt/oracle/admin/modl/bdump
user_dump_dest = /opt/oracle/admin/modl/udump
core_dump_dest = /opt/oracle/admin/modl/cdump
audit_file_dest = /opt/oracle/admin/modl/adump
db_name = modl
open_cursors = 300
pga_aggregate_target = 88080384
PMON started with pid=2, OS id=5773
PSP0 started with pid=3, OS id=5775
MMAN started with pid=4, OS id=5777
DBW0 started with pid=5, OS id=5779
LGWR started with pid=6, OS id=5781
CKPT started with pid=7, OS id=5783
SMON started with pid=8, OS id=5785
RECO started with pid=9, OS id=5787
CJQ0 started with pid=10, OS id=5789
MMON started with pid=11, OS id=5791
Tue Feb 2 19:34:43 2010
starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'...
MMNL started with pid=12, OS id=5793
Tue Feb 2 19:34:43 2010
starting up 1 shared server(s) ...
========以下是启到nomount状态时alert_
查看当前数据库使用pfile文件的方法:
在sql*plus 中执行 show parameter spfile
SQL> show parameter pfile
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string /opt/oracle/102/dbs/spfilemodl
.ora
SQL>
启动到nomount状态后我们可以在后台看到以下进程:
smon,pmon,dbwr,lgwr,ckpt,arch
[oracle@cnsz001 ~]$ ps -ef |grep ora_
oracle 5773 1 0 19:34 ? 00:00:00 ora_pmon_modl
oracle 5775 1 0 19:34 ? 00:00:00 ora_psp0_modl
oracle 5777 1 0 19:34 ? 00:00:00 ora_mman_modl
oracle 5779 1 0 19:34 ? 00:00:00 ora_dbw0_modl
oracle 5781 1 0 19:34 ? 00:00:00 ora_lgwr_modl
oracle 5783 1 0 19:34 ? 00:00:00 ora_ckpt_modl
oracle 5785 1 0 19:34 ? 00:00:00 ora_smon_modl
oracle 5787 1 0 19:34 ? 00:00:00 ora_reco_modl
oracle 5789 1 0 19:34 ? 00:00:00 ora_cjq0_modl
oracle 5791 1 0 19:34 ? 00:00:00 ora_mmon_modl
oracle 5793 1 0 19:34 ? 00:00:00 ora_mmnl_modl
oracle 5795 1 0 19:34 ? 00:00:00 ora_d000_modl
oracle 5797 1 0 19:34 ? 00:00:00 ora_s000_modl
oracle 5836 5800 0 19:35 pts/2 00:00:00 grep ora_