Tools for Administering Oracle RAC
The tools most commonly used to managed Oracle Real Application Clusters (Oracle RAC) databases and instances are the SRVCTL utility, Oracle Enterprise Manager, and SQL*Plus.
In many cases, you use these tools the same way to manage Oracle RAC environments as you would use them manage noncluster Oracle AI Database:
Administering Oracle RAC with SRVCTL
The Server Control Utility (SRVCTL) is a command-line interface that you can use to manage Oracle AI Databases in a centralized manner.
SRVCTL-based database management available for single-instance Oracle AI Database, using Oracle ASM in the Oracle Grid Infrastructure, for both a noncluster environment and Oracle RAC databases, based on Oracle Grid Infrastructure for a cluster. This enables homogeneous management of all Oracle AI Database types using SRVCTL. You can use SRVCTL to start and stop the database and instances, and to delete or move instances and services. You can also use SRVCTL to add services and manage configuration information, in addition to other resources in the cluster.
When you use SRVCTL to perform configuration operations on your cluster, SRVCTL stores configuration data in the Oracle Cluster Registry (OCR) in a cluster or Oracle Local Registry (OLR) in Oracle Restart environments. SRVCTL performs other operations, such as starting and stopping instances, by configuring and managing Oracle Clusterware resources, which define agents that perform database startup and shutdown operations using Oracle Call Interface APIs.
Note:
If you require your database (or database instance) to start using certain environment variables, then use the srvctl setenv command to set those variables for the database profile that is maintained for the database using SRVCTL. You do not need to set the ORACLE_HOME and ORACLE_SID environment variables, because SRVCTL maintains and sets those parameters, automatically.
Administering Oracle RAC with Oracle Enterprise Manager
Oracle Enterprise Manager provides a central point of control for the Oracle RAC environment, allowing you to perform administrative tasks simultaneously on multiple cluster databases.
Based on the Oracle Enterprise Manager Cloud Control (Grid Control in Oracle Enterprise Manager 11g) graphical user interface (GUI), you can manage both non-clustered and Oracle RAC environments.
In Oracle Enterprise Manager, Oracle RAC-specific administrative tasks generally focus on two levels: tasks that affect an entire cluster database and tasks that affect specific instances. For example, you can use Oracle Enterprise Manager to start, stop, and monitor databases, cluster database instances, and their listeners, and to schedule jobs or set up alert thresholds for metrics. Or you can perform instance-specific commands such as setting parameters or creating resource plans. You can also use Oracle Enterprise Manager to manage schemas, security, and cluster database storage features.
Administering Oracle RAC with SQL*Plus
Unlike SRVCTL or Oracle Enterprise Manager, SQL*Plus is an instance-oriented management tool.
SQL_Plus commands operate on the current instance. The current instance can be either the local default instance on which you initiated your SQL_Plus session, or it can be a remote instance to which you connect with Oracle Net Services. For an Oracle RAC environment that runs multiple instances on one database at the same time, this implies that you need to consider the extent to which SQL*Plus can operate on this instance.
Note:
The policy-managed database deployment option is desupported in Oracle AI Database 26ai.
For example, when using Pluggable Databases (PDBs) you must consider that any alteration performed on the PDB using a SQL*Plus connection will, by default, only affect the current instance. To make changes affecting all instances that belong to the PDB, you must use the ALTER PLUGGABLE DATABASE command with instance=all. When using PDBs you must connect, using a dynamic database service (net_service_name), to an instance, as PDBs represent themselves as dynamic database services associated with one or more instances of an Oracle RAC database.
Because, by default, the SQL_Plus prompt does not identify the current instance, you should direct your commands to the correct instance. Starting a SQL_Plus session and connecting to the database without specifying an instance directs all SQL*Plus commands to the local instance. In this case, the default instance is also the current instance.
Since the SQL_Plus prompt does not identify the current instance by default, you should direct your commands to the correct instance. Starting a SQL_Plus session and connecting to the database without specifying an instance directs all SQL_Plus commands to the local instance. In this case, the default instance is also the current instance. To connect to a different instance in SQL_Plus, issue a new CONNECT command and specify a remote instance net service name, as shown in the following example, where password is the password:
CONNECT user_name@net_service_name
Enter password: password
Connecting as SYSOPER or SYSRAC enables you to perform privileged operations, such as instance startup and shutdown. Multiple SQL_Plus sessions can connect to the same instance at the same time. SQL_Plus automatically disconnects you from the first instance whenever you connect to another one.
Note:
Use the SYSASM privilege instead of the SYSRAC privilege to connect to and administer an Oracle ASM instance. If you use the SYSRAC privilege to connect to an Oracle ASM instance, then Oracle AI Database writes warnings to the alert log files because commands that run using the SYSRAC privilege on an Oracle ASM instance are deprecated.
Related Topics
- Authentication for Accessing Oracle ASM Instances
- Configuring Naming Methods
- Modifying a PDB with the ALTER PLUGGABLE DATABASE Statement
How SQL*Plus Commands Affect Instances
You can use SQL*Plus to start and stop instances in the Oracle RAC database.
Most SQL statements affect the current instance. You do not need to run SQL_Plus commands as_ root on Linux and UNIX systems or as Administrator _on Windows systems. You need only the proper database account with the privileges that you normally use for a noncluster Oracle AI Database. Some examples of how SQL_Plus commands affect instances are:
ALTER SYSTEM CHECKPOINT LOCALaffects only the instance to which you are currently connected, rather than the default instance or all instances.ALTER SYSTEM CHECKPOINTorALTER SYSTEM CHECKPOINT GLOBALaffects all instances in the cluster database.ALTER SYSTEM SWITCH LOGFILEaffects only the current instance.- To force a global log switch, use the
ALTER SYSTEM ARCHIVE LOG CURRENTstatement. - The
INSTANCEoption ofALTER SYSTEM ARCHIVE LOGenables you to archive each online redo log file for a specific instance.
The following table describes how SQL*Plus commands affect instances.
*Table: How SQL*Plus Commands Affect Instances*
| SQL*Plus Command | Associated Instance |
|---|---|
ARCHIVE LOG | Always affects the current instance. |
CONNECT | Affects the default instance if no instance is specified in the CONNECT command. |
HOST | Affects the node running the SQL*Plus session, regardless of the location of the current and default instances. |
RECOVER | Does not affect any particular instance, but rather the database. |
SHOW INSTANCE | Displays information about the current instance, which can be different from the default local instance if you have redirected your commands to a remote instance. |
SHOW PARAMETER and SHOW SGA | Displays parameter and SGA information from the current instance. |
STARTUP and SHUTDOWN | Always affects the current instance. These are privileged SQL*Plus commands. |