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)
  )

Similar Messages

  • 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

  • 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

  • 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

  • Database connectivity requiring oracle wallet, tnsnames.ora, and sqlnet.ora

    We have a new datasource that I need to write a report against.  In order to access the db, I have to install an Oracle wallet on my pc that contains a certificate.  I then have an entry in the sqlnet.ora file that references this wallet, and I have an entry in my tnsnames file.  I wrote a report successfully on my pc.  We then have our Business Objects installation on a Sun Solaris machine with Unix.  We installed the wallet, added the sqlnet.ora entry, and the tnsnames.ora entry.  I am able to connect to the db from the unix command prompt by typing sqlplus username@dbname successfully.  However, when I place my Crystal Report in Bus. Obj. I cannot get it to work.  I go to the CMC, select the report, choose Process, Database.  I am entering Use custom database logon info and choosing Oracle as my database driver.  I then enter the tnsnames entry into the server and enter my username and password and check the use use same database logon as when report is run.  I get the error The database logon information for this report is either incomplete or incorrect.  I'm guessing the report is not using the certificate in the wallet when it is trying to log on, but I'm not sure.  Does anyone have any suggestions or experience with this?  Thanks in advance for any help.

    Hi Angie,
    you should install the 32bit Oracle driver on your Solaris machine and adjust the LD_LIBRARY_PATH environment variable (in the profile of the BOBJ installation user) to point to the path of the 32bit libraries of your Oracle driver.
    BOBJ is not a native 64bit software and can therefore work only with the 32bit versions of the database drivers.
    Regards,
    Stratos
    Edited by: Efstratios Karaivazoglou on Jul 15, 2009 4:49 PM

  • Oracle 9iDS-tnsnames.ora

    Happy Holidays!
    I am receiving the following error:
    1) Oracle forms builder-data block wizard
    ORA:12154: TNS:could not resolve service name
    Please clarify....Which Oracle file do I place my Professors tnsnames.ora file so that I may create a data block?
    Thanks,
    kiggy

    Happy Holidays
    happy new year
    check your database name that u can find it in database home ex. c:/database go into database home search for network folder
    in it u can find folder call admin
    in admin folder u found tnsnames.ora
    its for database open it and see the name of database
    ex.
    # TNSNAMES.ORA Network Configuration File: E:\DATABASE\network\admin\tnsnames.ora
    # Generated by Oracle configuration tools.
    ORCL =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = senergy)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = ORCL)
    this is a sample of what u c in the folder the word up the line is the name of database write it down
    then close the folder
    and go to your forms home
    open the home of forms and search for network folder
    in it u can find the admin folder
    in it u may found tnsnames.ora
    if u didnt find it its ok
    i wirte it here=====>
    {name the forms servies as u wish }=
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS =
    (PROTOCOL = TCP)
    (Host ={your computer name} )
    (Port = 1521)
    (CONNECT_DATA = (SID ={the name of your database})
    this is what must be found in tnsnames.ora that be in forms home in network foder in admin folder
    if didnt work send to me on my mail and i will post u document explain all that
    [email protected]

  • Oracle client picking up wrong port while connecting to oracle server

    Hi,
    I have an oracle client installed in one of the system. As we know oracle client connects to the server on port 1521, but from my client system every time i try to connect it is taking random ports which are blocked on our firewall, hence not connecting to the server.
    Is there any method i can connect with port 1521 only. I have also put the entry in client tnsnames.ora
    Thanks in advance
    Regds
    Kiran

    M Kiran Kumar Reddy wrote:
    True, Tnsping is working but i am not able to connect to server
    my client system TNSNames.ora
    LIB =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.228)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = orcl)
    Client to server tns ping result
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.
    1.228)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))
    OK (40 msec)
    Edited by: M Kiran Kumar Reddy on Jul 23, 2009 7:42 PMThat's because tnsping goes no further than the listener. There doesn't even have to be a database to get a successful tnsping. And since tnsping only needs to ping the listener (not the database) it only needs port 1521. It's when the listener tries to set up the actual database connection that he will (by default) pick an random port for that connection.

  • 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?

  • 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"

  • No TNSNAME.ORA or listener.ora

    I am new to oracle.(learner)
    I was using oracle 11g and using oracle sql developer.
    It was working fine.
    I had to use oracle form builder, which I installed but I could not connect to database from form builder.It was giving ORA-12154:TNS:could not resolve the connect identifier specified and then I tried copying oracles tnsname.ora to form builder’s tnsname.ora and then it was giving TNS error no listener descriptor found or so on
    I tried googling and I tried every possible way discussed online
    and not being able to resolve it I de-installed (completely following steps discussed online even deleting registry entries) both oracle and  form builder (WHICH WAS IN F drive )
    and then I reinstalled the oracle 11g and form builder 10g again in E drive (earlier one was in F drive)
    Now as earlier oracle is working fine
    But now strange thing is now there aren't  any tnsnames.ora and listener.ora files in oracle_home/network/admin (also not in form builder’s directory) But database is running fine
    Any help

    997069 wrote:
    I am new to oracle.(learner)
    I was using oracle 11g and using oracle sql developer.
    It was working fine.
    I had to use oracle form builder, which I installed but I could not connect to database from form builder.It was giving ORA-12154:TNS:could not resolve the connect identifier specified and then I tried copying oracles tnsname.ora to form builder’s tnsname.ora and then it was giving TNS error no listener descriptor found or so on
    I tried googling and I tried every possible way discussed online
    and not being able to resolve it I de-installed (completely following steps discussed online even deleting registry entries) both oracle and  form builder (WHICH WAS IN F drive )
    and then I reinstalled the oracle 11g and form builder 10g again in E drive (earlier one was in F drive)
    Now as earlier oracle is working fine
    I can see all the services running,I can connect database using sql plus and sql developer and also issue sql command.
    I am just using oraclass database created during installation process.
    But as usual form builder is NOT working giving TNS:could not resolve the connect identifier specified
    But now strange thing is now there aren't  any tnsnames.ora and listener.ora files in oracle_home/network/admin (also not in form builder’s directory) But database is running fine
    Database control shows the listener.ora path to F drive(earlier installed one which I deinstalled ) but there is not any app/…/oracle database folder in F drive at all(I deleted it completely when I deinstalled it) and its not hidden as well.
    So I am really confused what I can do next.
    I am not able to login into database from form builder
    It gives error
    ORA-12154:TNS:could not resolve the connect identifier specified
    WHERE CAN I FIND THE TNSNAMES.ORA AND LISTENER.ORA file(how to find it)
    Any helplistener.ora file is NOT required to start or use Oracle Listener.
    tnsnames.ora is a plain text file that can be a single line like below
    ORCL=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ORCL)))

  • TNSNAMES.ora et HOSTS file on windows

    Hi,
    in TNSNAMES.ora for host field I put correct IP adresse.
    In hosts file of Windows I have defined an alias for the same host with wrong IP adresse. Then I can not connect to DB and I have TNS-12541 error.
    Then I put the correct adresse for host alias in hosts file. Everything is OK and I can connect to DB
    Is -it normal ? Why does not ORACLE use TNSNAMES.ora and it looks in hosts file ?
    Do you have any explanation ?
    Many thanks.

    check address in listener.ora and tnsnames.ora
    Try to connect with ip address.
    host file is used for address resolving.
    Regards

  • Location of tnsnames.ora for Tora and Oracle XE Client

    I Googled far and wide and did not see a CLEAR answer to my question, hopefully this will help others.
    I have installed the debian oracle-xe-client and tora packages (tora rebuilt for oracle) on Ubuntu 8.04.
    However, I did not know where I was supposed to place the tnsnames.ora file for my databases. I have tried running Tora with the environment variable of TNS_ADMIN set to the file where I placed my tnsnames.ora, however that did not work as Tora did not 'see' the file or its entries apparently. I know this works because I copied it from a Debian Etch box with the client and server installed.
    I had even added a 'network/admin' directory structure to the //usr/lib/oracle/xe/app/oracle/product/10.2.0/client (ORACLE_HOME) with the tnsnames.ora but also with no success.
    Now for the solution:
    Simply remember that TNS_ADMIN points to the directory where the tnsnames.ora is and it will work. :)
    I do have a suggestion that both Tora and sqlplus use a config file to set these directory(s) in addition to the overriding ability of the environment variable, TNS_ADMIN as is usually the case with UNIX apps (and thus expected).
    Thank you,
    Jason

    The ODBC Instant Client Readme that is included in the install also indicates that %ORACLE_HOME%/network/admin/tnsnames.ora is the correct default location. What about OCI?

  • Oracle 8i clients, inconsistent handling of tnsnames.ora (ORA-06401 gotcha)

    This is more of a bug report / oddity declaration than a real problem, though it was a pain in the butt to nail down. I post it here for the benefit of anyone else who may run into it down the road.
    Using the linux sqlplus client, I kept getting consistent failures connecting to one of a dozen db's, but tests with the (java) netasst client worked fine. After various debugging of other potential causes, it came down to strace'ing the sqlplus client, and noting that it was attempting to connect to the wrong host, despite what was specified on the command line.
    What we identified as the most probable cause:
    The routines that load and parse the tnsnames.ora file differ between the linux and java clients, with the java client being more tolerant/robust. The tnsnames.ora file I'd been supplied with had come from a fellow user's Win32 machine, and had been edited there, which probably included a couple ^M's or other non-visible characters within the file.
    The solution (at least, what I did):
    Load the tnsnames.ora file with netasst, and save it again with netasst. Netasst wrote the file in a manner that sqlplus could read accurately, and I got to go have a beer.
    - billn

    Hi Fredrik,
    You r right. But I have its entry in tnsnames.ora file. The entry looks like this -
    My_Service_Name.world =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS =
    (COMMUNITY = tcp.world)
    (PROTOCOL = TCP)
    (Server = Computer_Name_of_Server_having_Ora8i)
    (Host = IP_Add_of_Server_having_Ora8i)
    (Port = 1521)
    (Pipe = ORAPIPE)
    (CONNECT_DATA = (SID = ORCL)
    The same entry exists in the tnsnames.ora file on the local PCs (same office where the Oracle 8i Server is present) at Site 1 and these PCs connect the server without any problem.
    Thanks
    Lokesh

  • DBD::Oracle & Instant client - don't find tnsnames.ora

    Hello,
    I'm trying to use tns names in Perl scripts to connect with Instant client. I always get the ORA-12154 error when connecting with Perl :
    ORA-12154: TNS:could not resolve the connect identifier specified (DBD ERROR: OCIServerAttach).
    The perl command that raise the error is :
    +$dbh = DBI->connect("dbi:Oracle:MYDB","user","password") or die $DBI::errstr."\n";+
    I checked my Oracle installation and everything seems fine. Connection with sqlplus work without problem using the same connection string (sqlplus user/passowrd@MYDB).
    I stat'ed my tnsnames.ora file to check if it's accessed : it is with sqlplus, but not with my perl script.
    Instant Client has been installed with the zip files made available by Oracle (not RPM). ORACLE_HOME points to the installation directory and tnsnames.ora is located in $ORACLE_HOME//network/admin/. Server is a Red Hat Entreprise 5.
    In my knowledge DBD::Oracle use OCI so there should not have difference between sqlplus and DBD::Oracle. Am I wrong ? Anyone have had this problem before ?
    Thanks for your help
    Florent

    Hi,
    Environment variables was correctly defined, but your comment put me on the right track.
    I printed the %ENV content to check ORACLE_HOME which was OK.
    I check the directory and remind I put a sqlnet.ora file in the same directory than tnsnames.ora with the followin content :
    AUTOMATIC_IPC = OFF
    TRACE_LEVEL_CLIENT = OFF
    names.directory_path = (TNSNAMES)
    names.default_domain = world
    name.default_zone = world
    I removed this file and everything is ok now. I don't really know what this file is used for, but if I keep it online and change MYDB in the connection name to MYDB.world, it worked. I think I have to learn more about names...
    Thanks for your help anyway !
    Regards,
    Florent

  • Oracle client in linux problem with tnsnames.ora

    hi all
    i installed oracle-xe-cleint10.2 on linux machine i did not get any tnsnames.ora in my machine i am unable to connect to database. it shows tns connectiont identifier unfound. . is it come all with oracle client or some where else it .
    or further any proceeding i should follow steps. if found solution regard this pls forward solution to me
    Regard
    syam

    hi all
    i did not get any tnsnames.ora after installing oracle client in linux machine
    i installed oracle-xe-cleint10.2 on linux machine i did not get any tnsnames.ora in my machine i am unable to connect to database. it shows tns connectiont identifier unfound. . is it come all with oracle client or some where else it .
    or further any proceeding i should follow steps. if found solution regard this pls forward solution to me
    Regard
    syam
    Regards syam

Maybe you are looking for

  • List Item Question

              I'm trying to have my list items as capital letters, I know where to find the command to do so. However, when I change my ordered list from numeric value to alphabetical the letters go off tilt. Any suggestions?

  • Music plays after hanging up phone call

    Hi, I love my Xperia Z2 but for some reason if I have music paused, then I take a phone call, when I hang up the call, the music starts playing. I understand it should do this if the music is playing when the call comes in, but not if the music is pa

  • How do you get the "Get Album artwork" command to work?

    Have tried everythng I can think of, but I have not ever gotten a single album cover to show up automatically. I have tons of music and only half has art, and most of that was stuff I scraped from Amazon and added by hand.

  • Help needed with recursion algorithm..

    I can't seems to figure out which recursion method to use, if anyone can give me some advice, pls do.. Input: There is a row of n elecments with the initial value of 1. Output: Change all the 1s to 0s using the following conditions. -The first elemen

  • Problem with Web Host - Help please.

    I moved our main site to 'Hostmonster'. Trying to set up forms. Some of the forms our non-profit hosts send information from people with complaints - to Federal agencies that have a strict criteria for accepting email information (must originate from