Home » RDBMS Server » Networking and Gateways » TNS:
TNS: [message #143058] Tue, 18 October 2005 23:38 Go to next message
bluebeta
Messages: 14
Registered: June 2005
Junior Member
Hi,

I have installed Oracle 9i 9.2 Standard Edition on win xp SP2. Firewall has been disabled.

When I login as below:
SQL> connect sys@orcl.com as sysdba
it give me this error "ORA-12541: TNS : no Listener".

But it I without using services name:
SQL> connect sys as sysdba
this will login successfully

I do check with
C:\ lsnrctl status

this is the result:

LSNRCTL for 32-bit Windows: Version 9.2.0.1.0 - Production on 19-OCT-2005 12:32:
50

Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC0)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 32-bit Windows: Version 9.2.0.1.0 - Produc
tion
Start Date 19-OCT-2005 12:12:49
Uptime 0 days 0 hr. 20 min. 1 sec
Trace Level off
Security OFF
SNMP OFF
Listener Parameter File C:\oracle\ora92\network\admin\listener.ora
Listener Log File C:\oracle\ora92\network\log\listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC0ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=staff3)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=staff3)(PORT=8080))(Presentation=HTT
P)(Session=RAW))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=staff3)(PORT=2100))(Presentation=FTP
)(Session=RAW))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "orcl.com" has 2 instance(s).
Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB.com" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully

I listener is running.

I do set the environment variable as below:

ORACLE_SID=orcl
ORACLE_HOME=C:\oracle\ora92
LD_LIBRARY_PATH=%ORACLE_HOME%\bin

This is my listener.ora
================================================================
# LISTENER.ORA Network Configuration File: C:\oracle\ora92\network\admin\listener.ora
# Generated by Oracle configuration tools.

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = staff3)(PORT = 1521))
)
)
)

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = C:\oracle\ora92)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = orcl.com)
(ORACLE_HOME = C:\oracle\ora92)
(SID_NAME = orcl)
)
)

================================================================

This is my tnsnames.ora

================================================================
# TNSNAMES.ORA Network Configuration File: C:\oracle\ora92\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.

ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = staff3)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl.com)
)
)

INST1_HTTP =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = staff3)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = SHARED)
(SERVICE_NAME = MODOSE)
(PRESENTATION = http://HRService)
)
)

EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
================================================================

Can anyone guide me to solve this problem.

Thanks in advance

Best Regards

Andrene
Re: TNS: [message #143062 is a reply to message #143058] Tue, 18 October 2005 23:49 Go to previous messageGo to next message
girish.rohini
Messages: 744
Registered: April 2005
Location: Delhi (India)
Senior Member
try connecting as connect sys@orcl as sysdba

--Girish
Re: TNS: [message #143090 is a reply to message #143058] Wed, 19 October 2005 01:12 Go to previous messageGo to next message
bluebeta
Messages: 14
Registered: June 2005
Junior Member
Thank you Girish. It now can connect from the client. May I know why need to use orcl but not orcl.com?

But when I use php to connect from client to oracle server, it give me the following error:
ORA-12154: TNS:could not resolve service name

I have set the TNS_ADMIN=%ORACLE_HOME%\network\admin, but still cannot solve the problem.

Can anyone guide me to solve the problem.

Thanks in advance.

Best Regards,

Andrene
Re: TNS: [message #144384 is a reply to message #143090] Wed, 26 October 2005 05:42 Go to previous message
girish.rohini
Messages: 744
Registered: April 2005
Location: Delhi (India)
Senior Member
in php, whats the coonect string you are giving. Is it same as the one you are using for connecting to oracle using sql client?

Also, orcl is you service identifier that you configured in your tnsnames.ora & orcl.com is the ORACLE_SID configured on your server.
From client, when using tnsnames.ora you connect using the service identifier name & not the name of ORACLE_SID on your server.

--Girish
Previous Topic: Create referential Integrity constraints from LDAP to Oracle
Next Topic: Two Servers with ONE External STORAGE
Goto Forum:
  


Current Time: Fri Nov 22 08:42:42 CST 2024