•In a single-instance environment with Oracle Restart, any database services that are being managed by Oracle Restart go offline, and any sessions connected to those services are killed (terminated). The standard database service for the instance, named DB_UNIQUE_NAME.DB_DOMAIN, does not go offline because it is not managed by Oracle Restart.
The quiesced state lets administrators perform actions that cannot safely be done otherwise. These actions include: •Actions that fail if concurrent user transactions access the same object --for example, changing the schema of a database table or adding a column to an existing table where a no-wait lock is required. •Actions whose undesirable intermediate effect can be seen by concurrent user transactions --for example, a multistep procedure for reorganizing a table when the table is first exported, then dropped, and finally imported. A concurrent user who attempts to access the table after it was dropped, but before import, would not have an accurate view of the situation.
suspend:
The suspend/resume feature is useful in systems that allow you to mirror a disk or file and then split the mirror, providing an alternative backup and restore solution. If you use a system that cannot split a mirrored disk from an existing database while writes are occurring, then you can use the suspend/resume feature to facilitate the split.
不建议使用该方法进行热备份,休闲考虑alter tablespace begin backup
SQL> alter system enable restricted session; System altered SQL> select logins from v$instance; LOGINS ---------- RESTRICTED SQL> alter system disable restricted session; System altered SQL> select logins from v$instance; LOGINS ---------- ALLOWED
quiesce: active_state(v$instance)
SQL> alter system quiesce restricted; System altered SQL> select active_state from v$instance; ACTIVE_STATE ------------ QUIESCED
-
NORMAL
: Normal unquiesced state. -
QUIESCING
: Being quiesced, but some non-DBA sessions are still active. -
QUIESCED
: Quiesced; no non-DBA sessions are active or allowed.
v$blocking_quiesce:存放妨碍quiesce的session id(妨碍原因:active状态下的会话需要转换成inactive下,这需要一定的时间)
suspend: database_status(v$instance)
SQL> alter system suspend; System altered SQL> select database_status from v$instance; DATABASE_STATUS ----------------- SUSPENDED
------------------------------------
总结:其实从三者在v$instance中记录的列名中可以看出,三者的主要作用。
logins(restricted)主要负责登录的限制
active_state(quiesce) 数据库的活动状态
database_status(suspend) 物理文件与服务进程的状态
参考:
http://docs.oracle.com/cd/E11882_01/server.112/e25494/start005.htm