Oracle 配置远程访问教程
程序员文章站
2022-03-04 20:10:28
服务端配置
如果不想自己写,可以通过 net manager 来配置.
以下配置文件中的 localhost 改为 ip 地址,否则,远程不能访问.
1.网络监听配置...
服务端配置
如果不想自己写,可以通过 net manager 来配置.
以下配置文件中的 localhost 改为 ip 地址,否则,远程不能访问.
1.网络监听配置
# listener.ora network configuration file: c:\app\administrator\product\11.2.0\dbhome_1\network\admin\listener.ora # generated by oracle configuration tools. sid_list_listener = (sid_list = (sid_desc = (sid_name = clrextproc) (oracle_home = c:\app\administrator\product\11.2.0\dbhome_1) (program = extproc) (envs = "extproc_dlls=only:c:\app\administrator\product\11.2.0\dbhome_1\bin\oraclr11.dll") ) ) listener = (description_list = (description = (address = (protocol = ipc)(key = extproc1521)) (address = (protocol = tcp)(host = localhost)(port = 1521)) ) ) adr_base_listener = c:\app\administrator
多个ip时,如下:
listener = (description_list = (description = (address = (protocol = ipc)(key = extproc1521)) ) (description = (address = (protocol = tcp)(host = 172.24.226.2)(port = 1521)) ) (description = (address = (protocol = tcp)(host = 172.24.226.3)(port = 1521)) ) )
2.tns 配置
# tnsnames.ora network configuration file: c:\app\administrator\product\11.2.0\dbhome_1\network\admin\tnsnames.ora # generated by oracle configuration tools. orcl= (description = (address = (protocol = tcp)(host = localhost)(port = 1521)) (connect_data = (server = dedicated) (service_name = orcl) ) ) oraclr_connection_data = (description = (address_list = (address = (protocol = ipc)(key = extproc1521)) ) (connect_data = (sid = clrextproc) (presentation = ro) ) ) listener_orcl = (address = (protocol = tcp)(host = localhost)(port = 1521))
多个ip时,如下:
orcl = (description = (address_list = (address = (protocol = tcp)(host = 172.24.226.2)(port = 1521)) (address = (protocol = tcp)(host = 172.24.226.3)(port = 1521)) ) (source_route = yes) (connect_data = (server = dedicated) (service_name = orcl) ) )
3.停止和启动服务
先停止以下服务,然后再启动.
oracleoradb11g_hometnslistener oracleservice*
客户端配置
1.下载 odac 压缩包.
2.解压下载的 odac 压缩包.
3.执行安装命令
示例:
install.bat all d:\program\odac\12040x64 oraclehome true
4.添加环境变量
oracle_home : 是 odac 安装的目录.
tns_admin : 是文件 tnsnames.ora 所在的目录,一般为 odac 安装目录下的 network\admin 中.
注: tns_admin 可以不用添加,直接将 tnsnames.ora 文件复制到 odac 安装目录下即可
将 %oracle_home% 添加到 path 环境变量中.
5.配置 tns
在配置文件 tnsnames.ora 中加入
dborcl = (description = (address = (protocol = tcp)(host = <db-host>)(port = 1521)) (connect_data = (server = dedicated) (service_name = <db-name>) ) )
说明:
<db-host> : 数据库电脑的ip或者是计算机名
<db-name> : 数据库tns配置的名称
总结
以上所述是小编给大家介绍的oracle 配置远程访问教程,希望对大家有所帮助
上一篇: 基于Redis分布式锁的实现代码
推荐阅读
-
Linux 7.4上安装配置Oracle 11.2.0.4图文教程
-
Oracle 11g2的监听器配置教程
-
Linux 安装JDK Tomcat MySQL的教程(使用Mac远程访问)
-
Windows10 x64安装、配置Oracle 11g过程记录(图文教程)
-
Oracle 11g 安装配置图文教程
-
mac下配置和访问阿里云服务器(Ubuntu系统)的图文教程
-
Windows 64位下装安装Oracle 11g,PLSQL Developer的配置问题,数据库显示空白的完美解决方案(图文教程)
-
安装mysql 8.0.17并配置远程访问的方法
-
Oracle11g数据库win8.1系统安装配置图文教程
-
oracle 11gR2 win64安装配置教程另附基本操作