接上一篇:plsql连接 oracle instantclient_11_2 本地机器不安装oracle_02
https://gblfy.blog.csdn.net/article/details/118115893
文章目录
- 1. 启动虚拟机
- 2. 登录虚拟机
- 3. 开启网络
- 4. 获取ip地址
- 5. ssh工具连接
- 6. 查看Oracle监听运行状态
- 7. 本地监听添加连接串
- 8. plsq连接远程oracle
1. 启动虚拟机
2. 登录虚拟机
用户 | 密码 |
---|---|
oracle | oracle |
bea | s开头 soft结尾 |
3. 开启网络
4. 获取ip地址
ifconfig
5. ssh工具连接
6. 查看Oracle监听运行状态
[oracle@amadeus-oratest ~]$ lsnrctl statusLSNRCTL for Linux: Version 11.2.0.1.0 - Production on 22-JUN-2021 20:43:08Copyright (c) 1991, 2009, Oracle. All rights reserved.Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 22-JUN-2021 20:31:44
Uptime 0 days 0 hr. 11 min. 23 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /app/oracle/diag/tnslsnr/amadeus-oratest/listener/alert/log.xml
Listening Endpoints Summary...(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=amadeus-oratest)(PORT=1521)))
Services Summary...
Service "lisdb" has 1 instance(s).Instance "lisdb", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[oracle@amadeus-oratest ~]$
7. 本地监听添加连接串
找到本地tnsnames.ora
监听文件位置
我的位置J:\SOFTWARE\plsql\instantclient_11_2\network\ADMIN\tnsnames.ora
101 =(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.101)(PORT = 1521))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = lisdb)))
8. plsq连接远程oracle
用户 | 密码 | 备注 |
---|---|---|
lis | lis | lis属于dba用户 |
select * from dual;