Oracle static Listener Configuration example

Source: Internet
Author: User
In some cases, for example, you need to configure static registration for the listener. ora of the standby database when performing the upload uard operation.

In some cases, for example, the listener. ora of the standby database needs to be configured for static registration when data guard is used.

In some cases, for example, the listener. ora of the standby database needs to be configured for static registration when data guard is used.

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 =/u01

2. view the listening status -- UNKNOW

[Oracle @ bys001 admin] $ lsnrctl start

LSNRCTL for Linux: Version 11.2.0.1.0-Production on 05-SEP-2013 14:55:44

Copyright (c) 1991,200 9, 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 successfully

3. TNS file configuration
[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. login test:
Login with a normal account: ORACLE is not enabled and cannot be logged in.

[Oracle @ bys001 admin] $ sqlplus aa/aa @ bys1

SQL * Plus: Release 11.2.0.1.0 Production on Thu Sep 5 15:12:39 2013

Copyright (c) 1982,200 9, Oracle. All rights reserved.

ERROR:
A 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] $

You can use the SYSDBA account to log on to an idle instance.
[Oracle @ bys001 admin] $ sqlplus sys/oraclesys @ bys1 as sysdba

SQL * Plus: Release 11.2.0.1.0 Production on Thu Sep 5 15:12:54 2013

Copyright (c) 1982,200 9, Oracle. All rights reserved.

Connected to an idle instance.

SYS @ bys1>
SYS @ bys1> exit
Disconnected

Related reading:

Dynamic Registration and static registration of Oracle listeners

Configuration of Oracle dual listener

Six connection problems and solutions for Oracle listeners

Listener Configuration for Oracle 11g2

Oracle Database Listener Suspension

,

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.