Get the App
SLTechnology News&Howtos  ›  Database  › 

[Oracle Database] Oracle RAC (8): service resource management

Shulou Source: shulou.com Published: 2022-06-01 09:50:17 10月01日 Update

Service resources

Each database has one or more service names, and the service name is the name provided to the client to connect to the database instance.

Creating a database creates a service with the same name as the database by default. The default service implements the load balancing of all instances. It can be considered that all instances of the database are the preferred nodes of the service created by default.

The manually created service resource distinguishes the preferred node from the standby node. No matter through which node the client requests a connection, the client is permanently connected to the preferred node of the service resource, and only when the preferred node fails will it connect to the standby node.

TAF (Transparent Application Failover): for client connections (sessions) that are already connected to the database, when there is a problem with the currently connected database instance, the existing database connection is transparently migrated to another database instance. The corresponding connection may have performed some operation before the instance has a problem, or is performing an operation when the instance has a problem, so you need to deal with the operation performed and the operation being performed when failover arrives at the new instance.

TAF only supports sessions that connect to the database using OCI, not JDBC.

Create service [oracle@wallet01 ~] $srvctl add service-d wallet-s gspublic-r wallet1-a wallet2,wallet3-P basic-e session-y automatic-d Unique name for the database-s Service name-r "" Comma separated list of preferred instances-a "" Comma separated list of available instances-P {NONE | BASIC | PRECONNECT} TAF policy specification-e Failover type (NONE, SESSION) Or SELECT)-y Management policy for the service (AUTOMATIC or MANUAL) query service attribute [oracle@wallet01 ~] $srvctl config service-d wallet-s gspublicService name: gspublicService is enabledServer pool: wallet_gspublicCardinality: 1Disconnect: falseService role: PRIMARYManagement policy: AUTOMATICDTP transaction: falseAQ HA notifications: falseFailover type: SESSIONFailover method: NONETAF failover retries: 0TAF failover delay: 0Connection Load Balancing Goal: LONGRuntime Load Balancing Goal: NONETAF policy specification: BASICEdition: Preferred instances: wallet1Available instances: wallet2,wallet3 query service status [oracle@wallet01 ~] $srvctl status service-d walletService gspublic is not running. Start the service resource [oracle@wallet01 ~] $srvctl start service-d wallet-s gspublic [oracle@wallet01 ~] $srvctl status service-d walletService gspublic is running on instance (s) wallet1

Tags: Data database instance node resource name customer client problem method in progress standby support query equalization only multiple attributes manual fault Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei NVidia Linux Shulou Tech Info Apple