3.21 TERMINATE
Purpose
Starting with Oracle Database 23ai, use the TERMINATE
command to forcibly terminate catalog schema connections. You can run the TERMINATE
command only if you have connected to the recovery catalog as a recovery catalog owner.
While performing recovery catalog upgrades, the default behavior of RMAN is to exit the UPGRADE CATALOG
command with an error message if there are any ongoing RMAN jobs connected to the recovery catalog schema. However, starting from Oracle Database 23ai, you can achieve better control to ensure that the UPGRADE CATALOG
can complete an upgrade and avoid any bottlenecks caused by ongoing RMAN jobs.
TERMINATE
command to forcibly terminate:
- All the active catalog schema connections
- Blocking catalog schema connections that prevent the progress of a recovery catalog upgrade. Blocking connections are catalog schema connections that started after you issued the
UPGRADE CATALOG
command - Waiting catalog schema connections that are waiting for the recovery catalog upgrade process to complete. Catalog schema connections which started after you issued the
UPGRADE CATALOG
command are called waiting connections
Prerequisites
- You must have connected RMAN to a recovery catalog
- You must run the
CONNECT CATALOG
command to connect to the recovery catalog as a catalog schema owner
Additional Prerequisites for Terminating Blocking and Waiting Catalog Schema Connections
- You must have connected RMAN to a recovery catalog
- You must have issued the
UPGRADE CATALOG
command - You must enable the maintenance mode by issuing the
SET CATALOG MAINTENANCE ON
command. - You must run the
CONNECT CATALOG
command to connect to the recovery catalog as a catalog schema owner
Usage Notes
The TERMINATE
command allows you to monitor and take action on catalog schema connections using the RMAN maintenance mode. This is particularly helpful to prevent bottlenecks caused by catalog schema connections while performing a recovery catalog upgrade.
Note:
See, Using the Maintenance Mode for Monitoring Catalog Upgrade to learn more about how to use the maintenance mode to manage catalog schema connections.Semantics
Syntax Element | Description |
---|---|
|
Terminates all catalog schema connections that are blocking the progress of recovery catalog upgrade. Blocking connections are catalog schema connections that started after you issued the After you issue the |
WAITING CONNECTED USERS
|
Terminates the recovery catalog schema connections that are waiting for a recovery catalog upgrade to complete. After you issue the |
Example
Example 3-79 Terminating Blocking Connections to a Recovery Catalog Schema
This example assumes that you are connected to a recovery catalog and issued the UPGRADE CATALOG
command.
You run the SET CATALOG MAINTENANCE ON
command to enable the RMAN maintenance mode. Next, you run the CONNECT CATALOG
command to connect to the recovery catalog as the user rco
(catalog schema owner).
You run the TERMINATE BLOCKING CONNECTED USERS
to terminate all blocking connections to the catalog schema.
RMAN> SET CATALOG MAINTENANCE ON; CONNECT CATALOG rco@catdb; TERMINATE BLOCKING CONNECTED USERS; RMAN-03023: executing command: SET catalog maintenance ON RMAN-06008: connected to recovery catalog database RMAN-07556: Following sessions are blocking the catalog schema upgrade RMAN-07559: ============================================= RMAN-07560: Logon_time SID Serial User RMAN-07559: ============================================= RMAN-07561: 2023-08-01 11:17:13 53 34909 RMAN RMAN-06958: Executing: alter system kill session '53, 34909' RMAN-07559: =============================================