发表于: 2008.02.13 13:59
分类: 10gR2
出处: http://vongates.itpub.net/post/2553/454944
---------------------------------------------------------------
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> !











