Following are the steps that I use to configure non-default listener to listen to non-default port,1522.
1. Edit initXE.ora file which resides in $ORACLE_HOME/dbs
Add local_listener=listener1 line to this file. Listener1 will be the name of the non-default listener.
2. Edit listener.ora file to configure listener1. listener.ora file resides in $ORACLE_HOME/network/admin.
My listener.ora file looks like:
LISTENER1 =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = vishesh-netbook)(PORT = 1522)))
SID_LIST_LISTENER1 =
(SID_LIST =
(SID_DESC =
(ORACLE_HOME = /usr/lib/oracle/xe/app/oracle/product/10.2.0/server)
(GLOBAL_DBNAME = XE)
(SID_NAME = XE)))
3. Edit tnsnames.ora file to resolve non-default listener name,listener1.
My tnsnames.ora file looks like:
# tnsnames.ora Network Configuration File:
LISTENER1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = vishesh-netbook)(PORT = 1522)))
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = vishesh-netbook)(PORT = 1522))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
4. Now connect to the database.
5. After connecting, use
SQL> CREATE SPFILE FROM PFILE; #can be run after or before instance startup
SQL> SHUTDOWN
At OS prompt, use
#lsnrctl start listener1
Then use
# sqlplus /nolog
No comments:
Post a Comment
Please write your comments here.