Quiesce Database (330)

tsinglee發表於2007-12-08

You can put the system into quiesced state. The system is in quiesced state if there are
no active sessions, other than SYS and SYSTEM. An active session is defined as a
session that is currently inside a transaction, a query, a fetch or a PL/SQL procedure,
or a session that is currently holding any shared resources (for example,
enqueues--enqueues are shared memory structures that serialize access to database
resources and are associated with a session or transaction). Database administrators
are the only users who can proceed when the system is in quiesced state.

Database administrators can perform certain actions in the quiesced state that cannot
be safely done when the system is not quiesced. These actions include:
■ Actions that might fail if there are concurrent user transactions or queries. For
example, changing the schema of a database table will fail if a concurrent
transaction is accessing the same table.
■ Actions whose intermediate effect could be detrimental to concurrent user
transactions or queries. For example, suppose there is a big table T and a PL/SQL
package that operates on it. You can split table T into two tables T1 and T2, and
change the PL/SQL package to make it refer to the new tables T1 and T2, instead
of the old table T.
When the database is in quiesced state, you can do the following:
CREATE TABLE T1 AS SELECT ... FROM T;
CREATE TABLE T2 AS SELECT ... FROM T;
DROP TABLE T;
You can then drop the old PL/SQL package and re-create it.

For systems that must operate continuously, the ability to perform such actions
without shutting down the database is critical.

The Database Resource Manager blocks all actions that were initiated by a user other
than SYS or SYSTEM while the system is quiesced. Such actions are allowed to proceed
when the system goes back to normal (unquiesced) state. Users do not get any
additional error messages from the quiesced state.

靜默資料庫
1. 靜默狀態是指資料庫中只存在 SYS 和 SYSTEM 使用者建立的活動會話
2. 活動會話的定義是: 正在執行事務,查詢,資料提???PL/SQL過程的會話,或者是當前擁有
某種共享資源的會話
3. 佇列是一個共享的記憶體結構,她總是和事務或會話相關,用於序列化地訪問資料庫資源

[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10599713/viewspace-989866/,如需轉載,請註明出處,否則將追究法律責任。

相關文章