Oracle远程连接数据库设置
开发程序的过程中,有时需要连接远程服务器上的Oracle数据库系统。这就需要用到Oracle的host配置文件了。当然前提是你要安装plsql程序,还有oracle客户端或者oracle的完整数据库系统。找到安装路径oracle下的network\admin目录。我的安装路径为:
D:\oracle\product\10.2.0\db_1\NETWORK\ADMIN 看到了tnsnames.ora文件
# tnsnames.ora Network Configuration File: # Generated by Oracle configuration tools.# 本地数据库:ORCL:表示名称,host=***表示地址(本地/远程)# PORT=***为端口,SERVICE_NAME=orcl 表示本地连接;# SID=orcl:表示远程连接的ORCL = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl) ) )192.168.2.100_ORCL = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.100)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SID = orcl) ) )