分析第一个过程startup? nomount:
这个过程数据库首先到参数文件(pfile/spfile)中读取数据库的设置,创建实例.
数据库所在的操作系统版本:
[oracle@localhost ~]$ lsb_release -a
LSB Version:? ? :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: EnterpriseEnterpriseServer
Description:? ? Enterprise Linux Enterprise Linux Server release 5.5 (Carthage)
Release:? ? ? ? 5.5
Codename:? ? ? Carthage
数据库版本:
SQL> SELECT * FROM v$version where rownum=1;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
因为spfile是二进制文件,不能直接读取,在linux中,可以用命令String转储出来:
[oracle@localhost dbs]$ strings spfileorcl3939.ora
orcl3939.__db_cache_size=54525952
orcl3939.__java_pool_size=4194304
orcl3939.__large_pool_size=4194304
orcl3939.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
orcl3939.__pga_aggregate_target=171966464
orcl3939.__sga_target=251658240
orcl3939.__shared_io_pool_size=0
orcl3939.__shared_pool_size=176160768
orcl3939.__streams_pool_size=4194304
*.audit_file_dest='/u01/app/oracle/admin/orcl3939/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='/u01/app/o
racle/oradata/orcl3939/control01.ctl','/u01/app/oracle/flash_recovery_area/orcl3939/control02.ctl','/u01/app/oracle/oradata/orcl3939/control03.ctl'
*.db_block_size=8192
*.db_domain='localdomain'
*.db_name='orcl3939'
*.db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'
*.db_recovery_file_dest_size=4039114752
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=orcl3939XDB)'
*.instance_name='ORCL3939'
*.local_listener='(ADDRESS=(PROTOCOL=TCP)(HOST = local
host.localdomain)(PORT = 1521))'
*.memory_target=423624704
*.open_cursors=300
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.service_names='a,b,c,d'
*.trace_enabled=TRUE
*.undo_tablespace='UNDOTBS1'
?
spfile文件中你可以看到数据库在nomount时做了些什么,根据参数文件的内容,创建了instance,分配了相应的内存区域,启动了相应的后台进程。
我们再看告警日志文件(alert_.log):读取了参数文件,启动了实例
Starting up:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options.
Using parameter settings in server-side spfile /u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfileorcl3939.ora
System parameters with non-default values:
? processes? ? ? ? ? ? ? ? = 150
? memory_target? ? ? ? ? ? = 404M
? control_files? ? ? ? ? ? = "/u01/app/oracle/oradata/orcl3939/control01.ctl"
? control_files? ? ? ? ? ? = "/u01/app/oracle/flash_recovery_area/orcl3939/control02.ctl"
? control_files? ? ? ? ? ? = "/u01/app/oracle/oradata/orcl3939/control03.ctl"
? db_block_size? ? ? ? ? ? = 8192
? compatible? ? ? ? ? ? ? = "11.2.0.0.0"
? db_recovery_file_dest? ? = "/u01/app/oracle/flash_recovery_area"
? db_recovery_file_dest_size= 3852M
? undo_tablespace? ? ? ? ? = "UNDOTBS1"
? remote_login_passwordfile= "EXCLUSIVE"
? db_domain? ? ? ? ? ? ? ? = "localdomain"
? instance_name? ? ? ? ? ? = "ORCL3939"
? service_names? ? ? ? ? ? = "a,b,c,d"
? dispatchers? ? ? ? ? ? ? = "(PROTOCOL=TCP) (SERVICE=orcl3939XDB)"
? local_listener? ? ? ? ? = "(ADDRESS=(PROTOCOL=TCP)(HOST = localhost.localdomain)(PORT = 1521))"
? audit_file_dest? ? ? ? ? = "/u01/app/oracle/admin/orcl3939/adump"
? audit_trail? ? ? ? ? ? ? = "DB"
? db_name? ? ? ? ? ? ? ? ? = "orcl393