How to Quiesce a Database

Oracle数据库静默模式
本文介绍如何在Oracle 9i中设置数据库进入静默模式,包括设置资源管理计划参数、使用SQL*Plus连接并执行ALTER SYSTEM命令的具体步骤。此外,还介绍了如何解除静默模式并检查数据库状态。

http://space.itpub.net/html/32/7364032-17461.html

SQL> alter system quiesce restricted;
alter system quiesce restricted
*
ERROR at line 1:
ORA-25507: resource manager has not been continuously on


SQL> alter system quiesce restricted;
alter system quiesce restricted
*
ERROR at line 1:
ORA-25507: resource manager has not been continuously on


SQL>
SQL> show parameter resource_manager_plan

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
resource_manager_plan string
SQL>
SQL> alter system set resource_manager_plan='SYSTEM_PLAN' scope=spfile ;

System altered.

SQL> startup force;
ORACLE instance started.

Total System Global Area 4732717392 bytes
Fixed Size 743760 bytes
Variable Size 738197504 bytes
Database Buffers 3992977408 bytes
Redo Buffers 798720 bytes
Database mounted.
Database opened.
SQL> alter system quiesce restricted;

System altered.
SQL> select status,active_state from v$instance;

STATUS ACTIVE_ST
------------ ---------
OPEN QUIESCED

文档参考


How to Quiesce a Database

By Alexander Geldutes



Quiesce a database is a
new feature in Oracle 9i. It is similar to the restricted mode. When a database in a quiesced mode no one can connect to the database except SYS and SYSTEM and all current user sessions are suspended. As the result in the quiesced mode DBA can perform some maintenance task.


In order to quiesce a database:
Set the RESOURCE_MANAGER_PLAN parameter to a non-null value.
alter system set resource_manager_plan='SYSPLAN' scope=both;


Connect to the database as SYSDBA using SQL*Plus and issue the ALTER SYSTEM command:
C:>sqlplus /nolog



SQL
*Plus: Release 9.0.1.0.1 - Production on Tue Jun 17 15:10:56 2003


(c) Copyright 2001 Oracle Corporation. All rights reserved.


SQL> connect / as sysdba

Connected
.


SQL> alter system quiesce restricted;


System altered.


SQL>



If
Resource Manager is not turned on (RESOURCE_MANAGER_PLAN is not set) and you are trying to quiesce a database then you receive the following error:
SQL> alter system quiesce restricted;

alter system quiesce restricted

*

ERROR at line 1:

ORA-25507: resource manager has not been continuously on



So
do not forget to set the RESOURCE_MANAGER_PLAN parameter to a non-null value. You can check the status of the database by running a query against V$INSTANCE;
SQL> select active_state from v$instance;


ACTIVE_ST
---------
QUIESCED



SQL
>


To bring a database back in the fully operational mode, use the following command:
SQL> alter system unquiesce;


System altered.


SQL> select active_state from v$instance;


ACTIVE_ST
---------
NORMAL



SQL
>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值