时间:2021-07-01 10:21:17 帮助过:22人阅读
对于Oracle 网络配置,我们通常通过negmgr或者netca来完成客户端连接到数据库实例。而对于连接到ASM实例,同样可以实现从客户端来
对于Oracle 网络配置,我们通常通过negmgr或者netca来完成客户端连接到数据库实例。而对于连接到ASM实例,同样可以实现从客户端来进行连接。不过Oracle并未为我们提供工具来完成配置,,我们可以通过手动配置监听以及客户端tnsnames来实现。本文对此给出描述与示例。
1、服务器端、客户端的环境
#服务器端环境,host信息
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
#操作系统及Oracle版本
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
#服务器端环境,集群信息
oracle@bo2dbp:~> ./crs_stat.sh
Resource name Target State
-------------- ------ -----
ora.GOBO4.GOBO4A.inst ONLINE ONLINE on bo2dbp
ora.GOBO4.GOBO4B.inst ONLINE ONLINE on bo2dbs
ora.GOBO4.db ONLINE ONLINE on bo2dbp
ora.bo2dbp.ASM1.asm ONLINE ONLINE on bo2dbp
ora.bo2dbp.LISTENER_BO2DBP.lsnr ONLINE ONLINE on bo2dbp
ora.bo2dbp.gsd ONLINE ONLINE on bo2dbp
ora.bo2dbp.ons ONLINE ONLINE on bo2dbp
ora.bo2dbp.vip ONLINE ONLINE on bo2dbp
ora.bo2dbs.ASM2.asm ONLINE ONLINE on bo2dbs
ora.bo2dbs.LISTENER_BO2DBS.lsnr ONLINE ONLINE on bo2dbs
ora.bo2dbs.gsd ONLINE ONLINE on bo2dbs
ora.bo2dbs.ons ONLINE ONLINE on bo2dbs
ora.bo2dbs.vip ONLINE ONLINE on bo2dbs
#客户端信息
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 Corporation
System Type: x64-based PC
C:\Users\robinson.cheng>sqlplus -v
SQL*Plus: Release 10.2.0.3.0 - Production
2、监听器的状态
oracle@bo2dbs:~> lsnrctl status LISTENER_BO2DBS | grep ASM
Service "+ASM" has 1 instance(s). #可以看到ASM实例处于BLOCKED状态
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、分配ASM SID
#使用下面的ASM配置信息来修改监听器配置文件
Item Node1 Node2
------ -------- -----------
hostname bo2dbp bo2dbs
Oracle SID GOBO4A GOBO4B
ASM SID +ASM1 +ASM2
ASM Global DB Name (service name) +ASM +ASM