4.2. 数据库启动阶段
4.2.1. Nomount阶段
nomount: 读取参数文件,分配内存SGA,启动后台进程,(实例的启动)
如果控制文件损坏,只能启动到该状态进行控制文件的修复
SQL> startup nomount
ORACLE instance started.
Total System Global Area 448790528 bytes
Fixed Size 1249488 bytes
Variable Size 96472880 bytes
Database Buffers 343932928 bytes
Redo Buffers 7135232 bytes
SQL> select PID,SPID,USERNAME,TERMINAL,PROGRAM,BACKGROUND from v$process;
PID SPID USERNAME TERMINAL PROGRAM B
---- ------------ --------------- ---------------- --------------------------
1 PSEUDO
2 3616 SYSTEM UNIQUE ORACLE.EXE (PMON) 1
3 204 SYSTEM UNIQUE ORACLE.EXE (PSP0) 1
4 3884 SYSTEM UNIQUE ORACLE.EXE (MMAN) 1
5 1736 SYSTEM UNIQUE ORACLE.EXE (DBW0) 1
6 1508 SYSTEM UNIQUE ORACLE.EXE (LGWR) 1
7 3116 SYSTEM UNIQUE ORACLE.EXE (CKPT) 1
8 3432 SYSTEM UNIQUE ORACLE.EXE (SMON) 1
9 1244 SYSTEM UNIQUE ORACLE.EXE (RECO) 1
10 1308 SYSTEM UNIQUE ORACLE.EXE (CJQ0) 1
11 3628 SYSTEM UNIQUE ORACLE.EXE (MMON) 1
12 3592 SYSTEM UNIQUE ORACLE.EXE (MMNL) 1
13 2436 SYSTEM UNIQUE ORACLE.EXE (D000)
14 512 SYSTEM UNIQUE ORACLE.EXE (S000)
15 3820 SYSTEM UNIQUE ORACLE.EXE (SHAD)
15 rows selected.
SQL> select open_mode from v$database;
select open_mode from v$database
*
ERROR at line 1:
ORA-01507: database not mounted
4.2.2. MOUNT阶段
mount: 打开数据库的控制文件,要求数据库的控制文件必须可访问,定位数据文件和日志文件的位置
如果数据库的数据文件和日志文件损坏了,控制文件良好,只能启动到该状态,进行数据库的数据文件和日志文件的恢复。
SQL> startup mount;
ORACLE instance started.
Total System Global Area 448790528 bytes
Fixed Size 1249488 bytes
Variable Size 96472880 bytes
Database Buffers 343932928 bytes
Redo Buffers 7135232 bytes
Database mounted.
SQL> show parameter control
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time integer 7
control_files string D:\ORACLE\PRODUCT\10.2.0\ORADA
TA\ORCL\CONTROL01.CTL, D:\ORAC
LE\PRODUCT\10.2.0\ORADATA\ORCL
\CONTROL02.CTL, D:\ORACLE\PROD
UCT\10.2.0\ORADATA\ORCL\CONTRO
L03.CTL
SQL>
SQL> select open_mode from v$database;
OPEN_MODE
----------
MOUNTED
SQL> select name from v$datafile;
NAME
--------------------------------------------------------
D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF
D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\UNDOTBS01.DBF
D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSAUX01.DBF
D:\ORACLE\PRODUCT\10.2.0\ORADATA\TBS1.DBF
SQL> select * from v$logfile;
rows will be truncated
GROUP# STATUS TYPE MEMBER
---------- ------- ------- -----------------------------------------------------
1 ONLINE D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO01.LOG
2 ONLINE D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO02.LOG
3 ONLINE D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO03.LOG
4.2.3. OPEN状态
保持数据库所有文件处于打开状态
4.2.4. 数据库报警日志文件
报警日志文件名:alert_<sid>.log
文件位置:background_dump_dest
SQL> show parameter dump
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
background_core_dump string partial
background_dump_dest string D:\ORACLE\PRODUCT\10.2.0\ADMIN
\ORCL\BDUMP
core_dump_dest string D:\ORACLE\PRODUCT\10.2.0\ADMIN
\ORCL\CDUMP
max_dump_file_size string UNLIMITED
shadow_core_dump string partial
user_dump_dest string D:\ORACLE\PRODUCT\10.2.0\ADMIN
\ORCL\UDUMP
SQL> alter database backup controlfile to trace;
数据库已更改。
SQL>
Alert文件内容:
1) 上一次启动读取的非默认的数据库参数
2) All internal errors (ORA-600), block corruption errors (ORA-1578), and deadlock errors (ORA-60) that occurred
3) Administrative operations, such as the SQL statements CREATE, ALTER, DROP DATABASE
4) SQL*Plus statements STARTUP, SHUTDOWN, ARCHIVE LOG, and RECOVER
5) Errors during the automatic refresh of a materialized view
ORACLE实例管理之数据库启动阶段
原创jackyliguo 博主文章分类:Oracle学习 ©著作权
©著作权归作者所有:来自51CTO博客作者jackyliguo的原创作品,请联系作者获取转载授权,否则将追究法律责任
上一篇:关于CPU
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
oracle 单机多实例启动登录
oracle 单机多实例启动登录
oracle SQL 远程登录 -
oracle11g之数据库权限知识
oracle11g数据库权限知识
oracle SQL SYS -
Oracle笔记:数据库启动的三个阶段
数据库的启动可分为三个阶段:1、startup nomount -- 启动
Oracle启动的三个阶段 Oracle启动的三个步骤 数据库 数据文件 控制文件