Placing a Database into a Quiesced (suspended) State


There are times when a DBA needs to perform work on the database that requires no other ACTIVE sessions. This is very common when a DBA tries to run a package or a modify a table when the application is till running. There are also frequent occurrences where too much IT support folks time is spent in bringing lot of application servers down to perform a deployment or some database maintenance. That is where Quiescing comes in.

When you place a database in quiesced state, non-DBA active sessions will continue until they become inactive. An active session is one that is currently inside of a transaction, a query, a fetch, or a PL/SQL statement; or a session that is currently holding any shared resources (for example, enqueues). No inactive sessions are allowed to become active. For example, If a user issues a SQL query in an attempt to force an inactive session to become active, the query will appear to be hung. When the database is later unquiesced, the session is resumed, and the blocked action is processed.

To place a database into a quiesced state, run the following statement:

SQL> ALTER SYSTEM QUIESCE RESTRICTED;        

Once all non-DBA sessions become inactive, the ALTER SYSTEM QUIESCE RESTRICTED statement completes, and the database is in a quiesced state. In an Oracle Real Application Clusters environment, this statement affects all instances, not just the one that issues the statement.

When you issue above statement, you may wait a long time for active sessions to become inactive.?In this situation, you can find?sessions that are blocking the quiescing operation by following query:

SQL> select bq.sid, username, osuser, program, machine

from v$blocking_quiesce bq, v$session s

where bq.sid = s.sid;        

To restore the database to normal operation, run the following statement:

SQL> ALTER SYSTEM UNQUIESCE;        

You can query?V$INSTANCE to view the quiesce state of an instance:

SQL> select active_state from v$instance;        

  • NORMAL: Normal unquiesced state.
  • QUIESCING: Being quiesced, but some non-DBA sessions are still active.
  • QUIESCED: no non-DBA sessions are active or allowed.

要查看或添加评论,请登录

Amine ATLAS的更多文章

  • Exadata X11M : Points Clés et Innovations à Retenir.

    Exadata X11M : Points Clés et Innovations à Retenir.

    Oracle a lancé l’Exadata X11M, la nouvelle génération de sa plateforme Oracle Exadata, qui améliore considérablement…

  • Exadata System Software 25.1

    Exadata System Software 25.1

    Oracle has released Exadata System Software 25.1, introducing significant improvements in AI, performance, high…

  • #Oracle 23: Lock Free Reservations

    #Oracle 23: Lock Free Reservations

    La nouvelle fonctionnalité "Lock Free Reservations" d'Oracle 23ai permet de rompre avec le mécanisme de verrouillage…

  • #Oracle23i

    #Oracle23i

    Interesting New Features: Lock-Free Reservations : Lock-free column value reservations allow applications to reserve…

  • #Oracle

    #Oracle

    How to calculate Oracle licensing costs? Here’s a simplified guide on how to calculate Oracle licensing costs for…

  • Oracle Database Release Numbers

    Oracle Database Release Numbers

    Oracle Database releases are categorized by five numeric segments that indicate release information. Oracle Database…

  • Stop Migrating Databases To 12c!

    Stop Migrating Databases To 12c!

    If you are starting an upgrade plan, do it directly to Oracle Database 19c. Why? Well, let’s agree that 19c is…

  • Save money by understanding the Oracle licensing model

    Save money by understanding the Oracle licensing model

    Prices and contracts, what are you paying for: First year’s costs can be calculated as: ( purchase – purchase discount)…

  • Comprendre la tarification par puissance de la licence Oracle DataBase (Processor License)

    Comprendre la tarification par puissance de la licence Oracle DataBase (Processor License)

    Pour une version Entreprise, il faut compter le nombre de c?urs (core) qu’il y a sur le(s) CPU (socket). 1 c?urs = 1…

  • Pensez à la sécurité de vos BDD Oracle==> ORACLE DATABASE VAULT

    Pensez à la sécurité de vos BDD Oracle==> ORACLE DATABASE VAULT

    INTRODUCTION En tant que gestionnaire ou architecture sécurité, vous vous êtes déjà demandé pourquoi vos DBAs ont accès…

社区洞察

其他会员也浏览了