Connect Oracle RAC to a specified instance

Source: Internet
Author: User

In some specific circumstances, sometimes you need to connect to the specified instance in RAC from the client, instead of dynamically selecting the client load_balance or forwarding the server listener Based on the load situation. In this case, you can add the instance_name subitem to the network service name specified in tnsnames. ora, or create a network service Name Pointing to the desired instance separately, which is described below.

 

I. Test Environment

--> Oracle SQL> select * from V $ version where rownum <2; banner Upgrade Oracle Database 10g Release 10.2.0.3.0-64bit production --> OS version SQL> Ho CAT/etc/issuewelcome to SuSE Linux Enterprise Server 10 SP3 (x86_64) -kernel \ r (\ L ). --> RAC related information SQL> Ho/users/Oracle/crs_stat.sh Resource Name target State ------------ ------ ----- ora. gobo4.gobo4 A. inst online on bo2dbp ora. gobo4.gobo4b. inst online on bo2dbs ora. gobo4.db online on bo2dbp ora. bo2dbp. asm1.asm online on bo2dbp ora. bo2dbp. listener_bo2dbp.lsnr online on bo2dbp ora. bo2dbp. GSD online on bo2dbp ora. bo2dbp. ONS online on bo2dbp ora. bo2dbp. VIP online on bo2dbp ora. bo2dbs. asm2.asm online on bo2dbs ora. bo2dbs. listener_bo2db S. lsnr online on bo2dbs ora. bo2dbs. GSD online on bo2dbs ora. bo2dbs. ONS online on bo2dbs ora. bo2dbs. VIP online on bo2dbs --> listener parameter SQL on instance gobo4a> show parameter instance_namename type value =------------------------------------ instance_name string gobo4asql> show parameter listenername type parameter value limit -------------------------------- ---- ----------- Listener local_listener listener string listener --> listener parameter SQL on instance gobo4b> show parameter instance_namename type value =----------- instance_name string gobo4bsql> show parameter listener name type value =----------- response --------------------------------------------------------------------- -------- Local_listener stringremote_listener string remote_lsnr_gobo4 --> tnsnames on the server side. orasql> Ho more $ ORACLE_HOME/Network/admin/tnsnames. ora # tnsnames. ora network configuration file:/u01/Oracle/DB/Network/admin/tnsnames. ora # generated by Oracle configuration tools. remote_lsnr_gobo4 = (address_list = (address = (Protocol = TCP) (host = 192.168.7.61) (Port = 1521) (address = (Protocol = TCP) (host = 192.168.7.62) (Port = 1521) --> client tnsnames. ora (Client: SuSE 10) Oracle @ szdb: ~> Tail-10 $ ORACLE_HOME/Network/admin/tnsnames. oragbo4 = (description = (address = (Protocol = TCP) (host = 192.168.7.61) (Port = 1521) (address = (Protocol = TCP) (host = 192.168.7.62) (Port = 1521) (load_balance = yes) (CONNECT_DATA = (Server = dedicated) (SERVICE_NAME = gobo4 )))

2. Test login to a specified instance

1. When using multiple IP addresses to log on to the network service, you need to add the instance_name item for the gobo4 network service name, the modified condition is as follows: gobo4 = (description = (address = (Protocol = TCP) (host = 192.168.7.61) (Port = 1521) (address = (Protocol = TCP) (host = 192.168.7.62) (Port = 1521) (load_balance = yes) (CONNECT_DATA = (Server = dedicated) (SERVICE_NAME = gobo4) (instance_name = gobo4b) # This item is newly added) Oracle @ szdb: ~> More./silent_login.sh #! /Bin/bashsqlplus-S system/Oracle @ $ {1} <eofselect instance_name from V \ $ instance; eofexitoracle @ szdb: ~> ./Silent_login.sh gobo4instance_name -------------- gobo4boracle @ szdb: ~> !!. /Silent_login.sh gobo4instance_name -------------- gobo4boracle @ szdb: ~> !!. /Silent_login.sh GOBO4INSTANCE_NAME----------------GOBO4B2, create a separate network connection service name for each instance -- as follows, add the following network service name to the tnsnames. ora client Oracle @ szdb: ~> Echo "> gobo4a => (description => (address = (Protocol = TCP) (host = 192.168.7.61) (Port = 1521)> (CONNECT_DATA => (Server = dedicated)> (SERVICE_NAME = gobo4)> (instance_name = gobo4a)>) "> $ ORACLE_HOME/Network/admin/tnsnames. oraoracle @ szdb: ~> Tnsping gobo4aused parameter files: used tnsnames adapter to resolve the aliasattempting to contact (description = (address = (Protocol = TCP) (host = 192.168.7.61) (Port = 1521 )) (CONNECT_DATA = (Server = dedicated) (SERVICE_NAME = gobo4) (instance_name = gobo4a) OK (70 msec) Oracle @ szdb: ~> ./Silent_login.sh gobo4ainstance_name -------------- gobo4aoracle @ szdb: ~> !!. /Silent_login.sh gobo4ainstance_name -------------- gobo4aoracle @ szdb: ~> !! # Author: Robinson # blog: http://blog.csdn.net/robinson_0612./silent_login.sh GOBO4AINSTANCE_NAME----------------GOBO4A

Iii. Summary
1. In the case of multi-IP service, you can add instance_name to point to a specific instance.
2. You can create a separate network service name for a specific instance.
3. individuals prefer to use a separate network service name to connect to a specified instance.

 

Iv. More references

For more information about Oracle RAC, see
Use crs_setperm to modify the resource owner and permissions of RAC.
Use crs_profile to manage RAC resource configuration files
RAC database startup and Shutdown
Oracle RAC services
Services in Oracle Database 10g
Migrate datbase from single instance to Oracle RAC
Connect Oracle RAC to a specified instance
Oracle RAC load balancing test (combined with server and client)
Oracle RAC server connection Load Balance)
Load Balance)
Non-Default port listening configuration in Oracle RAC (listener. ora tnsnames. ora)
Oracle RAC Listener Configuration (listener. ora tnsnames. ora)
Configure RAC load balancing and Failover
CRS-1006, CRS-0215 fault case
Installing Oracle 10g RAC Based on Linux (RHEL 5.5)
Use runcluvfy to verify the Oracle RAC installation environment

For more information about the basics and concepts of Oracle network configuration, see:
Configure dynamic service registration for non-default ports
Configure sqlnet. ora to restrict IP Access to Oracle
Configure and manage Oracle listener logs
Set the Oracle listener password (listener)
Configure the Oracle client to connect to the database

For more information about user-managed backup and recovery, see
Oracle cold backup
Oracle Hot Backup
Concept of Oracle backup recovery
Oracle instance recovery
Oracle recovery based on user management
System tablespace management and Backup Recovery
Sysaux tablespace management and recovery
Oracle backup control file recovery (unsing backup controlfile)

For information on RMAN backup recovery and management, see
RMAN overview and architecture
RMAN configuration, Monitoring and Management
Detailed description of RMAN backup
RMAN restoration and recovery
Create and use RMAN catalog
Create RMAN storage script based on catalog
Catalog-based RMAN backup and recovery
RMAN backup path confusion
Use RMAN for recovery from different machine backups (WIN platform)
Use RMAN to migrate a file system database to ASM
Linux RMAN backup shell script
Use RMAN to migrate the database to a different machine

For the Oracle architecture, see
Oracle tablespace and data files
Oracle Password File
Oracle parameter file
Oracle online redo log file)
Oracle Control File)
Oracle archiving logs
Oracle rollback and undo)
Oracle database instance startup and Shutdown Process
Automated Management of Oracle 10g SGA
Oracle instances and Oracle databases (Oracle Architecture)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.