host naming:主机命名方法(客户端为windows xp,服务器端为linux+oracle 9i)
1、配置客户端的sqlnet.ora
sqlnet.authentication_services= (nts)
names.directory_path= (tnsnames, hostname)
2、配置服务器端的listener.ora
listener =
(description =
(address = (protocol = tcp)(host = linuxoracle)(port = 1521)) #注意host配置为主机名
)
sid_list_listener =
(sid_list =
(sid_desc =
(global_dbname = linuxoracle) #注意global_dbname为主机名
(oracle_home = /u01/app/oracle/product/9.2.0)
(sid_name = dg1)
)
(sid_desc =
(global_dbname = linuxoracle)
(oracle_home = /u01/app/oracle/product/9.2.0)
(sid_name = oemrep)
)
)
3、链接:
c:documents and settings ew>sqlplus system/lijie123@linuxoracle
注:
1、如果没有正确配置global_dbname,sqlplus连接时,会报如下错误:
ora-12514: tns: 监听程序当前无法识别连接描述符中请求的服务
2、ora-12154: tns: 无法解析指定的连接标识符。可能是客户端hosts或dns问题,打开hosts
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
127.0.0.1 localhost
修该为:
...............................................................
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
127.0.0.1 localhost
192.168.1.61 linuxoracle
