Navicat远程连接Oracle问题

数据库服务和管理,MySQL/PostgreSQL/Oracle/Sybase 等
回复
混世小萌羊
帖子: 8
注册时间: 2018-11-14 18:52
系统: Ubuntu 18.10
送出感谢: 1 次
接收感谢: 0

Navicat远程连接Oracle问题

#1

帖子 混世小萌羊 » 2018-11-24 13:29

  • 监听器状态

代码: 全选

[oracle@Fedora-Server root]$ lsnrctl status

LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 24-NOV-2018 12:31:12

Copyright (c) 1991, 2016, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.200)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date                24-NOV-2018 12:20:22
Uptime                    0 days 0 hr. 10 min. 50 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /opt/oracle/app/product/12.2.0/network/admin/listener.ora
Listener Log File         /opt/oracle/app/diag/tnslsnr/Fedora-Server/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.200)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "7b4faaa996841fdce053c801a8c0b6f5" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orcl" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
Service "pdborcl" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully
  • Oracle运行状态

代码: 全选

[oracle@Fedora-Server root]$ sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Sat Nov 24 12:37:40 2018

Copyright (c) 1982, 2016, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> 
  • listener配置

代码: 全选

[root@Fedora-Server admin]# vi listener.ora

# listener.ora Network Configuration File: /opt/oracle/app/product/12.2.0/network/admin/listener.ora
# Generated by Oracle configuration tools.

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.200)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )
  • tnsnames配置

代码: 全选

[root@Fedora-Server admin]# vi tnsnames.ora

# tnsnames.ora Network Configuration File: /opt/oracle/app/product/12.2.0/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

LISTENER_ORCL =
  (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.200)(PORT = 1521))


ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 0.0.0.0)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )
Navicat连接报错
tns:connect timeout occurred
笔记本IP 192.168.1.104

怎么配置这俩个文件才能连上Oracle
混世小萌羊
帖子: 8
注册时间: 2018-11-14 18:52
系统: Ubuntu 18.10
送出感谢: 1 次
接收感谢: 0

Re: Navicat远程连接Oracle问题

#2

帖子 混世小萌羊 » 2018-11-25 13:49

研究一下发现是防火墙的问题,将端口加入防火墙内。就可以连接
回复

回到 “数据库管理”