This can be invoked from application server, not just end clients
There is no “Load” metric here that is used for distributing work.
Coded in client connection definition
SQL*NET randomly selects a node from list to try connection, if failover is on, it will continue trying the next in the list.
RAC = (DESCRIPTION = (LOAD_BALANCE = yes) (ADDRESS = (PROTOCOL = TCP)(HOST = rac-22)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = rac-23)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = rac-24)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = rac-25)(PORT = 1521)) (CONNECT_DATA = (SERVICE_NAME = rac) ) )
With Oracle Database 10g, application workloads can be defined as services so that they can be individually managed and controlled. DBAs control which processing resources are allocated to each service during both normal operations and in response to failures. Performance metrics are tracked by service and thresholds set to automatically generate alerts should these thresholds be crossed. CPU resource allocations and resource consumption controls are managed for services using Resource Manager. Oracle tools and facilities such as Job Scheduler, Parallel Query, and Oracle Streams Advanced Queuing also use services to manage their workloads.
With Oracle Database 10g, rules can be defined to automatically allocate processing resources to services. Oracle RAC 10g instances can be allocated to process individual services or multiple services as needed. These allocation rules can be modified dynamically to meet changing business needs. For example, these rules could be modified at the end of quarter to ensure that there are enough processing resources to complete critical financial functions on time. Rules can also be defined so that when instances running critical services fail, the workload will be automatically shifted to instances running less critical workloads.
Note: Do not use this screen for TAF policy, use DBMS_SERVICE
You can use services to manage DTP environments. By defining the DTP property of a
service, the service is guaranteed to run on one instance at a time in a RAC database.
All global distributed transactions performed through the DTP service are ensured to
have their tightly-coupled branches running on a single RAC instance. This preserves
the integrity for distributed transactions and has the following benefits:
■ The changes are available locally within one RAC instance when tightly coupled
branches need to see changes made by each other
■ Relocation and failover of services are fully supported for DTP
■ By using more DTP services than there are RAC instances, Oracle can balance the
load by services across all of the RAC database instances
To leverage all of the instances in a cluster, create one or more DTP services for each
RAC instance that hosts distributed transactions. Choose one DTP service for one
distributed transaction. Choose different DTP services for different distributed
transactions to balance the workload among the RAC database instances. Because all
of the branches of a distributed transaction are on one instance, you can leverage all of
the instances to balance the load of many DTP transactions through multiple singleton
services, thereby maximizing application throughput.
Transaction management is in SGA (local)
Connection pool manager maintains a pool of open database connections.
New connection requests come in, the pool manager checks if the pool contains any unused connections and returns one if available.
Reuses active database connections instead of creating a new connection with every request.
Connections made at start of Application or Application Server
Connections remain live for life of application or database instance
Number of required connections and resource fluctuate with application workload
THROUGHPUT—Attempts to direct work requests according to throughput. The
load balancing advisory is based on the rate that work is completed in the service
plus available bandwidth to the service. An example for the use of THROUGHPUT is
for workloads such as batch processes, where the next job starts when the last job
completes:
used when the work in a service completes at homogenous rates. An example is a trading system where work requests are similar lengths.
SERVICE TIME—Attempts to direct work requests to instances according to
response time. Load balancing advisory data is based on elapsed time for work
done in the service plus available bandwidth to the service. An example for the
use of SERVICE TIME is for workloads such as internet shopping where the rate of
demand changes:
used when the work in a service completes at various rates. An example is as internet shopping system where work requests are various lengths
Embedded in OPMN for Application Server 10g
Set on Oracle JDBC 10g client
example …. without and with wallet security.
setONSConfiguration(“nodes=host1:port1, host2:port2 “);
setONSConfiguration(“nodes=host1:port1,
host2:port2\nwalletfile=wfile”);
Add client nodes to server using racgons
racgons.bin add_config hostname:port [hostname:port]
ONS needs to be running for JDBC to receive FAN events
By default the parameter useocr=on is set in the ONS configuration file. The parameter useocr=on is used to tell ONS to store all RAC nodes and port numbers in Oracle Cluster Registry (OCR) instead of in the ONS configuration file. If userocr=on is specified the utility racgons must be used to add the ONS configuration information to OCR. Do not use this option on the client side. Note: As of Oracle Database 10g 10.1.0.3, this parameter does not work, it is recommended that you remove the parameter useocr=on and defining the nodes and ports in the config file as seen above in Figure 9.
Note: If RAC is installed on a shared file system the ORACLE_HOME/opmn/conf directory must be created locally on each node to workaround bug 3406450. For example, a symbolic link can be created to a directory under $HOME with the following UNIX commands:
$ mv ORACLE_HOME/opmn/conf $ORACLE_HOME/opmn/conf.orig
$ mkdir $HOME/opmn/conf
$ cp ORACLE_HOME/opmn/conf.orig/* $HOME/opmn/conf
$ ln –s $HOME/opmn/conf ORACLE_HOME/opmn/conf
Runtime Connection Load Balancing is the Oracle Client integration with the Load Balancing Advisory included with Oracle Real Application Clusters. When an application does a “Get Connection” to the connection pool, instead of getting a random idle connection, it will get the available connection that will give it the best service based on real time information given from the load balancing advisory and the defined goal for the request service. This allows the connection pool to react to changes in the database and get the best overall thorughput for the application.
© 2010, www.oracledatabase12g.com. 版权所有.文章允许转载,但必须以链接方式注明源地址,否则追究法律责任.
相关文章 | Related posts:
- Step By Step guide for installing Oracle RAC 10gR2 on Windows (2003 and 2008)
- Step By Step guide for installing Oracle RAC 10gR2 on Solaris
- Step By Step guide for installing Oracle RAC 10gR2 on Linux
- Rac 10gR2 On HPUX
- Rac 10gR2 On AIX Best Guide
- Improved features to Deploy PeopleSoft on Oracle Grid
- Adding a Node To 10gR2 RAC cluster
- Oracle RAC Templates for Oracle Virtual Machine
- Managing Sequences in RAC Environment
- Oracle Real Application Clusters One Node and Rac One Node Price




最新评论