Configure the client to connect to the ASM instance

Source: Internet
Author: User
Tags sqlplus

For Oracle network configuration, we usually use negmgr or netca to connect the client to the database instance. You can also connect to the ASM instance from a client. However, Oracle does not provide a tool for us to complete the configuration. We can manually configure the listener and the client tnsnames. This section describes and provides examples.

1. server and client environments # server environment, host information Oracle @ bo2dbp: ~> CAT/etc/hosts | grep VIP 192.168.7.61 bo2dbp-vip.2gotrade.com bo2dbp-vip 192.168.7.62 bo2dbs-vip.2gotrade.com bo2dbs-vip # operating system and Oracle version Oracle @ bo2dbp: ~> CAT/etc/issue welcome to SuSE Linux Enterprise Server 10 SP3 (x86_64)-kernel \ r (\ L). Oracle @ bo2dbp: ~> Sqlplus-v SQL * Plus: Release 10.2.0.3.0-production # server environment, cluster information: Oracle @ bo2dbp: ~>. /Crs_stat.sh Resource Name target State -------------- ------ ----- ora. gobo4.gobo4a. 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 Line on bo2dbp ora. bo2dbs. asm2.asm online on bo2dbs ora. bo2dbs. listener_bo2dbs.lsnr online on bo2dbs ora. bo2dbs. GSD online on bo2dbs ora. bo2dbs. ONS online on bo2dbs ora. bo2dbs. VIP online on bo2dbs # client information c: \ Users \ Robinson. cheng> systeminfo Host Name: pc39 OS name: Microsoft Windows 7 Professional OS Version: 6.1.7600 N/A build 7600 OS manufacturer: Microsoft Corpo Ration system type: x64-based PC c: \ Users \ Robinson. Cheng> sqlplus-v SQL * Plus: Release 10.2.0.3.0-production2. Listener status Oracle @ bo2dbs: ~> LSNRCTL status listener_bo2dbs | grep ASM service "+ ASM" has 1 instance (s ). # We can see that the ASM instance is in the blocked status instance "+ asm2", status blocked, has 1 handler (s) for this service... service "+ asm_xpt" has 1 instance (s ). instance "+ asm2", status blocked, has 1 handler (s) for this service... 3. Allocate ASM Sid # use the following ASM configuration information to modify the Listener Configuration File item node1 node2 ------ -------- ----------- hostname bo2dbp bo2dbs Oracle SID gobo4a g Obo4b ASM Sid + ASM1 + asm2 ASM global dB name (Service name) + ASM + asm4, modify the Listener Configuration File listener. ora # For Listener Configuration, only add the Sub-item sid_desc # the following content is displayed after adding Oracle @ bo2dbp: ~> More $ ORACLE_HOME/Network/admin/listener. ora # listener. ora. bo2dbp network configuration file:/u01/Oracle/DB/Network/admin/listener. ora. bo2dbp # generated by Oracle configuration tools. listener_bo2dbp = (description_list = (description = (address = (Protocol = TCP) (host = bo2dbp-vip.2gotrade.com) (Port = 1521) (IP = first) (address = (Protocol = TCP) (host = 192.168.7.51) (Port = 1521) (IP = first ))) Sid_list_listener_bo2dbp = (sid_list = (sid_desc = (sid_name = plsextproc) (ORACLE_HOME =/u01/Oracle/DB) (program = EXTPROC) (sid_desc = # This entire sid_desc item is the newly added entry (sid_name = + ASM1) (global_dbname = + ASM) (ORACLE_HOME =/u01/Oracle/DB) of the ASM1 instance ))) oracle @ bo2dbs: ~> More $ ORACLE_HOME/Network/admin/listener. ora # listener. ora. bo2dbs network configuration file:/u01/Oracle/DB/Network/admin/listener. ora. bo2dbs # generated by Oracle configuration tools. listener_bo2dbs = (description_list = (description = (address = (Protocol = TCP) (host = bo2dbs-vip.2gotrade.com) (Port = 1521) (IP = first) (address = (Protocol = TCP) (host = 192.168.7.52) (Port = 1521) (IP = first ))) Sid_list_listener_bo2dbs = (sid_list = (sid_desc = (sid_name = plsextproc) (ORACLE_HOME =/u01/Oracle/DB) (program = EXTPROC )) (sid_desc = # This entire sid_desc item is the entry added to the asm2 instance (sid_name = + asm2) (global_dbname = + ASM) (ORACLE_HOME =/u01/Oracle/DB ))) 5. Restart the listener Oracle @ bo2dbp: ~> Srvctl stop listener-N bo2dbp Oracle @ bo2dbp: ~> Srvctl start listener-N bo2dbp Oracle @ bo2dbp: ~> Srvctl stop listener-N bo2dbs Oracle @ bo2dbp: ~> Srvctl start listener-N bo2dbs # view listener status Oracle @ bo2dbp: ~> LSNRCTL status listener_bo2dbp | grep ASM service "+ ASM" has 2 instance (s ). # You can see that one of the multiple locations is in the unknown state, indicating that the static registration method is used for instance "+ ASM1", status unknown, has 1 handler (s) for this service... instance "+ ASM1", status blocked, has 1 handler (s) for this service... service "+ asm_xpt" has 1 instance (s ). instance "+ ASM1", status blocked, has 1 handler (s) for this service... oracle @ bo2dbs: ~> LSNRCTL status listener_bo2dbs | grep ASM service "+ ASM" has 2 instance (s ). # in example 2, the listener also has an unknown + asm2 instance "+ asm2", status unknown, has 1 handler (s) for this service... instance "+ asm2", status blocked, has 1 handler (s) for this service... service "+ asm_xpt" has 1 instance (s ). instance "+ asm2", status blocked, has 1 handler (s) for this service... # Author: Robinson # blog: http://blog.csdn.net/robinson_0612 6. Configure the client tnsnames # windons client tnsnames. add the following configuration entry gobo4_asm1 = (description = (address_list = (address = (Protocol = TCP) (host = 192.168.7.61) (Port = 1521) to ora ))) (CONNECT_DATA = (SERVICE_NAME = + ASM) gobo4_asm2 = (description = (address_list = (address = (Protocol = TCP) (host = 192.168.7.62) (Port = 1521 ))) (CONNECT_DATA = (SERVICE_NAME = + ASM) 7. Test connecting to the ASM instance c: \ Users \ Robinson. cheng> sqlplus-s sys/Oracle @ gobo4_asm1 as sysdba @ inst instance_name host_name status ------------------ -------------------------- ---------- + ASM1 bo2dbp started C: \ Users \ Robinson. cheng> sqlplus-s sys/Oracle @ gobo4_asm2 as sysdba @ inst instance_name host_name status ------------------ ---------------------------- ---------- + asm2 bo2dbs started

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)

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.