ORACLE数据库的关闭(进阶篇)
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
一)、startup的逆向
open---->close
alter databse open命令可以将数据库由mount 切换至open状态,而close则是将数据库重置为mount状态,前提是数据库中没有连接:
SQL> ALTER DATABASE CLOSE;
Database altered.
此时告警日志内容如下:
ALTER DATABASE CLOSE
Mon May 19 21:31:45 2014
SMON: disabling tx recovery
Mon May 19 21:31:45 2014
Stopping background process CJQ0
Stopping background process QMNC
Stopping Job queue slave processes, flags = 27
Waiting for Job queue slaves to complete
Mon May 19 21:32:40 2014
Job queue slave processes stopped
All dispatchers and shared servers shutdown
CLOSE: killing server sessions.
CLOSE: all sessions shutdown successfully.
Stopping background process SMCO
Mon May 19 21:32:41 2014
SMON: disabling cache recovery
Mon May 19 21:32:42 2014
Shutting down archive processes
Archiving is disabled
Mon May 19 21:32:42 2014
ARCH shutting down
ARC3: Archival stopped
Mon May 19 21:32:42 2014
ARCH shutting down
ARC1: Archival stopped
Mon May 19 21:32:42 2014
ARCH shutting down
ARC0: Archival stopped
Mon May 19 21:32:42 2014
ARCH shutting down
ARC2: Archival stopped
Thread 1 closed at log sequence 27
Successful close of redo thread 1
Completed: ALTER DA TABASE CLOSE
Mon May 19 21:33:46 2014
idle dispatcher 'D000' terminated, pid = (17, 1)
该过程将停止数据库写入操作,stopscn开始于写入控制文件中。正常情况下控制文件的STOP SCN将与数据文件头中的SCN的值相同。
mount ----> dismount
SQL> alter database dismount;
Database altered.
该过程将数据库置于started状态
彻底关闭数据库:
SQL> shutdown
ORA-01507: database not mounted
ORACLE instance shut down.
查看alert日志,数据库后台进程相继关闭:
alter database dismount
Completed: alter database dismount
Tue May 20 08:43:06 2014
Shutting down instance (normal)
Shutting down instance: further logons disabled
Stopping background process MMNL
Stopping background process MMON
License high water mark = 6
All dispatchers and shared servers shutdown
ALTER DATABASE CLOSE NORMAL
ORA-1507 signalled during: ALTER DATABASE CLOSE NORMAL...
ARCH: Archival disabled due to shutdown: 1090
Shutting down archive processes
Archiving is disabled
Archive process shutdown avoided: 0 active
ARCH: Archival disabled due to shutdown: 1090
Shutting down archive processes
Archiving is disabled
Archive process shutdown avoided: 0 active
Tue May 20 08:43:07 2014
Stopping background process VKTM:
Tue May 20 08:43:09 2014
Instance shutdown complete