Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Can't TNSPing XE database

955 views
Skip to first unread message

Knickerless Parsons

unread,
Aug 13, 2008, 5:20:53 AM8/13/08
to
Morning all,
I'm having difficulty getting TNSPING to see my local XE database.

I'm running oracle XE on Vista business. I can connect to the database
fine using SQL Plus and even SQL Developer

After installing XE, I installed the Oracle tools for .NET from here
(http://www.oracle.com/technology/software/tech/windows/odpnet/
index.html)

There are no other oracle products installed on my machine.

I initially noticed the problem when I couldn't see my local database
from within Visual Studio, Further investigation lead me to TNSPING
which also doesn't work. My guess is that if I can fix the issue with
TNSPING, that all will be well in the world of .NET.

Output from TNSPING shown below:
=========================================================================
TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production
on 13-AUG-2008 10:08:32

Copyright (c) 1997, 2005, Oracle. All rights reserved.

Used parameter files:
C:\oraclexe\app\oracle\product\10.2.0\server\network\admin\sqlnet.ora

TNS-03505: Failed to resolve name
=========================================================================

Contents of the specified SQLNET.ORA file (above), the path in the
comment at the top doesn't exist!:
=========================================================================
# sqlnet.ora Network Configuration File: C:\oracle\product
\10.2.0\client_1\network\admin\sqlnet.ora
# Generated by Oracle configuration tools.

#SQLNET.AUTHENTICATION_SERVICES= (NTS)
sqlnet.authentication_services = (NONE)

#NAMES.DIRECTORY_PATH= (LDAP, TNSNAMES)
NAMES.DIRECTORY_PATH= (TNSNAMES, HOSTNAME, LDAP)

NAMES.DEFAULT_DOMAIN = world

SQLNET.EXPIRE_TIME = 0

NAME.DEFAULT_ZONE = world
=========================================================================

TNSNAMES.ORA (slightly modified to preserve anonymity! - asterix's on
the address line) :
=========================================================================
#ifile='C:\oraclexe\app\oracle\product\10.2.0\server\NETWORK\ADMIN
\tnsnames.ora'


XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = LB05568.****.****.****.net)
(PORT = 1521))
(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)
)
)
=========================================================================

The oracle tools for .NET seem to have created a second oracle home
but I can't see a home selector app on my start menu.

I also tried TNSPING XE.WORLD which also doesn't work!

I have tried creating a TNS_ADMIN environment variable (using the set
command) pointing to the directory which contains the above files:

line of output of set command below
=========================================================================
tns_admin = C:\oraclexe\app\oracle\product\10.2.0\server\network\admin
=========================================================================

I'm sure that this worked ok previously, I recently removed the oracle
tools for .NET and reinstalled just to be sure of the version I was
running. The install failed a couple of times before it completed
successfully.

All suggestions greatly appreciated, give me a shout if I've been a
bit vague anywhere.

Much appreciated,
Dave.


Shakespeare

unread,
Aug 13, 2008, 5:55:35 AM8/13/08
to

"Knickerless Parsons" <knickerle...@googlemail.com> schreef in bericht
news:196f22e6-9c8b-4192...@a70g2000hsh.googlegroups.com...

Just to be sure, set your ORACLE_HOME environment variable to
C:\oraclexe\app\oracle\product\10.2.0\server before using TNSPING, and start
TNSPING from the ORACLE_HOME\bin directory. If this works, you might have
errors due to the second oracle home directory (path).
It is not likely to be the cause, for it seems the right tnsnames and sqlnet
are found.

On second thought: is your listener running? Run lsnrctl start from a
command line after setting the environment variables as shown above.

Furthermore, the sqlnet.ora you show here is not the right one, (wrong path
at top) but I'm not sure if it is actually in that directory....

Be careful with TNS_ADMIN when you install products; it might mess up things
(always backup your files in the admin directory before installing tools)

Shakespeare

Knickerless Parsons

unread,
Aug 13, 2008, 6:44:10 AM8/13/08
to
Thanks for the reply, it was much appreciated, here's an update:

I have set the ORACLE_HOME environment variable in my computer
advanced properties, doing this using the SET command only did it for
the command prompt session I was running at the time and I don't know
how to do the eqivalent of the unix EXPORT command in DOS type OS's.

So now the important environment variables are:
=======================================================================================
Path=C:\oraclexe\app\oracle\product\10.2.0\server\bin;C:\app
\D7998\product\11.1.0\client;C:\app\D7998\product\11.1.0\client\bin;C:
\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;c:\Program Files
\Microsoft SQL Server\90\Tools\binn\;C:\Windows
\System32\WindowsPowerShell\v1.0\

ORACLE_HOME=C:\oraclexe\app\oracle\product\10.2.0\server

TNS_ADMIN is no longer set.
=======================================================================================
My assumption is that windows isn't case sensitive!!

so now starting a command prompt in C:\oraclexe\app\oracle\product
\10.2.0\server\BIN I try tnsping again

=======================================================================================
C:\oraclexe\app\oracle\product\10.2.0\server\BIN>tnsping xe

TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production

on 13-AUG-2008 11:39:13

Copyright (c) 1997, 2005, Oracle. All rights reserved.

Used parameter files:
C:\oraclexe\app\oracle\product\10.2.0\server\network\admin\sqlnet.ora

TNS-03505: Failed to resolve name

=======================================================================================
also tried xe.world with the same result!

Looking at the listener, it appears to be started already, issuing
lsnrctl start gives:

TNS-01106: Listener using listener name LISTENER has already been
started

During all of this, the database is still accessible via SQL Plus on
the same machine. I might try to access it from another machine on the
network, if that fails then it's probably something network related.
I'll keep you all posted.

Any more ideas??

Shakespeare

unread,
Aug 13, 2008, 7:46:32 AM8/13/08
to

"Knickerless Parsons" <knickerle...@googlemail.com> schreef in bericht
news:bf042442-1f01-46a9...@59g2000hsb.googlegroups.com...


1) Windows is not case sensitive, that's correct
2) Env. variables are valid within the session you run (dos-box), unless you
set the way you did. Win has no 'export' functionality.

What I do see is that your TNSNAMES is not used (or at least, the entry is
not found there). If it was, tnsping would say so:
"Used TNSNAMES adapter to resolve the alias"
This might help: copy the entry for XE in your tnsnames, and make it
xe.world = (etc.....). Just leave the old one in place.

It's probably your default domain in sqlnet.ora that is causing the error.
By using TNSPING XE, tnsping starts looking for xe.world, which isn't there.
TNSPING xe.world won't help either, for it still is not there.
You could also remove the default_domain from sqlnet.ora, but I would opt to
add xe.world to TNSNAMES

Shakespeare


Shakespeare

unread,
Aug 13, 2008, 7:54:57 AM8/13/08
to

"Shakespeare" <wha...@xs4all.nl> schreef in bericht
news:48a2c998$0$190$e4fe...@news.xs4all.nl...

Shorter is to use in your tnsnames.ora:
XE.world,xe = (....)

(no space between xe.world and xe)


Knickerless Parsons

unread,
Aug 13, 2008, 8:09:28 AM8/13/08
to
You little beauty!

Duplicating the TNS entry and suffixing it with .world has done the
trick - for tnsping and visual studio.

I've actually seen this happen before but never got round to getting a
decent explanation of why.

Anyway, you've really got me out of a mess, so many thanks.

All the best,
Dave.

patelr...@gmail.com

unread,
May 27, 2014, 3:13:31 PM5/27/14
to
When i am trying to connect my JDBC Driver it is showing ORA 12170: TNS Connect timeout occurred.
I am not able to fix this any help.

My Sqlnet.Ora file is almost empty.
and when i was doing tnsping XE
the output is like ======

C:\Users\RAHUL>tnsping XE

TNS Ping Utility for 32-bit Windows: Version 11.2.0.2.0 - Production on 28-MAY-2
014 00:37:25

Copyright (c) 1997, 2010, Oracle. All rights reserved.

Used parameter files:
D:\oraclexe\app\oracle\product\11.2.0\server\network\admin\sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = RAHUL-PC
)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE)))



it's keep going, never ends.
Any help

joel garry

unread,
May 27, 2014, 8:09:42 PM5/27/14
to
On Tuesday, May 27, 2014 12:13:31 PM UTC-7, patelr...@gmail.com wrote:

> it's keep going, never ends.
>
> Any help

Can you do a regular ping to the host and to the ip address? What is your tnsnames.ora? Search your error on http://edstevensdba.wordpress.com/category/tns/

jg
--
@home.com is bogus.
http://www.theregister.co.uk/2014/05/26/oracle_dba_workshop_capacity_planning/

Mladen Gogala

unread,
Jun 1, 2014, 9:40:35 AM6/1/14
to
1) It's probably looking for the name RAHUL-PC. Try looking it up with
nslookup. Most of the modern ISP's return address of their own "last
resort host" instead of failure, when the host is not found.
2) Your path names are all wrong. Instead of "D:\oraclexe\app", the path
name should look like "/usr/lib/oracleXE". Please install VMWARE_PLAYER
on you PC and then use a Red Hat derivative to install the express
edition RPM's.



--

Achim Klausmann

unread,
Jun 2, 2014, 2:23:50 AM6/2/14
to
Did you change your computername?
'hostname' will give you the answer.
Firewall? Please turn it off.

Best regards
--

Mladen Gogala

unread,
Jun 8, 2014, 5:29:11 PM6/8/14
to
On Mon, 02 Jun 2014 08:23:50 +0200, Achim Klausmann wrote:

> Did you change your computername? 'hostname' will give you the answer.
> Firewall? Please turn it off.

No need for that. Opening the port 1521 should suffice. However, I do
turn the FW off on the database servers because FW is an expensive beast
that takes quite a bit of CPU power and slows things down.
Personal FW does make sense for a laptop which is usually a promiscuous
machine used at the airport, client sites or IT conferences, so a
personal FW does make sense, along with an anti-virus software.



--
Mladen Gogala
The Oracle Whisperer
http://mgogala.byethost5.com

rcla...@gmail.com

unread,
Jun 25, 2015, 10:20:04 PM6/25/15
to
Duplicando la entrada XE en TNSNAMES.ORA se supero el problema, al parecer cuando se modifica desde algun programa, p.e TOAD, le agrega algun valor que hace no reconocible esa primera linea.

Noons

unread,
Jun 26, 2015, 6:20:38 AM6/26/15
to
On 26/06/2015 12:19 PM, rcla...@gmail.com wrote:

HEEEEELOOOOOOOOOOOOOOOOMORON??????

VVVVVVVVVVVVVVVVVVVVVVV
> El miércoles, 13 de agosto de 2008, 4:20:53 (UTC-5), Knickerless
> Parsons escribió:
^^^^^^^^^^^^^^^^^^^^^^^^

DINGDINGDINGDINGDINGDINGDING!!!!!!!


> Duplicando la entrada XE en TNSNAMES.ORA se supero el problema, al
> parecer cuando se modifica desde algun programa, p.e TOAD, le agrega
> algun valor que hace no reconocible esa primera linea.

BOARING!
Zzzzzzzzzzzzzzzzzzzzzzzzzz...

0 new messages