oracle客户端连接oracle服务器
1、配置监听器
2 启动监听器
启动成功!
3查看当前数据库local_listener的值
发现该参数没有值,没有设置动态注册的监听器信息
4,查看刚配置监听器listner1状态信息
没有任何服务注册
5 动态注册orcl数据库
注册完立即生效
alter system set local_listener=’(address_list=(address=(protocol=tcp)(host=192.168.1.107)(port=1521)))’;
6,查看listener1的状态信息,有无服务
可以看到orcl服务成功注册到监听器listener1
lsnrctl status listener1
7,客户端连接刚新增的监控器 listener1
打开PLSQL Developer 13 (32 bit)
设置客户端文件
8 设置 listener.ora
tnsname.ora
新增的监控器listener1配置如下
listener.ora Network Configuration File: /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.107)(PORT = 1521))
)
)
ADR_BASE_LISTENER = /home/oracle/app
LISTENER1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.107)(PORT = 1522))
)
)
ADR_BASE_LISTENER = /home/oracle/app
tnsnames.ora
tnsnames.ora Network Configuration File: /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
Generated by Oracle configuration tools.
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.107)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
MYORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.107)(PORT = 1522))
(CONNECT_DATA =
(SERVER = POOLED)
(SERVICE_NAME = orcl)
)
)
9登录PLSQL Developer 13
登录成功
登录navicat