To point the database to non-default listener you need to specify the LOCAL_LISTENER parameter
By default, PMON will register the database service with the listener on port 1521.if your listener is running on non-default port i.e 1522 you must add
Local_listener parameter
C:\Documents and Settings\Iqbal.Aulakh>lsnrctl start
LSNRCTL for 32-bit Windows: Version 10.2.0.5.0 - Production on 20-JAN-2011 16:34:15
Copyright (c) 1991, 2010, Oracle. All rights reserved.
Starting tnslsnr: please wait...
TNSLSNR for 32-bit Windows: Version 10.2.0.5.0 - Production
System parameter file is D:\Oracle\app\oracle\product\10.2.0\db_1\network\admin\listener.ora
Log messages written to D:\Oracle\app\oracle\product\10.2.0\db_1\network\log\listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1ipc)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=somxl042707.accounts.cdcr.ca.gov)(PORT=1522)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=somxl042707.accounts.cdcr.ca.gov)(PORT=1522)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 32-bit Windows: Version 10.2.0.5.0 - Production
Start Date 20-JAN-2011 16:34:17
Uptime 0 days 0 hr. 0 min. 3 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File D:\Oracle\app\oracle\product\10.2.0\db_1\network\admin\listener.ora
Listener Log File D:\Oracle\app\oracle\product\10.2.0\db_1\network\log\listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=somxl042707.accounts.cdcr.ca.gov)(PORT=1522)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
C:\Documents and Settings\Iqbal.Aulakh>
USING A NON DEFAULT LISTENER
When a non-default listener is used, then a listener.ora must be configured with the relevant listener address. For example,
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = host1.sales.mydomain.com)(PORT = 1522))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1522))
)
)
In the database
Change/add the parameter
LOCAL_LISTENER=listener_t10g
If you try to start now, you will receive error
ORACLE instance shut down.
SQL> startup nomount pfile='D:\Oracle\app\oracle\oradata\test\test-temp-pfile.ora'
ORA-00119: invalid specification for system parameter LOCAL_LISTENER
ORA-00132: syntax error or unresolved network name 'LISTENER_T10G'You are getting error because PMON unable to resolve the LISTENER_TEST10G.
You need to add TNS Entry in you TNSNAMES.ORA file
LISTENER_T10G =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = host1.sales.mydomain.com)(PORT = 1522))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = test10g)
)
)
Note:
- Make sure your ORACLE_HOME and path variable are also pointing to the correct oracle_home. Even if you set the correct TNS_ADMIN, still you will get above error as It will ignore the tns_admin and look for the tnsnames.ora,sqlnet.ora in you database's Oracle_home. This is applicable when you are having multiple oracle home on the same machine.
- On Windows System, make sure you edit the registry and add the TNS_ADMIN entry in your ORACLE_HOME.
i.e In HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_OraDb10g_home1
Create New String Key TNS_ADMIN and modify to add the path to your ORACL_HOME/NETWORK/ADMIN directory.
No comments:
Post a Comment