Developing without  Full client / tnsnames.ora

I am trying to develop an OCI application using Borland C++ Builder. I want to deploy and develop using Instant Client 10G without tnsnames.ora file. I have 2 PCs - NT4 & XP.
On the NT4 PC I had installed the full Oracle Client and was using the tnsnames.ora file and things were working fine. I've since uninstalled the full client and am now getting the "ORA-12154: TNS:could not resolve the connect identifier specified" error (using Instant Client)
The XP box has never had the full client installed, does not have a tnsnames.ora file but works fine using the same code.
I've been looking through this forum and note Justin Cave's comments that you can deploy but not develop using Instant Client but this seems to work fine on my XP box. (I am an Oracle novice so I could be missing something here).
I have also checked the FAQ on connection strings and think I have got that correct (same code works on 1 PC and not the other) and don't think I've set the enviroment variables TNS_ADMIN or ORACLE_HOME on either machine.

Hrm, interesting. It always used to be DBQ but it seems it might have changed to SERVER at some point.
Anyway, I tried this and it worked fine for me (using 10204)
TESTFILE.DSN
================
[ODBC]
DRIVER=Oracle in OraDb10g_home1
server=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=gdarling-pc2)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)))
TEST.VBS
==========
set con = createobject("adodb.connection")
con.open "filedsn=testfile;uid=scott;pwd=tiger;"
set rs = createobject("adodb.recordset")
rs.open "select user from dual",con
msgbox rs.fields(0).value
Note also that unless you really want to create a file dsn, you could also just use a dsnless connection string and pass that directly too:
set con = createobject("adodb.connection")
con.open "driver={Oracle in OraDb10g_home1};uid=scott;pwd=tiger;server=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=gdarling-pc2)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)))"
set rs = createobject("adodb.recordset")
rs.open "select user from dual",con
msgbox rs.fields(0).value
Hope it helps,
Greg

Similar Messages

  • How to list the datasources without use a tnsnames.ora file?

    Hi,
    I want to use the OracleDataSourceEnumerator class of ODP.Net to list the datasources on which the user can connect.
    It's work with a tnsnames.ora on the local station, so good.
    But I want use the easy connect naming methode so i have edited the sqlnet.ora file with this:
    NAMES.DIRECTORY_PATH= (EZCONNECT, TNSNAMES)
    then i have deleted the content of the tnsnames.ora
    so my code don't work : none datasource is returned by the OracleDataSourceEnumerator
    So my question : is it a way to list the datasources without use a tnsnames.ora file?
    Edited by: user13499556 on 17 déc. 2010 08:21

    You can check
    DataConnectionFile.EnumerateDependants method
    This post is my own opinion and does not necessarily reflect the opinion or view of Slalom.

  • How to configure the client tnsnames.ora parameters with a MTS Server

    i have modified init.ora and start my oracle
    as a MTS instance.
    my client tnsnames.ora is the dedicate server
    model.
    how can i modify it and my clent can use
    MTS server.
    null

    Hi,
    I dont think u will have to configure anything seperatley on the tnsnames.ora file to connect to a MTS Database.
    I Hope i am right.
    Regards,
    Ganesh R

  • How to define a DSN without using a tnsnames.ora on the PC client machine

    Hi,
    Client : Windows XP with Oracle9i ODBC driver
    Server : Oracle 10 on Solaris
    I need to define a DSN which does not rely on tnsnames.ora on the client machine.
    I tried to use a file dsn, but without success, because I don't know the parameters to use.
    I used these params in the file.dsn :
    [ODBC]
    DRIVER=Oracle9i ODBC Driver
    UID=testuser
    PWD=testpw
    SERVER=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=myhost)(PORT=9999))(CONNECT_DATA=(SERVICE_NAME=testSID)))
    It does not work ....

    Hrm, interesting. It always used to be DBQ but it seems it might have changed to SERVER at some point.
    Anyway, I tried this and it worked fine for me (using 10204)
    TESTFILE.DSN
    ================
    [ODBC]
    DRIVER=Oracle in OraDb10g_home1
    server=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=gdarling-pc2)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)))
    TEST.VBS
    ==========
    set con = createobject("adodb.connection")
    con.open "filedsn=testfile;uid=scott;pwd=tiger;"
    set rs = createobject("adodb.recordset")
    rs.open "select user from dual",con
    msgbox rs.fields(0).value
    Note also that unless you really want to create a file dsn, you could also just use a dsnless connection string and pass that directly too:
    set con = createobject("adodb.connection")
    con.open "driver={Oracle in OraDb10g_home1};uid=scott;pwd=tiger;server=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=gdarling-pc2)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)))"
    set rs = createobject("adodb.recordset")
    rs.open "select user from dual",con
    msgbox rs.fields(0).value
    Hope it helps,
    Greg

  • SQL Developer can't see tnsnames.ora

    Hiya. I hope someone can help with this. I installed Oracle instant client (basic lite) on my new Windows 7 machine (32 bit) - yeah, I know Windows 7 is not supported, but my gut feeling is that this isn't the issue I'm having.
    I've put my tnsnames.ora file in the same folder as instant client (C:\program files\oracle\instantclient), have created a system environment variable TNS_ADMIN which points to that folder, and have added that folder to the system "path" environment variable. That should do it, right?
    When I try to create a new connection in SQL Developer 2.1.0.63, and change my connection type to "tns", I don't see any database connections.
    Troubleshooting ideas? Other ways to test that the needed Oracle files are installed properly?
    Thanks!

    Here's how to debug where it's looking:
    http://krisrice.blogspot.com/2008/04/it-seems-to-come-up-often-that-some.html
    -kris

  • SQL Developer not only reading tnsnames.ora

    Hello,
    I have found a very odd behaviour in SQL Developer 1.2 (running on Windows 2000):
    I have set TNS_ADMIN to point to a directory on a network drive residing on a Linux host. In this directory there were many backup files of tnsnames.ora created over time whose names followed the pattern tnsnames.ora.<timestamp> or tnsnames.bak or something similar. In SQL Developer in the "New database connection" dialog many TNS-entries showed up multiple times in the "Network alias" listbox. Only after removing all those backup files from the directory the behaviour of SQL Developer was correct and every entry only showed up once. I also found out that even when I moved the backup files to a new directory "tnsnames.bak" under the directory which TNS_ADMIN points to the entries showed up multiple times. After I renamed this directory to bak.tnsnames the behaviour was again correct. In my opinion SQL Developer should only read the file called tnsnames.ora and ignore all other files or directories with similar names.
    Kind regards,
    Christof Breker

    Various users reported this before.
    Maybe others use multiple files, but at least there should be the option to read just this one.
    Regards,
    Kristof

  • Oracle client -TNSNAMES.ora

    Hi,
    I am new to db, can any explain the use of oracle client and how to use the TNSNAMES file.
    Thanks,
    VP.

    Oracle client does what a client does in Client-Server architecture. So just read about it.
    A tnsnames.ora file maps net service names to connect descriptors. The net service name thus becomes a (most likely shorter and more readable) alias for the somewhat cumbersome net service name. In the following example, the tex after the equal sign is the connect descriptor while the text before the equal sign (net_service_name) is the net service name.
    A client needs a connect descriptor in order to connect to an Oracle instance.
    net_service_name=
    (DESCRIPTION=
       (ADDRESS=(protocol_address_information))
       (CONNECT_DATA=
         (SERVICE_NAME=service_name)))
    For example:
    ORA10 =
      (DESCRIPTION = (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = somehost)(PORT = 1521))
        (CONNECT_DATA =
          (SERVICE_NAME=ORA10)
      )

  • Sql Developer not reading right tnsnames.ora

    I have both a local 9iv2 and a 10xe (app_express) databases installed. Oracle home is set to ora92 and therefore should be reading the tnsnames.ora file in c:\oracle\ora92\network\admin. However, I recently used SQL Developer to connect to the 10xe database, and now all it reads is the tnsnames.ora file in the oraclexe\....\network\admin directory.
    Any suggestions as to how to get it to use the tnsnames.ora from the ora92 home again??
    The only solution I can think of now is to create one tnsnames.ora file with all the connections I need and copy it to each place where a tnsnames.ora file has been installed (ora92, ver 8 server, oraclexe, designer, forms/reports installs - etc.) Any other suggestions would be appreciated. I don't know why it is not reading from the specified home.
    Thanks
    Glenn

    Hi,
    This should help.
    Re: tns_admin
    -kris

  • 11g dataguard client tnsname.ora entry format for switchover and failover

    I need format for the tnsnames.ora to use for the enduser when failover or switchover occurs in 11g dataguard.

    http://download.oracle.com/docs/cd/B19306_01/network.102/b14213/tnsnames.htm#sthref722

  • Bulk import of tnsnames.ora file into SQL developer on first run

    Is there a way for SQL developer to read the tnsnames.ora file and import all of the connections from that? Near as I can see, I would either have to manually add each of them or import an xml file of some kind...Thoughts?

    There's a feature request for this at the Exchange (http://htmldb.oracle.com/pls/otn/f?p=42626:39:3634225177876117::NO::P39_ID:4582), but they closed it down like a crack-house :-(
    So you just have to continue your manual slave-labours...
    Have fun,
    K.

  • TNSNAMES.ora for DR And Primary Instance

    I have 2 node rac, how do i specify load balance and failover in the client tnsnames.ora including DR hostnames so that when the primary instance is not available it automatically goes to DR. Instead of flipping the tnsnames.ora.

    You seem to have a substantial amount of confusion in your request.
    When you use the term DR are you referring to an unmentioned Physical Data Guard implementation somewhere else or are you misusing the term to mean "the other node in my cluster?"
    In what version of Oracle?
    What services have you defined?
    How is failover configured? Using TAF or FCF?
    You need to provide a lot more information for us to help you.
    Load balancing has nothing to do with failover. Are you asking about one of them or both?
    Review the capabilities of the DBMS_SERVICE package with respect to creating a service. How did you define your RAC services?

  • Urgent : Is there any c++ parsers available for reading tnsnames.ora

    I have to parse the tnsnames.ora and get the connection string , host name , instance name , port etc .. and store it in my local memory structure . Is there any c++ parsers available , which parses and gives the desired output or do i have write my own parser .

    You're right...the database connections work fine if I define them manually rather than reading them from the tnsnames.ora file.
    I was hoping to have many users running SQL Developer so using the tnsnames.ora file might save people's time and reduce the number of database connection-related support calls.
    If worse comes to worse, I can create an XML file to define the database connections. The only drawback to this is that we have an automated procedure to update people's tnsnames.ora whereas there is currently no way to keep the XML file up-to-date.

  • Listener&tnsnames.ora

    i'm verymuch confused is server/client configuration,
    i need you people's help,
    i have posted both server/clients Listener&tnsnames.ora,
    which i configured.
    server listener.ora(test1)
    SID_LIST_LISTENER =
    *(SID_LIST =*
    *(SID_DESC =*
    *(SID_NAME = PLSExtProc)*
    *(ORACLE_HOME = D:\oracle\product\10.2.0\db_1)*
    *(PROGRAM = extproc)*
    *(SID_DESC =*
    *(GLOBAL_DBNAME = TEST1)*
    *(ORACLE_HOME = D:\oracle\product\10.2.0\db_1)*
    *(SID_NAME = TEST1)*
    TEST1 =
    *(DESCRIPTION =*
    *(ADDRESS = (PROTOCOL = TCP)(HOST = Desktop029.tvsil.com)(PORT = 1521))*
    SID_LIST_ORCL =
    *(SID_LIST =*
    *(SID_DESC =*
    *(GLOBAL_DBNAME = TEST1)*
    *(ORACLE_HOME = D:\oracle\product\10.2.0\db_1)*
    *(SID_NAME = TEST1)*
    LISTENER =
    *(DESCRIPTION =*
    *(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))*
    ORCL =
    *(DESCRIPTION =*
    *(ADDRESS = (PROTOCOL = TCP)(HOST = Desktop041.tvsil.com)(PORT = 1522))*
    server tnsnames.ora
    TEST1 =
    *(DESCRIPTION =*
    *(ADDRESS = (PROTOCOL = TCP)(HOST = Desktop029.tvsil.com)(PORT = 1521))*
    *(CONNECT_DATA =*
    *(SERVER = DEDICATED)*
    *(SERVICE_NAME = TEST1)*
    orcl =
    *(DESCRIPTION =*
    *(ADDRESS = (PROTOCOL = TCP)(HOST = Desktop041.tvsil.com)(PORT = 1522))*
    *(CONNECT_DATA =*
    *(SERVICE_NAME = orcl)*
    EXTPROC_CONNECTION_DATA =
    *(DESCRIPTION =*
    *(ADDRESS_LIST =*
    *(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))*
    *(CONNECT_DATA =*
    *(SID = PLSExtProc)*
    *(PRESENTATION = RO)*
    client listener.ora(orcl)
    SID_LIST_LISTENER =
    *(SID_LIST =*
    *(SID_DESC =*
    *(SID_NAME = PLSExtProc)*
    *(ORACLE_HOME = E:\Sample1oracle\product\10.2.0\db_2)*
    *(PROGRAM = extproc)*
    LISTENER =
    *(DESCRIPTION_LIST =*
    *(DESCRIPTION =*
    *(ADDRESS = (PROTOCOL = TCP)(HOST = Desktop041.tvsil.com)(PORT = 1523))*
    *(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))*
    ORCL =
    *(DESCRIPTION =*
    *(ADDRESS = (PROTOCOL = TCP)(HOST = Desktop041.tvsil.com)(PORT = 1522))*
    TEST1 =
    *(DESCRIPTION =*
    *(ADDRESS = (PROTOCOL = TCP)(HOST = Desktop029.tvsil.com)(PORT = 1521))*
    Client tnsnames.ora
    LISTENER_TEST1 =
    *(ADDRESS = (PROTOCOL = TCP)(HOST = Desktop029.tvsil.com)(PORT = 1521))*
    TEST1 =
    *(DESCRIPTION =*
    *(ADDRESS = (PROTOCOL = TCP)(HOST = Desktop029.tvsil.com)(PORT = 1521))*
    *(CONNECT_DATA =*
    *(SERVER = DEDICATED)*
    *(SERVICE_NAME = TEST1)*
    ORCL =
    *(DESCRIPTION =*
    *(ADDRESS_LIST =*
    *(ADDRESS = (PROTOCOL = TCP)(HOST = desktop041.tvsil.com)(PORT = 1522)))*
    *(CONNECT_DATA =*
    *(SERVICE_NAME = orcl)*
    EXTPROC_CONNECTION_DATA =
    *(DESCRIPTION =*
    *(ADDRESS_LIST =*
    *(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC2))*
    *(CONNECT_DATA =*
    *(SID = PLSExtProc)*
    *(PRESENTATION = RO)*
    *)*

    user11345217 wrote:
    i'm verymuch confused is server/client configuration,
    i need you people's help,
    i have posted both server/clients Listener&tnsnames.ora,
    which i configured.
    server listener.ora(test1)
    SID_LIST_LISTENER =
    *(SID_LIST =*
    *(SID_DESC =*
    *(SID_NAME = PLSExtProc)*
    *(ORACLE_HOME = D:\oracle\product\10.2.0\db_1)*
    *(PROGRAM = extproc)*
    *(SID_DESC =*
    *(GLOBAL_DBNAME = TEST1)*
    *(ORACLE_HOME = D:\oracle\product\10.2.0\db_1)*
    *(SID_NAME = TEST1)*
    TEST1 =
    *(DESCRIPTION =*
    *(ADDRESS = (PROTOCOL = TCP)(HOST = Desktop029.tvsil.com)(PORT = 1521))*
    SID_LIST_ORCL =
    *(SID_LIST =*
    *(SID_DESC =*
    *(GLOBAL_DBNAME = TEST1)*
    *(ORACLE_HOME = D:\oracle\product\10.2.0\db_1)*
    *(SID_NAME = TEST1)*
    LISTENER =
    *(DESCRIPTION =*
    *(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))*
    ORCL =
    *(DESCRIPTION =*
    *(ADDRESS = (PROTOCOL = TCP)(HOST = Desktop041.tvsil.com)(PORT = 1522))*
    Well, that is certainly the most, uh, <i>interesting</i> listener.ora I've ever seen .... where did you come up with all that?
    server tnsnames.ora
    TEST1 =
    *(DESCRIPTION =*
    *(ADDRESS = (PROTOCOL = TCP)(HOST = Desktop029.tvsil.com)(PORT = 1521))*
    *(CONNECT_DATA =*
    *(SERVER = DEDICATED)*
    *(SERVICE_NAME = TEST1)*
    orcl =
    *(DESCRIPTION =*
    *(ADDRESS = (PROTOCOL = TCP)(HOST = Desktop041.tvsil.com)(PORT = 1522))*
    *(CONNECT_DATA =*
    *(SERVICE_NAME = orcl)*
    EXTPROC_CONNECTION_DATA =
    *(DESCRIPTION =*
    *(ADDRESS_LIST =*
    *(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))*
    *(CONNECT_DATA =*
    *(SID = PLSExtProc)*
    *(PRESENTATION = RO)*
    client listener.ora(orcl)
    <snip>A listener.ora on the client makes as much sense as a radiator on a 1965 Volkswagen. The listener is strictly a server-side process. It's whole reason for living is to "listen" (hence its name) for connection requests.
    Client tnsnames.ora
    LISTENER_TEST1 =
    *(ADDRESS = (PROTOCOL = TCP)(HOST = Desktop029.tvsil.com)(PORT = 1521))*
    TEST1 =
    *(DESCRIPTION =*
    *(ADDRESS = (PROTOCOL = TCP)(HOST = Desktop029.tvsil.com)(PORT = 1521))*
    *(CONNECT_DATA =*
    *(SERVER = DEDICATED)*
    *(SERVICE_NAME = TEST1)*
    ORCL =
    *(DESCRIPTION =*
    *(ADDRESS_LIST =*
    *(ADDRESS = (PROTOCOL = TCP)(HOST = desktop041.tvsil.com)(PORT = 1522)))*
    *(CONNECT_DATA =*
    *(SERVICE_NAME = orcl)*
    EXTPROC_CONNECTION_DATA =
    *(DESCRIPTION =*
    *(ADDRESS_LIST =*
    *(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC2))*
    *(CONNECT_DATA =*
    *(SID = PLSExtProc)*
    *(PRESENTATION = RO)*
    *)*OK, let's clear a few things up.
    First, as mentioned, the listener is purely a client-side process. Hence there is no use of a listener.ora on the client.
    Second, a single listener, listening on a single port, can service multiple databases of multiple versions running from multiple oracle homes. It listens for a connection, sets it up (on a different port than its listening on) and is then out of the picture for that connection. It establishes the connection, but does not sustain it. Your listener.ora is far more complex (dare I say convoluted) than need be.
    On the client side (and the server can also act as a client), the tnsnames.ora serves the purpose of resolving a an alias (a tns service name) to an actual destination on the network.
    Assume you have the following in your tnsnames.ora:
    larry =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = myhost)(PORT = 1521))
        (CONNECT_DATA =
          (SERVICE_NAME = curley)
      )Now, when you issue a connect, say like this:
    $> sqlplus scott/tiger@larrytns will look in your tnsnames.ora for an entry called 'larry'. Next, tns sends a request to (PORT = 1521) on (HOST = myhost) using (PROTOCOL = TCP), asking for a connection to (SERVICE_NAME = curley).
    Where is (HOST = myhost) on the network? When the request gets passed from tns to the next layer in the network stack, the name 'myhost' will get resolved to an IP address, either via a local 'hosts' file, via DNS, or possibly other less used mechanisms. You can also hard-code the ip address (HOST = 123.456.789.101) in the tnsnames.ora.
    Next, the request arrives at (PORT = 1521) on (HOST = myhost). Hopefully, there is a listener on myhost configured to listen on (PORT = 1521), and that listener knows about (SERVICE_NAME = curley). If so, you'll be connected.
    What can go wrong?
    First, there may not be an entry for 'larry' in your tnsnames. In that case you get "ORA-12154: TNS:could not resolve the connect identifier specified" No need to go looking for a problem on the host, with the listener, etc. If you can't place a telephone call because you don't know the number (can't phone your telephone directory or can't find the party you are looking for listed in it) you don't look for problems at the telephone switchboard.
    Maybe the entry for larry was found, but myhost couldn't be resolved to an IP address (say there was no entry for myhost in the local hosts file). This will result in "ORA-12545: Connect failed because target host or object does not exist"
    Maybe there was an entry for myserver in the local hosts file, but it specified a bad IP address. This will result in "ORA-12545: Connect failed because target host or object does not exist"
    Maybe the IP was good, but there is no listener running: "ORA-12541: TNS:no listener"
    Maybe the IP was good, there is a listener at myhost, but it is listening on a different port. "ORA-12560: TNS:protocol adapter error"
    Maybe the IP was good, there is a listener at myhost, it is listening on the specified port, but doesn't know about SERVICE_NAME = curley. "ORA-12514: TNS:listener does not currently know of service requested in connect descriptor"

  • SQL developer cannot see connection info from tnsnames.ora file

    Greetings All,
    I have been using sql developer for a while. Currently on 3.0.04.34.
    I have 16 database connections.
    Everything was working fine until yesterday.
    Today when I tried to connect to a database from the list of connections I am getting following error:
    Invalid connection information specified. Verify url format for specified driver.
    When I pull up the property for this connection -connection type is still TNS, Netwrok Alias is now greyed out and what was in Netwrok Alias has shifted to Connect Identifier.
    When I try to create a new connection I do not see entry from tnsnames.ora file for the databse I am trying to connect to in the Network Alias drop down list.
    I can connect to this database from sqlplus.
    Has anyone seen this behavior? Does any one know the fix for this?
    Thanks.

    Hi,
    Maybe your preference settings got corrupted, or the Tnsnames.ora file got moved to somewhere SQL Developer can't find it.
    Are you using either:
    1. Tools|Preferences|Database|Advanced|Tnsnames Directory, or a
    2. TNS_ADMIN environment variable
    to point to your Tnsnames? Having one of those should enable the Network Alias drop-down list to get populated. Otherwise, if the values moved to Connection Identifier are correct, then you won't be to connect in that mode without also having an Oracle client installed with an 11.1 JDBC thick driver (ocijdbc11.dll).
    If there is no issue with the Tnsnames. ora location, it might be a good idea to use Export Connections to make a backup of your connections. Then you can try deleting the connections from SQL Developer and re-importing them. Even if that doesn't fix the problem, you should be no worse off.
    Regards,
    Gary
    SQL Developer Team

  • Tnsnames.ora file does not seem to load in SQL Developer

    I've really tried my best to figure this out on my own ... through the Help, this forum, and Internet in general. I apoligize in advance for having to ask this, since I'm sure this is a common issue. This particular form entry was really close:
    Database Connections will not load tnsnames.ora
    But, I just can seem to figure out why, or where entries from my tnsnames.ora file are loading into SQL Developer.
    - I have the TNS_ADMIN system environment variable defined to the directory where tnsnames.ora is stored - C:\oracle\product\10.2.0\client_1\NETWORK\ADMIN.
    - I do not see a TNS tab as the forum entry above indicates anywhere in SQL Developer - This may be my problem.
    It seems that this issue could be cleared up with better directions on how to import tnsnames.ora entries into SQL Developer. Is there any specific direction on how to get your tnsnames.ora file setup correctly with SQL Developer running on Windows XP - Besides the Help which mentions the setup of TNS_ADMIN, but doesn't really tell you what the expected result is, or where the entries will be, or how to verify this is working?
    Any help would be most appreciated.
    Thanks,
    Dave
    Below is the export from the About box in SQL Developer:
    About
    Oracle SQL Developer 1.5.1
    Version 1.5.1
    Build MAIN-5440
    Copyright © 2005,2008 Oracle. All Rights Reserved.
    IDE Version: 11.1.1.0.22.49.42
    Product ID: oracle.sqldeveloper
    Product Version: 11.1.1.54.40
    Version
    Component Version
    ========= =======
    CVS Version Internal to Oracle SQL Developer (client-only)
    Java(TM) Platform 1.6.0_07
    Oracle IDE 1.5.1.54.40
    Versioning Support 1.5.1.54.40
    Properties
    Name Value
    ==== =====
    apple.laf.useScreenMenuBar true
    awt.toolkit sun.awt.windows.WToolkit
    class.load.environment oracle.ide.boot.IdeClassLoadEnvironment
    class.load.log.level CONFIG
    class.transfer delegate
    com.apple.macos.smallTabs true
    com.apple.mrj.application.apple.menu.about.name "SQL_Developer"
    com.apple.mrj.application.growbox.intrudes false
    file.encoding Cp1252
    file.encoding.pkg sun.io
    file.separator \
    http.agent Mozilla/5.0 (Java 1.6.0_07; Windows XP 5.1 x86; en_US) ICEbrowser/v6_1_3
    ice.browser.forcegc false
    ice.pilots.html4.ignoreNonGenericFonts true
    ice.pilots.html4.tileOptThreshold 0
    ide.AssertTracingDisabled true
    ide.bootstrap.start 1628689279134099
    ide.build MAIN-5440
    ide.conf C:\sqldeveloper\sqldeveloper\bin\sqldeveloper.conf
    ide.config_pathname C:\sqldeveloper\sqldeveloper\bin\sqldeveloper.conf
    ide.debugbuild false
    ide.devbuild false
    ide.extension.search.path sqldeveloper/extensions:jdev/extensions:ide/extensions
    ide.firstrun true
    ide.java.minversion 1.5.0
    ide.launcherProcessId 5580
    ide.main.class oracle.ide.boot.IdeLauncher
    ide.patches.dir ide/lib/patches
    ide.pref.dir C:\Documents and Settings\X626730\Application Data\SQL Developer
    ide.pref.dir.base C:\Documents and Settings\X626730\Application Data
    ide.product oracle.sqldeveloper
    ide.shell.enableFileTypeAssociation C:\sqldeveloper\sqldeveloper.exe
    ide.splash.screen splash.gif
    ide.startingArg0 C:\sqldeveloper\sqldeveloper.exe
    ide.startingcwd C:\sqldeveloper\sqldeveloper\bin
    ide.user.dir C:\Documents and Settings\X626730\Application Data\SQL Developer
    ide.user.dir.var IDE_USER_DIR
    ide.work.dir C:\Documents and Settings\X626730\My Documents\SQL Developer
    ide.work.dir.base C:\Documents and Settings\X626730\My Documents
    java.awt.graphicsenv sun.awt.Win32GraphicsEnvironment
    java.awt.printerjob sun.awt.windows.WPrinterJob
    java.class.path ..\..\ide\lib\ide-boot.jar
    java.class.version 50.0
    java.endorsed.dirs C:\Program Files\Java\jdk1.6.0_07\jre\lib\endorsed
    java.ext.dirs C:\Program Files\Java\jdk1.6.0_07\jre\lib\ext;C:\WINDOWS\Sun\Java\lib\ext
    java.home C:\Program Files\Java\jdk1.6.0_07\jre
    java.io.tmpdir C:\DOCUME~1\X626730\LOCALS~1\Temp\
    java.library.path C:\sqldeveloper;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\PROGRA~1\IBM\WEBSPH~2\BIN\DB2;C:\PROGRA~1\IBM\WEBSPH~2\BIN\MQClient;C:\PROGRA~1\IBM\WEBSPH~2\BIN;C:\IBM\WebSphere MQ Client\Java\lib;C:\Program Files\CA\SharedComponents\PEC\bin;C:\oracle\product\10.2.0\client_1\bin;C:\oracle\ora92\bin;C:\oracle\product\10.2.0\client_2\bin;C:\Perl\bin\;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;C:\Program Files\CA\PEC\bin;C:\Reuters\Plus;C:\Reuters\Plus\COMLOGIN;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Compuware\Common;C:\Program Files\Common Files\Compuware;C:\Program Files\CA\AllFusion Harvest Change Manager;C:\Program Files\SecureCRT\;C:\PROGRA~1\F-Secure\Ssh;c:\Program Files\Microsoft SQL Server\90\Tools\binn\;c:\Program files\1E\SMSNomad\;C:\j2sdk1.4.2_06\jre\bin;C:\Program Files\IDM Computer Solutions\UltraEdit-32;C:\Program Files\IBM\Installation Manager\eclipse\lib;C:\Program Files\CA\Cryptography\;C:\Program Files\CA\R71\AllFusion Harvest Change Manager;C:\IBM\WebSphere MQ Client\bin;C:\IBM\WebSphere MQ Client\tools\c\samples\bin;C:\PROGRA~1\IBM\SQLLIB\BIN;C:\PROGRA~1\IBM\SQLLIB\FUNCTION;C:\PROGRA~1\IBM\SQLLIB\SAMPLES\REPL
    java.naming.factory.initial oracle.javatools.jndi.LocalInitialContextFactory
    java.runtime.name Java(TM) SE Runtime Environment
    java.runtime.version 1.6.0_07-b06
    java.specification.name Java Platform API Specification
    java.specification.vendor Sun Microsystems Inc.
    java.specification.version 1.6
    java.util.logging.config.file logging.conf
    java.vendor Sun Microsystems Inc.
    java.vendor.url http://java.sun.com/
    java.vendor.url.bug http://java.sun.com/cgi-bin/bugreport.cgi
    java.version 1.6.0_07
    java.vm.info mixed mode
    java.vm.name Java HotSpot(TM) Client VM
    java.vm.specification.name Java Virtual Machine Specification
    java.vm.specification.vendor Sun Microsystems Inc.
    java.vm.specification.version 1.0
    java.vm.vendor Sun Microsystems Inc.
    java.vm.version 10.0-b23
    jdbc.driver.home /C:/oracle/product/10.2.0/client_1/
    jdbc.library /C:/oracle/product/10.2.0/client_1/jdbc/lib/ojdbc14.jar
    line.separator \r\n
    oracle.home C:\sqldeveloper
    oracle.ide.util.AddinPolicyUtils.OVERRIDE_FLAG true
    oracle.translated.locales de,es,fr,it,ja,ko,pt_BR,zh_CN,zh_TW
    oracle.xdkjava.compatibility.version 9.0.4
    orai18n.library /C:/oracle/product/10.2.0/client_1/jlib/orai18n.jar
    os.arch x86
    os.name Windows XP
    os.version 5.1
    path.separator ;
    reserved_filenames con,aux,prn,lpt1,lpt2,lpt3,lpt4,lpt5,lpt6,lpt7,lpt8,lpt9,com1,com2,com3,com4,com5,com6,com7,com8,com9,conin$,conout,conout$
    sun.arch.data.model 32
    sun.boot.class.path C:\Program Files\Java\jdk1.6.0_07\jre\lib\resources.jar;C:\Program Files\Java\jdk1.6.0_07\jre\lib\rt.jar;C:\Program Files\Java\jdk1.6.0_07\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.6.0_07\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.6.0_07\jre\lib\jce.jar;C:\Program Files\Java\jdk1.6.0_07\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.6.0_07\jre\classes
    sun.boot.library.path C:\Program Files\Java\jdk1.6.0_07\jre\bin
    sun.cpu.endian little
    sun.cpu.isalist
    sun.desktop windows
    sun.io.unicode.encoding UnicodeLittle
    sun.java2d.ddoffscreen false
    sun.jnu.encoding Cp1252
    sun.management.compiler HotSpot Client Compiler
    sun.os.patch.level Service Pack 2
    user.country US
    user.dir C:\sqldeveloper\sqldeveloper\bin
    user.home C:\Documents and Settings\X626730
    user.language en
    user.name a641421
    user.timezone America/New_York
    user.variant
    windows.shell.font.languages
    Extensions
    Name Identifier Version Status
    ==== ========== ======= ======
    Check For Updates oracle.ide.webupdate 11.1.1.0.22.49.42 Loaded
    Code Editor oracle.ide.ceditor 11.1.1.0.22.49.42 Loaded
    Database Connection Support oracle.jdeveloper.db.connection 11.1.1.0.22.49.42 Loaded
    Database Object Explorers oracle.ide.db.explorer 11.1.1.0.22.49.42 Loaded
    Database UI oracle.ide.db 11.1.1.0.22.49.42 Loaded
    Diff/Merge oracle.ide.diffmerge 11.1.1.0.22.49.42 Loaded
    Extended IDE Platform oracle.javacore 11.1.1.0.22.49.42 Loaded
    External Tools oracle.ide.externaltools 11.1.1.0.22.49.42 Loaded
    Feedback oracle.ide.feedback 11.1.1.0.22.49.42 Loaded
    File Support oracle.ide.files 11.1.1.0.22.49.42 Loaded
    File System Navigator oracle.sqldeveloper.filenavigator 11.1.1.54.40 Loaded
    Help System oracle.ide.help 11.1.1.0.22.49.42 Loaded
    History Support oracle.jdeveloper.history 11.1.1.0.22.49.42 Loaded
    Import/Export Support oracle.ide.importexport 11.1.1.0.22.49.42 Loaded
    Log Window oracle.ide.log 11.1.1.0.22.49.42 Loaded
    Mac OS X Adapter oracle.ideimpl.apple 11.1.1.0.22.49.42 Loaded
    Navigator oracle.ide.navigator 11.1.1.0.22.49.42 Loaded
    Object Gallery oracle.ide.gallery 11.1.1.0.22.49.42 Loaded
    Object Viewer oracle.sqldeveloper.oviewer 11.1.1.54.40 Loaded
    Oracle IDE oracle.ide 11.1.1.0.22.49.42 Loaded
    Oracle Microsoft Access Browser oracle.sqldeveloper.thirdparty.access 11.1.1.54.40 Loaded
    Oracle Migration Workbench oracle.sqldeveloper.migration 11.1.1.54.40 Loaded
    Oracle Migration Workbench - MS Access oracle.sqldeveloper.migration.msaccess 11.1.1.54.40 Loaded
    Oracle Migration Workbench - MySQL oracle.sqldeveloper.migration.mysql5 11.1.1.54.40 Loaded
    Oracle Migration Workbench - SQLServer oracle.sqldeveloper.migration.sqlserver2005 11.1.1.54.40 Loaded
    Oracle Migration Workbench - Translation Core oracle.sqldeveloper.migration.translation.core 11.1.1.54.40 Loaded
    Oracle Migration Workbench - Translation MS Access oracle.sqldeveloper.migration.translation.msaccess 11.1.1.54.40 Loaded
    Oracle Migration Workbench - Translation MS SQL Server oracle.sqldeveloper.migration.translation.sqlserver 11.1.1.54.40 Loaded
    Oracle Migration Workbench - Translation MySQL oracle.sqldeveloper.migration.translation.mysql 11.1.1.54.40 Loaded
    Oracle Migration Workbench - Translation Sybase oracle.sqldeveloper.migration.translation.sybase 11.1.1.54.40 Loaded
    Oracle Migration Workbench - Translation UI oracle.sqldeveloper.migration.translation.gui 11.1.1.54.40 Loaded
    Oracle MySQL Browser oracle.sqldeveloper.thirdparty.mysql 11.1.1.54.40 Loaded
    Oracle SQL Developer oracle.sqldeveloper 11.1.1.54.40 Loaded
    Oracle SQL Developer Extras oracle.sqldeveloper.extras 11.1.1.54.40 Loaded
    Oracle SQL Developer Reports oracle.sqldeveloper.report 11.1.1.54.40 Loaded
    Oracle SQL Developer SearchBar oracle.sqldeveloper.searchbar 11.1.1.54.40 Loaded
    Oracle SQL Developer TimesTen oracle.sqldeveloper.timesten 1.5.1.1.2 Loaded
    Oracle SQL Server Browser oracle.sqldeveloper.thirdparty.sqlserver 11.1.1.54.40 Loaded
    Oracle Sybase Browser oracle.sqldeveloper.thirdparty.sybase 1.2.1.54.40 Loaded
    Oracle XML Schema Support oracle.sqldeveloper.xmlschema 11.1.1.54.40 Loaded
    PROBE Debugger oracle.jdeveloper.db.debug.probe 11.1.1.0.22.49.42 Loaded
    Peek oracle.ide.peek 1.0 Loaded
    Replace With oracle.ide.replace 11.1.1.0.22.49.42 Loaded
    Runner oracle.ide.runner 11.1.1.0.22.49.42 Loaded
    SQL Worksheet Window oracle.sqldeveloper.sqlworksheet 11.1.1.54.40 Loaded
    Search Bar oracle.ide.searchbar 11.1.1.0.0 Loaded
    Snippet Window oracle.sqldeveloper.snippet 11.1.1.54.40 Loaded
    Sybase 12 oracle.sqldeveloper.migration.sybase12 11.1.1.54.40 Loaded
    Sybase 15 oracle.sqldeveloper.migration.sybase15 11.1.1.54.40 Loaded
    Tuning oracle.sqldeveloper.tuning 11.1.1.54.40 Loaded
    VHV oracle.ide.vhv 11.1.1.0.22.49.42 Loaded
    Versioning Support oracle.jdeveloper.vcs 11.1.1.0.22.49.42 Loaded
    Versioning Support for CVS oracle.jdeveloper.cvs 11.1.1.0.22.49.42 Loaded
    Versioning Support for Subversion oracle.jdeveloper.subversion 11.1.1.0.22.49.42 Loaded
    Web Browser and Proxy oracle.ide.webbrowser 11.1.1.0.22.49.42 Loaded
    oracle.ide.dependency oracle.ide.dependency 11.1.1.0.22.49.42 Loaded
    oracle.ide.indexing oracle.ide.indexing 11.1.1.0.22.49.42 Loaded

    Using Windows XP/Vista...
    After testing in our environment, it appears that SQL Developer 1.5.1 (5440) does in fact ignore the TNS_ADMIN environment variable and ONLY looks in the Oracle Home directory (network/admin). We define a central network location for our tnsnames file and have the tns_admin setup to point there instead of locally for our users.
    When selecting to add a new connection (in 1.5.1, it works in previously releases... meaning 1.2.something) and selecting TNS, the drop-down remains empty. However, if I exit SQL Developer and then copy the tnsnames file to the local network/admin directory I can then re-launch SQL Developer and the drop-down is populated. Exiting SQL Developer again, deleting the local copy of tnsnames, and then launching SQL Developer yet again results in the drop-down being empty.
    All other Oracle-related applications function as expected (as they have for years) using the TNS_ADMIN environment variable.
    Any suggestions/ideas?

Maybe you are looking for