Steps: 1. configure a non-default dynamic listener that runs on port 1525. by default, dynamic listeners must run at the same time. configure a static listener and run on port 1526. open these listeners and use sqlplus to log on to the test database with some parameters: SYS @ bys3showparameterserviceNAMETYPEVALUE --------------------
Steps: 1. configure a non-default dynamic listener that runs on port 1525. by default, dynamic listeners must run at the same time. configure a static listener and run on port 1526. open these listeners and use sqlplus to log on to the test database with the following parameters: SYS @ bys3show parameter service name type value --------------------
The procedure is roughly as follows: 1. configure a non-default dynamic listener and run on port 1525.
2. By default, dynamic listeners must run simultaneously.
3. configure a static listener to run on port 1526.
4. Open these listeners and use sqlplus to log on to the test.
Database parameters:
SYS @ bys3> show parameter service
NAME TYPE VALUE
-----------------------------------------------------------------------------
Service_names string bys3
SYS @ bys3> show parameter db_na
NAME TYPE VALUE
-----------------------------------------------------------------------------
Db_name string bys3
SYS @ bys3> show parameter db_unique
NAME TYPE VALUE
-----------------------------------------------------------------------------
Db_unique_name string bys3
SYS @ bys3> show parameter db_domain
NAME TYPE VALUE
-----------------------------------------------------------------------------
Db_domain string
SYS @ bys3> show parameter instance_na
NAME TYPE VALUE
-----------------------------------------------------------------------------
Instance_name string bys3
For more information about how to set and replace these parameters, see Dynamic and Static monitoring for ORACLE listeners.
Configure Default and non-default dynamic Listening 1. Configure listener. ora and add addresses and port entries for non-default dynamic listening [oracle @ bys3 admin] $ more 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 = bys3.bys.com) (PORT = 1525 ))
(ADDRESS = (PROTOCOL = TCP) (HOST = bys3.bys.com) (PORT = 1521 ))
)
)
ADR_BASE_LISTENER =/u01
2. Configure the local_listener parameter in the database. The statement is as follows: -- Copy several lines in listener. ora. Note that the parentheses for line breaks should not be missing. Alter system set local_listener = '(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = bys3.bys.com) (PORT = 1525 ))
(ADDRESS = (PROTOCOL = TCP) (HOST = bys3.bys.com) (PORT = 1521 )))';
SYS @ bys3> alter system register; -- manually register or wait for the last minute to enable PMON to automatically register dynamic listeners.
3. Check the listener status. The dynamic listener has been registered successfully: [oracle @ bys3 ~] $ Lsnrctl status
LSNRCTL for Linux: Version 11.2.0.4.0-Production on 14-JAN-2014 22:20:16
Copyright (c) 1991,201 3, Oracle. All rights reserved.
Connecting to (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = bys3.bys.com) (PORT = 1525 )))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0-Production
Start Date 14-JAN-2014 22:02:22
Uptime 0 days 0 hr. 17 min. 54 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/bys3/listener/alert/log. xml
Listening Endpoints Summary...
(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = bys3.bys.com) (PORT = 1525 )))
(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = bys3.bys.com) (PORT = 1521 )))
Services Summary...
Service "bys3" has 1 instance (s ).
Instance "bys3", status READY, has 1 handler (s) for this service...
The command completed successfully4. use SQLPLUS for Logon test: [oracle @ bys3 admin] $ cat tnsnames. ora
Bys3 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = bys3.bys.com) (PORT = 1521 ))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = bys3)
)
)
Test =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = bys3.bys.com) (PORT = 1525 ))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = bys3)
)
)
[Oracle @ bys3 admin] $ tnsping test
TNS Ping Utility for Linux: Version 11.2.0.4.0-Production on 14-JAN-2014 22:30:42
Copyright (c) 1997,201 3, Oracle. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = bys3.bys.com) (PORT = 1525) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = bys3 )))
OK (0 msec)
[Oracle @ bys3 admin] $ tnsping bys3
TNS Ping Utility for Linux: Version 11.2.0.4.0-Production on 14-JAN-2014 22:30:46
Copyright (c) 1997,201 3, Oracle. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = bys3.bys.com) (PORT = 1521) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = bys3 )))
OK (10 msec)
[Oracle @ bys3 admin] $ sqlplus bys/bys @ bys3
SQL * Plus: Release 11.2.0.4.0 Production on Tue Jan 14 22:32:02 2014
Copyright (c) 1982,201 3, Oracle. All rights reserved.
Connected:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0-Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
BYS @ bys3> exit
[Oracle @ bys3 admin] $ sqlplus bys/bys @ test
BYS @ test> exit
######################################## #######################
Configure static listening: 1. Configure listener. ora and add the corresponding entry [oracle @ bys3 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 = bys3.bys.com) (PORT = 1525 ))
(ADDRESS = (PROTOCOL = TCP) (HOST = bys3.bys.com) (PORT = 1521 ))
)
)
L3 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = bys3.bys.com) (PORT = 1526 ))
)
)
SID_LIST_l3 =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = bys9)
(SID_NAME = bys3)
(ORACLE_HOME =/u01/app/oracle/product/11.2.0/dbhome_1 )))
ADR_BASE_LISTENER =/u012. start the listener and check the status: [oracle @ bys3 ~] $ Lsnrctl status l3
LSNRCTL for Linux: Version 11.2.0.4.0-Production on 14-JAN-2014 22:19:49
Copyright (c) 1991,201 3, Oracle. All rights reserved.
Connecting to (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = bys3.bys.com) (PORT = 1526 )))
STATUS of the LISTENER
------------------------
Alias l3
Version TNSLSNR for Linux: Version 11.2.0.4.0-Production
Start Date 14-JAN-2014 22:15:15
Uptime 0 days 0 hr. 4 min. 34 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/bys3/l3/alert/log. xml
Listening Endpoints Summary...
(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = bys3.bys.com) (PORT = 1526 )))
Services Summary...
Service "bys9" has 1 instance (s ).
Instance "bys3", status
UNKNOWN, Has 1 handler (s) for this service...
The command completed successfully
################ 3. Use SQLPLUS for Logon test [oracle @ bys3 admin] $ cat tnsnames. ora
Test9 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = bys3.bys.com) (PORT = 1526 ))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = bys9)
)
)
[Oracle @ bys3 ~] $ Tnsping test9
TNS Ping Utility for Linux: Version 11.2.0.4.0-Production on 14-JAN-2014 22:37:56
Copyright (c) 1997,201 3, Oracle. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = bys3.bys.com) (PORT = 1526) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = bys9 )))
OK (10 msec)
[Oracle @ bys3 ~] $ Sqlplus bys/bys @ test9
SQL * Plus: Release 11.2.0.4.0 Production on Tue Jan 14 22:38:05 2014
Copyright (c) 1982,201 3, Oracle. All rights reserved.
Connected:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0-Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
BYS @ test9>