For Oracle support & training call (800) 766-1884
Free Oracle Tips

Home
Oracle Tips
Oracle Code Depot
Oracle Monitoring
Oracle Consulting
Oracle Training
Oracle News
Oracle Forum
Oracle Support





 

Free Oracle Tips

image

 
HTML Text

Free Oracle App Server Tips

image

 
HTML Text


Privacy Policy

Redneck

Dress Code

Oracle tuning

Oracle training

Oracle support

Remote Oracle


 

 

 

 

Donald K. Burleson

Oracle9i RAC Tips

Accessing RAC

The SQL*Net process controls RAC instance access. Access to any Oracle instance can be through either a dedicated server connection or through a shared server connection. If access is through a shared server connection, then the instance is set up for multi-threaded server (MTS). If the connection is a dedicated server, then either the user process required a dedicated connection or the instance is not using MTS.

The configuration of SQL*Net for RAC can be quite simple. Essentially only two files need to be configured for basic access, the SQL*Net listener control file, listener.ora, and the instance names file, tnsnames.ora. In a basic configuration, each server has a listener.ora and a tnsnames.ora file, and each client has a tnsnames.ora file. A third file, sqlnet.ora, is also present on both server and client, but usually no configuration changes are needed to the basic file.

The listener.ora File

The listener.ora file contains the information needed by the SQL*Net listener file to identify the instances for which connection requests are being serviced. If no instances are listed in the listener.ora, the listener process will wait for the instances to self-register (instances have been capable of self-registering since Oracle8i). Figure 4.13 shows a basic listener.ora file for use with RAC.

Figure 4.13: Basic RAC listener.ora File

If advanced features such as load balancing and automatic failover are desired, there are optional sections of the listener.ora file that must be present. For example, to configure load balancing, the listener.ora file shown in Figure 4.14 (using an instance name of "test") would be appropriate. The listener file must be the same on the servers that are participating in the load balancing for RAC. The second listener, "listener_test1" allows use of Oracle Enterprise Manager with the instance. Another example is that you should never configure the global_dbname parameter with Oracle9i RAC if you wish to use connect time failover or transparent application failover. Setting this parameter will disable these capabilities.

Chapter 10 covers the setup for automatic failover. For the second server, the second listener would be called "listener_test2", and all instance-specific references would be changed to "test2", while all server specific references would be changed to "testlinux2".

Figure 4.14: Listener.ora for Load Balancing on Two Instances

If a port other than 1521 is utilized, then the local_listener parameter in that instances local init.ora file must be set to the same port value. For example, if we used port 1525 instead of 1521 all references to port 1521 in the listener.ora would be changed to 1525 in Figure 4.14, and the following entry would have to be added to the local init.ora:

local_listener="(address=(port=1525)(protocol=tcp)(host=testlinux1))"

More examples of listener.ora files for various RAC failover scenarios are included in Chapter 10.

The tnsnames.ora File

Unless Oracle Names is used (LDAP), each client and server that participates in the RAC environment must have a tnsnames.ora file. The tnsnames.ora file provides the local SQL*Net process a map to all available instances. The tnsnames.ora file also provides failover and load balance information. Failover is automatically set if a list of addresses is placed in the tnsnames.ora file, however, the failover method should be explicitly set using the failover_mode tnsnames.ora parameter. We will cover the tnsnames.ora file details in Chapter 10 for TAF setup. A basic tnsnames.ora file for a load-balancing RAC setup is shown in Figure 4.15.

Figure 4.15: Example tnsnames.ora file for RAC

If a list of listener addresses is provided in the tnsnames.ora file, load balancing will be done automatically and there is no need to specify the load_balance parameters. They are shown here for example purposes only. The tnsnames.ora file provides the information needed to register the service names and instance-level information with the listener process. In addition, it specifies whether we desire load balancing and application failover, and specifies the method of failover we desire. You can see that this is a very important file for RAC.

More examples of RAC tnsnames.ora files for various failover scenarios are included in Chapter 10.


For more information, see the book Oracle 11g Grid and Real Application Clusters  - 30% off if you buy it directly from Rampant TechPress .  Written by top Oracle experts, this RAC book has a complete online code depot with ready to use RAC scripts.


For more details and scripts, see my new book " Oracle Tuning: The Definitive Reference", over 900 pages of BC's favorite tuning tips & scripts. 

You can buy it direct from the publisher for 30%-off and get instant access to the code depot.

 

 


 

 

image

image

image  

image

image

image

 

Fast-Track Oracle Support
PO Box 511
Kittrell, NC 27544


Email BC: