Hi,
I have oracle 10g XE in a windows XP, I need to change listener port (don't ask me why).
There are many tips on changing listener port, but don't solve my problem, basicly, they tell you change listener.ora and tnsnames.ora, which i did, restart then everything should be OK. However, this isn't my case.
1. I change listener.ora and tnsnames.ora as shown below:
-----------------------------listener.ora-----------------------------------------------------------------------------------------------------------
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)
(PROGRAM = extproc)
)
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)
(PROGRAM = extproc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
(ADDRESS = (PROTOCOL = TCP)(HOST = hui)(PORT = 1503))
)
)
DEFAULT_SERVICE_LISTENER = (XE)
--------------------------------------------------tnsnames.ora--------------------------------------------------------------------------------------
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = hui)(PORT = 1503))
(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)
)
)
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
2. I restart windows XP, check database and listener all started
3. > Connect system/password@mypc, it will show
ORA-12541 TNS - No listener
4. tnsping mypc, it will show
-----------------------------------------------------------------------------------------------------------
TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 04-AUG-2011 19:54:52
Copyright (c) 1997, 2005, Oracle. All rights reserved.
Used parameter files:
C:\oraclexe\app\oracle\product\10.2.0\server\network\admin\sqlnet.ora
Used HOSTNAME adapter to resolve the alias
Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.102)(PORT=1521)))
TNS-12541: TNS:no listener
-----------------------------------------------------------------------------------------------------------
As you can see, it still using port 1521, why not change to 1503?
4. Some suggest connect use:
Connect system/password@mypc:1503
Error:
ORA-12514 TNS:listener does not currently know of service requseted in connect descriptor
5. Other say you need to change local listener parameter
alert set local_listener = ....
which require connect then you can do, and right now I can't even connect to database.
Anyone knows how to fix this problem?
Thank in advance,