安装Oracle后远程连接报ORA-12547

2019年8月25日21:50:21
评论

一、错误代码:ORA-12547
    症状:
    (1)Oracle监听和服务启动一切正常,未报任何错误
    (2)查看日志未报任何异常信息
    (3)服务器本机命令方式可以连接oracle,可以执行查询命令
    (4)客服机无法连接,报错ORA-12547

解决方案,需要修改三个文件:
(1)修改/etc/hosts,如下:

127.0.0.1               localhost.localdomain localhost
::1             localhost6.localdomain6 localhost6
192.168.1.168           your_hostname.com your_hostname

(2)listener.ora (注意:需要修改为如下内容,不然会报错:ORA-12514)

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = ORCL)
      (ORACLE_HOME = /opt/oracle/product/10g)
      (SID_NAME = ORCL)
    )
    (SID_DESC =
      (PROGRAM = extproc)
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = /opt/oracle/product/10g)
    )
  )

  LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
      (ADDRESS = (PROTOCOL = TCP)(HOST = your_hostname.com)(PORT = 1521))
    )
  )

(3)tnsnames.ora
ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = your_hostname.com)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = ORCL)
    )
  )

EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    )
    (CONNECT_DATA =
      (SID = PLSExtProc)
      (PRESENTATION = RO)
    )
  )

二、错误代码:ORA-01034 ORA-27101

需要检查以下三个地方
(1)环境变量oracle_sid与监听器里面设置的是否一致
(2)环境编辑oracle_home与监听器里面设置的是否一致
(3)内存和磁盘空间是否足够(例如可能是oracle所在分区的磁盘空间已经不足)

其它:如果以上全部正常,重启oracle依然无法解决问题,

      就需要注意启动oracle采用以下方式:sqlplus '/ as sysdba'

企鹅博客
  • 本文由 发表于 2019年8月25日21:50:21
  • 转载请务必保留本文链接:https://www.qieseo.com/184145.html

发表评论