Starting up:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit 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/db_1/dbs/spfileorcl.ora
System parameters with non-default values:
processes = 150
sga_target = 176M
memory_target = 1104M
memory_max_target = 1104M
control_files = "/u01/app/oracle/oradata/orcl/control01.ctl"
control_files = "/u01/app/oracle/flash_recovery_area/orcl/control02.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= 3882M
undo_tablespace = "UNDOTBS1"
remote_login_passwordfile= "EXCLUSIVE"
db_domain = "oracle.com"
global_names = FALSE
dispatchers = "(PROTOCOL=TCP) (SERVICE=orclXDB)"
shared_servers = 5
audit_file_dest = "/u01/app/oracle/admin/orcl/adump"
audit_trail = "DB"
db_name = "orcl"
open_cursors = 300
diagnostic_dest = "/u01/app/oracle"
然后后台进程依次启动:
Wed May 04 10:36:55 2016
PMON started with pid=2, OS id=3128
Wed May 04 10:36:55 2016
VKTM started with pid=3, OS id=3132 at elevated priority
VKTM running at (10)millisec precision with DBRM quantum (100)ms
Wed May 04 10:36:55 2016
GEN0 started with pid=4, OS id=3138
Wed May 04 10:36:55 2016
DIAG started with pid=5, OS id=3142
Wed May 04 10:36:55 2016
DBRM started with pid=6, OS id=3146
Wed May 04 10:36:55 2016
PSP0 started with pid=7, OS id=3150
Wed May 04 10:36:55 2016
DIA0 started with pid=8, OS id=3158
Wed May 04 10:36:55 2016
MMAN started with pid=9, OS id=3162
Wed May 04 10:36:55 2016
DBW0 started with pid=10, OS id=3166
Wed May 04 10:36:55 2016
LGWR started with pid=11, OS id=3170
Wed May 04 10:36:55 2016
CKPT started with pid=12, OS id=3175
Wed May 04 10:36:55 2016
SMON started with pid=13, OS id=3179
Wed May 04 10:36:55 2016
RECO started with pid=14, OS id=3184
Wed May 04 10:36:55 2016
MMON started with pid=15, OS id=3189
starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'...
Wed May 04 10:36:55 2016
MMNL started with pid=16, OS id=3193
starting up 5 shared server(s) ...
ORACLE_BASE from environment = /u01/app/oracle
用户可以在SQL*PLUS 中通过show parameter spfile 命令来检查数据库是否使用了 spfile文件,如果 value 不为Null,则数据库使用了 spfile文件:
SQL> show parameter spfile
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string /u01/app/oracle/product/11.2.0
/db_1/dbs/spfileorcl.ora
SQL>
[oracle@dbtest dbs]$ mv init.ora init.ora.bak
[oracle@dbtest dbs]$ mv initorcl.ora initorcl.ora.bak
[oracle@dbtest dbs]$ mv spfileorcl.ora spfileorcl.ora.bak
[oracle@dbtest dbs]$ ls
hc_orcl.dat init.ora.bak initorcl.ora.bak lkORCL orapworcl spfileorcl.ora.bak
[oracle@dbtest dbs]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Wed May 4 10:55:42 2016
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup nomount;
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/app/oracle/product/11.2.0/db_1/dbs/initorcl.ora'
SQL> show parameter control_files
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_files string /u01/app/oracle/product/11.2.0
/db_1/dbs/cntrlorcl.dbf
在nomount 状态,可以查询v$parameter视图,获得控制文件信息,这部分信息来自启 动的参数文件;当数据库 mount 之后,可以查询 v$controlfile视图获得关于控制文件的信 息,此时,这部分信息来自控制文件:
[oracle@dbtest dbs]$ mv init.ora.bak init.ora
[oracle@dbtest dbs]$ mv initorcl.ora.bak initorcl.ora
[oracle@dbtest dbs]$ mv spfileorcl.ora.bak spfileorcl.ora
[oracle@dbtest dbs]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Wed May 4 11:07:07 2016
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 1152450560 bytes
Fixed Size 2212696 bytes
Variable Size 922750120 bytes
Database Buffers 218103808 bytes
Redo Buffers 9383936 bytes
SQL> alter database mount;
Database altered.
SQL> select * from v$controlfile;
STATUS
-------
NAME
--------------------------------------------------------------------------------
IS_ BLOCK_SIZE FILE_SIZE_BLKS
--- ---------- --------------
/u01/app/oracle/oradata/orcl/control01.ctl
NO 16384 594
/u01/app/oracle/flash_recovery_area/orcl/control02.ctl
NO 16384 594
STATUS
-------
NAME
--------------------------------------------------------------------------------
IS_ BLOCK_SIZE FILE_SIZE_BLKS
--- ---------- --------------
alter database mount
Wed May 04 11:07:44 2016
Successful mount of redo thread 1, with mount id 1438756220
Database mounted in Exclusive Mode
Lost write protection disabled
Completed: alter database mount
在这一步骤中,数据库需要计算Mount id 并将其记录在控制文件中,然后开始启动 Heartbeat(心跳),每3 秒更新一次控制文件。
[oracle@dbtest dbs]$ orapwd
Usage: orapwd file=<fname> entries=<users> force=<y/n> ignorecase=<y/n> nosysdba=<y/n>
where
file - name of password file (required),
password - password for SYS will be prompted if not specified at command line,
entries - maximum number of distinct DBA (optional),
force - whether to overwrite existing file (optional),
ignorecase - passwords are case-insensitive (optional),
nosysdba - whether to shut out the SYSDBA logon (optional Database Vault only).
There must be no spaces around the equal-to (=) character.
[oracle@dbtest dbs]$