Welcome 微信登录
编程资源 图片资源库 蚂蚁家优选

首页 / 数据库 / MySQL / Oracle静态监听配置示例

有的情况下比如在做DATA GUARD时备库的listener.ora需要配置静态注册。1.listener.ora需要增加静态注册的相关语句:[Oracle@bys001 admin]$ cat listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = bys001.oel.com)(PORT = 1521))
    )
  )
SID_LIST_LISTENER=
  (SID_LIST =
   (SID_DESC =
      (GLOBAL_DBNAME = bystest)
      (ORACLE_HOME =/u01/app/oracle/product/11.2.0/dbhome_1)
      (SID_NAME = bys1)
    )
  )
ADR_BASE_LISTENER = /u012.查看监听状态--UNKNOW[oracle@bys001 admin]$ lsnrctl startLSNRCTL for Linux: Version 11.2.0.1.0 - Production on 05-SEP-2013 14:55:44Copyright (c) 1991, 2009, Oracle.  All rights reserved.Starting /u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...TNSLSNR for Linux: Version 11.2.0.1.0 - Production
System parameter file is /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /u01/diag/tnslsnr/bys001/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=bys001.oel.com)(PORT=1521)))Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=bys001.oel.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                   LISTENER
Version                 TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                05-SEP-2013 14:55:44
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level             off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File       /u01/diag/tnslsnr/bys001/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=bys001.oel.com)(PORT=1521)))
Services Summary...
Service "bystest" has 1 instance(s).
  Instance "bys1", status UNKNOWN, has 1 handler(s) for this service...The command completed successfully3 TNS文件的配置
[oracle@bys001 admin]$ cat tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.bys1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.211)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = bystest)
    )
  )4.登陆测试:
使用普通账户登陆:ORACLE未打开,无法登陆。[oracle@bys001 admin]$ sqlplus aa/aa@bys1SQL*Plus: Release 11.2.0.1.0 Production on Thu Sep 5 15:12:39 2013Copyright (c) 1982, 2009, Oracle.  All rights reserved.ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux Error: 2: No such file or directory
Process ID: 0
Session ID: 0 Serial number: 0
Enter user-name:
ERROR:
ORA-01017: invalid username/password; logon denied
Enter user-name:
ERROR:
ORA-01017: invalid username/password; logon denied
SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
[oracle@bys001 admin]$使用SYSDBA账户可以登陆到空闲实例
[oracle@bys001 admin]$ sqlplus sys/oraclesys@bys1 as sysdbaSQL*Plus: Release 11.2.0.1.0 Production on Thu Sep 5 15:12:54 2013Copyright (c) 1982, 2009, Oracle.  All rights reserved.Connected to an idle instance.SYS@bys1>
SYS@bys1>exit
Disconnected相关阅读:Oracle监听的动态注册和静态注册 http://www.linuxidc.com/Linux/2012-12/75812p2.htmOracle 双监听器的配置 http://www.linuxidc.com/Linux/2012-12/75814.htmOracle监听器出现的6种连接问题及其解决方法 http://www.linuxidc.com/Linux/2012-12/75568.htmOracle 11g2的监听器配置 http://www.linuxidc.com/Linux/2012-11/75159.htmOracle数据库的监听器挂起情况 http://www.linuxidc.com/Linux/2012-10/71833.htm更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12Oracle监听之动态监听与静态监听特点CentOS 6.4下实现Oracle的定时备份相关资讯      Oracle配置监听  Oracle静态监听 
  • Oracle监听之动态监听与静态监听特  (09/05/2013 16:31:23)
  • Oracle 数据库监听配置  (12/23/2012 10:28:00)
  • Oracle 11g RAC 环境下单实例非缺  (08/17/2013 09:00:45)
本文评论 查看全部评论 (0)
表情: 姓名: 字数


评论声