Re: Can't TNSPing XE database

From: Shakespeare <whatsin_at_xs4all.nl>
Date: Wed, 13 Aug 2008 11:55:35 +0200
Message-ID: <48a2af97$0$199$e4fe514c@news.xs4all.nl>

"Knickerless Parsons" <knickerlessparsons_at_googlemail.com> schreef in bericht news:196f22e6-9c8b-4192-bfdd-8d4b5bc2f670_at_a70g2000hsh.googlegroups.com...
> 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.
>
>

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 Received on Wed Aug 13 2008 - 04:55:35 CDT

Original text of this message