监听独立于数据库服务器的配置,解决ORA-12520及ORA-12545错误

php中文网
发布: 2016-06-07 17:29:24
原创
1184人浏览过

监听独立于数据库服务器的配置,解决ORA-12520及ORA-12545错误

一、环境: 


1、linux主机ocm(192.168.217.130)作为数据库
 sys@OCM> select * from v$version;
 
BANNER
 --------------------------------------------------------------------------------
 Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
 
2、linux主机ocp(192.168.217.133)作为独立远程监听
 sys@OCP> select * from v$version;
 
BANNER
 --------------------------------------------------------------------------------
 Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
 
3、windows主机(192.168.217.2)作为客户端
  windows 7 


二、在ocm主机(192.168.217.130)上操作: 


1、配tnsnames.ora
 

LISTENER_OCP =
  (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.217.133)(PORT = 1521))
  )
 

2、配参数
 sys@OCM>  alter system set remote_listener=LISTENER_OCP;
 

3、查监听
 [oracle@ocm ~]$ lsnrctl status
 

MacsMind
MacsMind

电商AI超级智能客服

MacsMind 131
查看详情 MacsMind

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 29-MAY-2013 21:13:28
 

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

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
 STATUS of the LISTENER
 ------------------------
 Alias                    LISTENER
 Version                  TNSLSNR for Linux: Version 11.2.0.1.0 - Production
 Start Date                29-MAY-2013 20:34:42
 Uptime                    0 days 0 hr. 38 min. 47 sec
 Trace Level              off
 Security                  ON: Local OS Authentication
 SNMP                      OFF
 Listener Parameter File  /u01/app/oracle/product/11.2.0/network/admin/listener.ora
 Listener Log File        /u01/app/oracle/diag/tnslsnr/ocm/listener/alert/log.xml
 Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ocm.example.com)(PORT=1521)))
 Services Summary...
 Service "ocm" has 1 instance(s).
  Instance "ocm", status READY, has 1 handler(s) for this service...
 Service "ocmXDB" has 1 instance(s).
  Instance "ocm", status READY, has 1 handler(s) for this service...
 The command completed successfully

三、在ocp主机(192.168.217.133)上操作:
 

1、查监听
 
[oracle@ocp ~]$ lsnrctl status
 
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 29-MAY-2013 20:49:22
 
Copyright (c) 1991, 2011, Oracle.  All rights reserved.
 
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
 STATUS of the LISTENER
 ------------------------
 Alias                    LISTENER
 Version                  TNSLSNR for Linux: Version 11.2.0.3.0 - Production
 Start Date                29-MAY-2013 20:44:12
 Uptime                    0 days 0 hr. 5 min. 10 sec
 Trace Level              off
 Security                  ON: Local OS Authentication
 SNMP                      OFF
 Listener Parameter File  /u01/app/oracle/product/11.2.0/network/admin/listener.ora
 Listener Log File        /u01/app/oracle/diag/tnslsnr/ocp/listener/alert/log.xml
 Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ocp)(PORT=1521)))
 Services Summary...
 Service "ocm" has 1 instance(s).
  Instance "ocm", status READY, has 1 handler(s) for this service...
 Service "ocmXDB" has 1 instance(s).
  Instance "ocm", status READY, has 1 handler(s) for this service...
 Service "ocp" has 1 instance(s).
  Instance "ocp", status READY, has 1 handler(s) for this service...
 The command completed successfully
 
2、配tnsnames.ora
 remote_130 =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.217.133)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = ocm)
      )
 )
 
3.连接测试
 [oracle@ocm admin]$ sqlplus hr/hr@remote_130
 

SQL*Plus: Release 11.2.0.3.0 Production on Wed May 29 23:07:19 2013
 

最佳 Windows 性能的顶级免费优化软件
最佳 Windows 性能的顶级免费优化软件

每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。

下载
来源:php中文网
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
开源免费商场系统广告
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号