原文地址:http://blog.csdn.net/hanfei0000cool/article/details/51038858
解决方式:Oracle用户下
1.执行sqlplus / as sysdba;
2.修改local_listener参数,sql> alter system set local_listener='';
3,再重新注册服务,sql> alter system register;
4.sql>exit;
5.查看注册情况,$ lsnrctl status
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "dg1.oracle.com" has 1 instance(s).
Instance "dg", status READY, has 4 handler(s) for this service...
Service "dg1_XPT.oracle.com" has 1 instance(s).
Instance "dg", status READY, has 4 handler(s) for this service...
Service "hr.oracle.com" has 1 instance(s).
Instance "dg", status READY, has 4 handler(s) for this service...
Service "oa.oracle.com" has 1 instance(s).
Instance "dg", status READY, has 4 handler(s) for this service...
Service "dg1.oracle.com" has 1 instance(s).
Service "dg1_XPT.oracle.com" has 1 instance(s).
Service "hr.oracle.com" has 1 instance(s).
Service "oa.oracle.com" has 1 instance(s).
service_names中定义的服务都成功动态注册到listener。
远程pl/sql连接数据库成功。
如果plsql还不能连接,请检查防火墙设置
service iptables status
如果防火墙开着,请关闭防火墙:
1)永久性生效,重启后不会复原
开启: chkconfig iptables on 关闭: chkconfig iptables off
2)即时生效,重启后复原
开启: service iptables start 关闭: service iptables stop