Trouble connecting with tnsnames [message #228373] |
Mon, 02 April 2007 14:52 |
xadamz23
Messages: 7 Registered: June 2006
|
Junior Member |
|
|
Hello,
I am having trouble connecting to a local database using tnsnames. I can connect from a remote PC just fine. Here are my specs:
-- Oracle 10g R2 w/patchset 10.2.0.3
-- listener.ora:
MOWBLSNR =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = oracle2.rhsnet.org)(PORT = 1529))
)
SID_LIST_MOWBLSNR =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = mowb.rhsnet.org)
(ORACLE_HOME = /oraclebase/product/10.2.0)
(SID_NAME = mowb)
)
)
-- tnsnames.ora:
MOWB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = oracle2.rhsnet.org)(PORT = 1529))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = mowb.rhsnet.org)
)
)
-- sqlnet.ora:
NAMES.DEFAULT_DOMAIN= rhsnet.org
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
Here is the output of tnsping:
oracle@oracle2:~> tnsping mowb
TNS Ping Utility for Linux: Version 10.2.0.3.0 - Production on 02-APR-2007 14:49:52
Copyright (c) 1997, 2006, Oracle. All rights reserved.
Used parameter files:
/oraclebase/product/10.2.0/network/admin/sqlnet.ora
TNS-03505: Failed to resolve name
I know there is stuff on the net regarding this, but I cant find the answer to my problem.
Can anyone tell me why this isnt working?
Thanks
|
|
|
|
Re: Trouble connecting with tnsnames [message #228385 is a reply to message #228373] |
Mon, 02 April 2007 16:01 |
xadamz23
Messages: 7 Registered: June 2006
|
Junior Member |
|
|
I commented that out and it still does not work.
Here is the output of lsnrctl status MOWBLSNR:
oracle@oracle2:~> lsnrctl status MOWBLSNR
LSNRCTL for Linux: Version 10.2.0.3.0 - Production on 02-APR-2007 16:01:10
Copyright (c) 1991, 2006, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle2.rhsnet.org)(PORT=1529)))
STATUS of the LISTENER
------------------------
Alias MOWBLSNR
Version TNSLSNR for Linux: Version 10.2.0.3.0 - Production
Start Date 02-APR-2007 15:06:41
Uptime 0 days 0 hr. 54 min. 29 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /oraclebase/product/10.2.0/network/admin/listener.ora
Listener Log File /oraclebase/product/10.2.0/network/log/mowblsnr.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracle2.rhsnet.org)(PORT=1529)))
Services Summary...
Service "mowb.rhsnet.org" has 1 instance(s).
Instance "mowb", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
|
|
|
Re: Trouble connecting with tnsnames [message #228392 is a reply to message #228373] |
Mon, 02 April 2007 20:41 |
xadamz23
Messages: 7 Registered: June 2006
|
Junior Member |
|
|
I figured out the problem. The file /etc/tnsnames.ora existed, but was empty. Apparently Oracle looks there before it looks in $ORACLE_HOME/network/admin/tnsnames.ora. I deleted the file /etc/tnsnames.ora and tnsping works.
|
|
|