hostname方式是通过client端hostname连接数据库,无需配置tns![@more@]
1. HOSTNAME
修改listener.ora中的如下信息
(SID_DESC =
(GLOBAL_DBNAME = your_hostname) --你的机器名
(ORACLE_HOME = E:oracleora92) --oracle home
(SID_NAME = orcl) --sid name
)
然后在客户端的sqlnet.ora中,确保有
NAMES.DIRECTORY_PATH= (HOSTNAME)
无需在client端配置tns
测试一下:
SQL*Plus: Release 10.2.0.1.0 - Production on 星期四 6月 26 09:56:03 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
我的主机名是xys