SQL> conn sys/ as sysdba
请输入口令:
已连接。
SQL> show parameter service_na
NAME TYPE VALUE
------------------------------------ ----------- -----------------------------
service_names string oracle9i.com
SQL> conn scott/tiger
已连接。
SQL> conn scott/tiger@oracle9i
已连接。
当用全局服务名时,就报超时
SQL> conn scott/tiger@oracle9i.com
ERROR:
ORA-12535: TNS: 操作超时
警告: 您不再连接到 ORACLE。
C:Documents and Settingsxy>tnsping oracle9i.com
TNS Ping Utility for 32-bit Windows: Version 9.2.0.1.0 - Production on 02-1月 -2
007 11:53:42
Copyright (c) 1997 Oracle Corporation. All rights reserved.
已使用的参数文件:
C:oracleproduct9.2.0networkadminsqlnet.ora
已使用 HOSTNAME 适配器来解析别名
Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SID=*)(SERVICE_NAME=oracle9i.c
om))(ADDRESS=(PROTOCOL=TCP)(HOST=oracle9i.com)(PORT=1521)))
TNS-12535: TNS: 操作超时
C:WINDOWSsystem32driversetc目录下的HOST文件后(添加了 127.0.0.1 oracle9i.com)
C:Documents and Settingsxy>tnsping oracle9i.com
TNS Ping Utility for 32-bit Windows: Version 9.2.0.1.0 - Production on 02-1月 -2
007 11:59:21
Copyright (c) 1997 Oracle Corporation. All rights reserved.
已使用的参数文件:
C:oracleproduct9.2.0networkadminsqlnet.ora
已使用 HOSTNAME 适配器来解析别名
Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SID=*)(SERVICE_NAME=oracle9i.c
om))(ADDRESS=(PROTOCOL=TCP)(HOST=oracle9i.com)(PORT=1521)))
OK(0毫秒)
SQL> conn scott/tiger@oracle9i.com
已连接。
但连接企业管理器时,依然报错,发现oracleora90networkadmintnsnames.ora忘了添加oracle9i这个服务名
添加以后,OK
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/8382469/viewspace-259864/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/8382469/viewspace-259864/