VonGates 學習筆記
===========================================================
ASM--How to connect to ASM instance from a remote client
===========================================================
随着ASM被广泛的使用,最近重新整理一些管理ASM实例的脚本方便以后使用,之前习惯在主机上做脚本测试,所以没有想过在客户端来查询管理ASM实例。我们都知道ASM类型的实例,在初始化文件中需指定instance_type=ASM,在ASM实例建立后需手工设定listener,可以通过修改listener.ora或tnsnames.ora和local_listener初始化参数来完成。最关键的一点需在TNS的connect_data字串加入(UR=A)

1.TNS配置文件的设定

$ vi tnsnames.ora
"tnsnames.ora" 63 lines, 1360 characters
# tnsnames.ora Network Configuration File: /opt/oracle/10.2.0/db/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

LISTENER_+ASM =
(ADDRESS = (PROTOCOL = TCP)(HOST = ASMTEST01)(PORT = 1598))

ASM =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ASMTEST01)(PORT = 1598))
(CONNECT_DATA =
(SERVER = DEDICATED)
(UR=A)
(SERVICE_NAME = +ASM)
)
)

2.listener在初始化参数据的设定

SQL> show parameter list

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
local_listener string LISTENER_+ASM

3.连接测试OK
SQL> conn
sys@asm as sysdba
Enter password:
Connected.
SQL>

4.常见出错信息:

---------------
--remote client
---------------
H:>tnsping asm

TNS Ping Utility for 32-bit Windows: Version 9.2.0.1.0 - Production on 13-FEB-20
08 13:19:41

Copyright (c) 1997 Oracle Corporation. All rights reserved.

Used parameter files:
c:userdataadminsqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = ASMTEST01)(PORT = 1598)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = +ASM)))
OK (1440 msec)

H:>sqlplus /nolog

SQL*Plus: Release 9.2.0.1.0 - Production on Wed Feb 13 13:19:50 2008

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

SQL> conn sys@asm as sysdba
Enter password:
ERROR:
ORA-12528: Message 12528 not found; product=RDBMS; facility=ORA


SQL> exit
H:>tnsping asm

TNS Ping Utility for 32-bit Windows: Version 9.2.0.1.0 - Production on 13-FEB-20
08 13:21:25

Copyright (c) 1997 Oracle Corporation. All rights reserved.

Used parameter files:
c:userdataadminsqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = ASMTEST01)(PORT = 1598)) (CONNECT_DATA = (SERVER = DEDICATED) (UR=A) (SERVICE_NAME = +ASM)))
OK (440 msec)

H:>sqlplus /nolog

SQL*Plus: Release 9.2.0.1.0 - Production on Wed Feb 13 13:21:35 2008

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

SQL> conn sys@asm as sysdba
Enter password:
Connected.
SQL>

========================
---local server
========================
$ tnsping asm

TNS Ping Utility for HPUX: Version 10.2.0.3.0 - Production on 13-FEB-2008 10:21:54

Copyright (c) 1997, 2006, Oracle. All rights reserved.

Used parameter files:
/opt/oracle/10.2.0/db/network/admin/sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = ASMTEST01)(PORT = 1598)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = +ASM)))
OK (0 msec)
$ sqlplus /nolog

SQL*Plus: Release 10.2.0.3.0 - Production on Wed Feb 13 10:28:41 2008

Copyright (c) 1982, 2006, Oracle. All Rights Reserved.

SQL> conn sys@asm as sysdba
Enter password:
ERROR:
ORA-12528: TNS:listener: all appropriate instances are blocking new connections


SQL> !

vongates 发表于:2008.02.13 13:59 ::分类: ( 10gR2 ) ::阅读:(995次) :: 评论 (0)

发表评论
标题

在此添加评论
表情符号: smile laughing tongue angry crying sad wassat wink

称呼

邮箱地址(可选)

个人主页(可选)

 authimage


自我介绍
切换风格
新闻聚合
博客日历
文章归档...
最新发表...
最新评论...
最多阅读文章...
最多评论文章...
博客统计...
Blog信息
网站链接...