oracle数据库启动有哪几个阶段,oracle数据库启动的四个阶段

oracle数据库启动的四个阶段,见下图:

0818b9ca8b590ca3270a3433284dd417.png

1. 数据库处于SHUTDOWN状态

在此种状态,数据库处于停止状态。不能接受外界数据请求。使用操作系统命令ps –ef | grep ora看不到任何数据库进程的存在。

2. 数据库处于NOMOUNT状态

在此种状态,数据库后台进程已经建立。并根据参数文件中关于SGA的相关参数,建立共享内存区和缺省的oracle数据库进程。并同时检查相关初始化参数的正确性。

使用操作系统命令可以考到相应的进程。ps –ef | grep ora_  并且使用ipcs –m命令可以看到以oracle用户建立起来的共享内存区。

oracle@db1:~> sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Sat Mar 3 22:48:27 2012

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup nomount;

ORACLE instance started.

Total System Global Area  167772160 bytes

Fixed Size                  1218316 bytes

Variable Size             104859892 bytes

Database Buffers           58720256 bytes

Redo Buffers                2973696 bytes

SQL>

查看进程状态.

oracle@db1:~> ps -ef | grep ora_

oracle 3626 1 0 22:48 ? 00:00:00 ora_pmon_orcl1

oracle 3628 1 0 22:48 ? 00:00:00 ora_psp0_orcl1

oracle 3630 1 0 22:48 ? 00:00:00 ora_mman_orcl1

oracle 3632 1 0 22:48 ? 00:00:00 ora_dbw0_orcl1

oracle 3634 1 0 22:48 ? 00:00:00 ora_lgwr_orcl1

oracle 3636 1 0 22:48 ? 00:00:00 ora_ckpt_orcl1

oracle 3638 1 0 22:48 ? 00:00:00 ora_smon_orcl1

oracle 3640 1 0 22:48 ? 00:00:00 ora_reco_orcl1

oracle 3642 1 0 22:48 ? 00:00:00 ora_cjq0_orcl1

oracle 3644 1 0 22:48 ? 00:00:00 ora_mmon_orcl1

oracle 3646 1 0 22:48 ? 00:00:00 ora_mmnl_orcl1

oracle 3648 1 0 22:48 ? 00:00:00 ora_d000_orcl1

oracle 3650 1 0 22:48 ? 00:00:00 ora_s000_orcl1

oracle 3669 3652 0 22:50 pts/2 00:00:00 grep ora_

oracle@db1:~>

oracle@db1:~> ipcs -m

------ Shared Memory Segments --------

key shmid owner perms bytes nattch status

0xe835086c 458764 oracle 640 171966464 14

oracle@db1:~>

3. 数据库处于MOUNT状态

数据库读取控制文件中的内容,并按照控制文件中指定的参数找到相应的数据文件,并启动数据库的归档或非归档状态。

数据库在此状态检查各个数据文件的一致性。如果出现数据文件损坏,要求用户进行恢复。

SQL> startup mount;

ORACLE instance started.

Total System Global Area 167772160 bytes

Fixed Size 1218316 bytes

Variable Size 104859892 bytes

Database Buffers 58720256 bytes

Redo Buffers 2973696 bytes

Database mounted.

4. 数据库处于OPEN状态

数据库在此状态检查各个数据文件的一致性。如果出现数据文件损坏,要求用户进行恢复。

SQL> startup;

ORACLE instance started.

Total System Global Area 167772160 bytes

Fixed Size 1218316 bytes

Variable Size 104859892 bytes

Database Buffers 58720256 bytes

Redo Buffers 2973696 bytes

Database mounted.

Database opened.

SQL>

5.改变数据库的状态

SQL> startup nomount; ORACLE instance started. Total System Global Area  167772160 bytes Fixed Size                  1218316 bytes Variable Size              96471284 bytes Database Buffers           67108864 bytes Redo Buffers                2973696 bytes SQL> alter database mount; Database altered. SQL> alter database open; Database altered.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值