Fixed the problem that Oracle11gR2 PLSQL cannot be remotely connected to a virtual machine

1. Turn off the default firewall

  1. systemctl stop firewalld.service #停止firewall  
  2. systemctl disable firewalld.service #Prohibit firewall from starting  
  3. firewall-cmd --state #View the default firewall status (notrunning is displayed when it is closed, and running is displayed when it is opened)
  4. It is recommended not to use the default firewall, configure the iptables firewall, refer to: http://gqsunrise.iteye.com/blog/2370140

 

2. Modify the listener.ora in the installation directory (/oracle/product/**/network/admin/listener.ora)

before fixing:
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )
  )

 

After modification:
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = /oracle/product/11.2.0/db_1/)
      (SID_NAME = orcl)
    )
    (SID_DESC =
       (GLOBAL_DBNAME = orcl)
       (ORACLE_HOME = /oracle/product/11.2.0/db_1/)
       (SID_NAME = orcl)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )
  )

 3. Restart the monitor and restart the Oracle service

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326350747&siteId=291194637