About Tnsnames.ora

Hi where can i get more info about 'Tnsnames.ora'.
Thanks
Venkat

If you want in-depth info, do a search for the Net8 ADministrator's Guide from the OTN main page.
Justin

Similar Messages

  • Basic questions about tnsnames.ora

    I think I am quite confused about tnsnames.ora file (this is about release 9.2).
    - I was told that a tnsnames.ora file is only necessary in the server side when you need to connect to a different remote database, but if I do not have any entry in my server tnsnames.ora then, how can the listener know which services it has to listen to?
    - I do not understand what "Dynamic service registration" is and how it can be used.
    Sorry if the level of these questions is too low for this forum, but I have not found clear answers for them.

    - The listener knows which services it has to listen
    for by
    static registration --> the database definition is in
    listener.ora
    dynamic registration --> the PMON process of the
    database registers itself with the listener,
    submitting the service_name parameter from the spfile
    | init.ora
    Tnsnames.ora is a client thingy, when connecting to
    a remote database, the local database is a client
    for the remote database.
    Hth
    Sybrand Bakker
    Senior Oracle DBAThank you for the answer.
    I made a wrong conclusion, my situation is this (there are 2 database instances in one server and the listener.ora has no list of services, so I must assume both instances are registered dynamically, am I wrong?):
    I wrongly thought that the tnsnames.ora played some role in the server side because after restarting the listener I commented the entries in the server tnsnames.ora and the listener had no service registered, then I uncommented those entries and I saw that then the listener had those services registered. I guess that what it actually happened is that it takes a little time for the listener to register dynamically after it is restarted, can it be the case?
    I have read both init.ora files but I cannot see what parameter is set to register dynamically, maybe it is only defined at spfile level. Can someone tell me what parameters must I look for?
    One more question. I have been asked if a database must be restarted to work ok when the server ip is changed (I suppose it is done without shutting the server down). Does someone know? Should the listener also be rebooted?
    Thanks again.

  • A question about tnsnames.ora

    I have a question about tnsnames.ora file. I have two address entries in the tnsnames.ora, one is with protocol:ipc, the other is with protocol:tcp. The log file always tells me the hostname is UNKNOWN. I changed the hostname alias into ip address, but the error stills exists. But there isn't any other error of the running of database. Because I don't need to access database from remote client, thus I think if I delete the address entry of the hostname won't interrupt the running of database. So I delete it from the tnsnames.ora file. But the error stills exists. I am not familiar with Oracle. So could anyone help me to solve the problem or give me some ideas about it? Thanks.

    Hi,
    That tnsnames.ora file is the descriptor that resolves the service name to the correct host address. That line ADDRESS is the locator for the listener on the server which then determines if a session is granted or not. You cannot forget the sqlnet.ora file either. This sets the type of connection that the client is going to be involved in: either a HOST,TNSNAMES OR
    ONAMES. You also must check to see if the listener is turned on. This is a common error. But I dont think it is in this case. Judging by the hostname error message Id say you dont have the correct host name. That can be found in the init.ora file under db_name parameter. I suggest that you do some reading on this subject in the networking documentation. It is all very well explained there. There is more to this relationship than I touched upon here.
    Hope this helps.

  • Again about tnsnames.ora

    thx kmensah. but I want to use tnsnames.ora. in that document introuduce the way that I used before. but I want way of using tnsnames.ora .

    Wrong Post !!!

  • Oracle cleint and tnsnames.ora

    We have a duty to do some data analysis on one of our oracle databases. We have a copy of the tnsnames.ora file with the DB server and SID etc.
    If you use something like toad or golden to query the DB, do you also need to install the oracle client on the machine (windows XP?) Or just the TOAD software?
    Is there a default locaiton on XP where tnsnames.ora needs to be saved?
    And if we do need the client what is the correct version?

    user599292 wrote:
    We have a duty to do some data analysis on one of our oracle databases. We have a copy of the tnsnames.ora file with the DB server and SID etc.
    If you use something like toad or golden to query the DB, do you also need to install the oracle client on the machine (windows XP?) Or just the TOAD software?
    Is there a default locaiton on XP where tnsnames.ora needs to be saved?
    And if we do need the client what is the correct version?Toad, yes you need the Oracle client. Can't say about "golden", I don't even know what that is. In general, any product like this is going to sit on top of the Oracle client, not replace it.
    there is nothing magic about tnsnames.ora. It is just a names resolution file that is used by the oracle client software. If you have some magic application that replaces the oracle client instead of using it, then your tnsnames.ora will be of no intrinsic value beyond giving you the information you need to configure said magic application.
    Edited by: EdStevens on Oct 14, 2011 6:32 AM

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

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

  • How to deactivate an entry in tnsnames.ora file

    Hi all,
    I am working with Oracle 10g enterprise edition. I have a data source named with DEVDATA which should not be affected while I am working on my project. Usually, I will add DEVDATA entry in tnsname.ora file if I want to use it and I will remove that entry from tnsnames.ora file in order to protect that data source. It is very laborious process each time when I want to add or remove that entry. Do we have any mean such a way that I can switch between the two options. Currently, I have a desktop shortcut to tnsnames.ora file so that I can add or remove that entry when ever I want. Can we comment out that entry. Please suggest me.
    I hope this is the right place to fire this question. If not, direct me. Thanks in advance.
    Regards,
    Kumar.

    [email protected] wrote:
    Hi all,
    Thanks for your replays. As you said we can comment out lines with '#'. But, I am looking for commenting whole entry at a time. Can any one tell me how to comment out whole entry/paragraph. Is there any oracle utility by which we can deactivate the data source. Please suggest. Thank you.
    Regards,
    Kumar.As others have said, either comment out each line of the entry, or have two tnsnames files that you rename as needed. But really, how often do you make the swap that commenting/uncommenting about five lines of code is such a burden?

  • Getting host, port from the tnsnames.ora with the service name

    Hi.
    I think that I asked a similar question yesterday. I want to ask if there is a way to get host and port from the tnsnames.org with a given service name. Somebody answered it for getting SID in the sqlplus. so I tried it in a similar way, but it didn't work.
    I have a service name, but I don't know how to get host and port. I know that I can parse the tnsnames.ora file to get it, but if possible, I want to use the more official and safe way.
    I'd appreciated if somebody knows it.

    caesarkim wrote:
    Hi.
    I think that I asked a similar question yesterday. I want to ask if there is a way to get host and port from the tnsnames.org with a given service name. Somebody answered it for getting SID in the sqlplus. so I tried it in a similar way, but it didn't work.
    I have a service name, but I don't know how to get host and port. I know that I can parse the tnsnames.ora file to get it, but if possible, I want to use the more official and safe way.
    I'd appreciated if somebody knows it.Oracle RDBMS does not require SQL*Net to operate.
    Oracle RDBMS does NOT now or care about content of any tnsnames.ora file.
    Realize that each (remote) user can have their own personalized copy of tnsnames.ora
    The content of tnsnames not NOT have to reflect any reality.
    I could post the content of my tnsnames.ora & it would be useless to everyone reading.

  • 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

  • Which TNSNAMES.ORA file to update???

    Hi All
    I have installed Oracle Apps on my local system and I regularly access one more database using internet which is on another server. Now for accessing my local apps database I can use Toad or PL/SQL Developer without modifying the TNS file.
    But if I want to access the remote database I need to edit the TNS file. But I am not sure about which TNS file to edit as there are many TNS files on my system. viz. in Prodora, Prodappl, Proddb etc.
    Which TNS file I need to update so that I can access the remote database?
    Regards
    Rahman

    A few things:
    Your three ORACLE_HOMEs:
    Prodora -- This is the one that the applications CLIENT uses (i.e. the concurrent managers, forms, etc.. and actually contains two ORACLE_HOMEs (the 8.0.6 one and the iAS one)
    Prodappl -- Is the APPL_TOP and shouldn't have a TNSNAMES under it anyway.
    Proddb -- This is the one used by the database. Update the TNSNAMES entries under this ORACLE_HOME if you need access to another system via a database link.
    Additionally, you shouldn't be editing the TNSNAMES.ora or LISTENER.ora files directly in an autoconfig-managed applications environment. The PROPER thing to do is to edit the INCLUDE FILE.
    If you look at the bottom of your autoconfig managed tnsnames.ora or listener.ora files, you will see an "IFILE=" entry that points to a (either zero-byte or non-existent) file. Put your customizations in there. This way you can be ensured that they won't be clobbered by AutoConfig. Additionally, when you copy things around for cloning, just rename the file on your target.
    -- James

  • How to add an entry to TNSNAMES.ORA?

    Hello,
    if I add the following entry to the TNSNAMES.ORA:
    test1_10.121.34.56 =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.121.34.56)(PORT = 1521))
    (CONNECT_DATA =
    (SID = test1)
    (SERVER = DEDICATED)
    how could I activate it please without rebooting?
    I'm using Oracle 9i Release 9.2.0.8.0 at CentOS 4.7
    Linux machine (which is compatible to RHEL 4.7).
    Thank you
    Alex

    Hello all, thank you for your support.
    Could we please start from the beginning?
    (and I'll use the real IP addresses this time, sorry)
    {color:#0000ff}oracle@ablora01:admin&gt; <strong>host ablora01.internal.XXX.com</strong>
    ablora01.internal.XXX.com has address 10.121.42.100
    {color}
    I have neither sqlnet.ora nor listener.ora and
    I have the following 2 entries in my tnsnames.ora:
    {color:#0000ff}oracle@ablora01:admin&gt; <strong>ll /abl/apps/oracle/9.2/network/admin/</strong>
    -rw-r--r-- 1 oracle oinstall 825 Jul 26 2003 libnk59.def
    drwxr-xr-x 2 oracle oinstall 4096 Nov 5 16:25 samples
    -rw-r--r-- 1 oracle oinstall 130 Mar 18 2002 shrept.lst
    -rw-r--r-- 1 oracle oinstall 24 Aug 7 2000 snmp_ro.ora
    -rw-r--r-- 1 oracle oinstall 717 Nov 5 17:15 sqlnet.log
    -rw-r--r-- 1 oracle oinstall 756 Nov 5 17:08 tnsnames.ora
    oracle@ablora01:admin&gt; <strong>cat /abl/apps/oracle/9.2/network/admin/tnsnames.ora</strong>
    # TNSNAMES.ORA Network Configuration File: /abl/apps/oracle/9.2/network/admin/tnsnames.ora
    # Generated by Oracle configuration tools.
    TEST1_10.121.42.81 =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.121.42.81)(PORT = 1521))
    (CONNECT_DATA =
    (SID = test1)
    (SERVER = DEDICATED)
    BOCHUM_10.121.42.100 =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.121.42.100)(PORT = 1521))
    (CONNECT_DATA =
    (SID = BOCHUM)
    (SERVER = DEDICATED)
    {color}
    When I try to tnsping the first entry it works:
    {color:#339966}oracle@ablora01:admin&gt;<strong> tnsping BOCHUM_10.121.42.100</strong>
    TNS Ping Utility for Linux: Version 9.2.0.8.0 - Production on 05-NOV-2008 17:19:34
    Copyright (c) 1997, 2006, Oracle Corporation. All rights reserved.
    Used parameter files:
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.121.42.100)(PORT = 1521))) (CONNECT_DATA = (SID = BOCHUM) (SERVER = DEDICATED)))
    <strong>OK (0 msec)</strong>
    {color}
    When I try to tnsping the 2nd entry it fails:
    {color:#ff0000}oracle@ablora01:admin&gt; <strong>tnsping TEST1_10.121.42.81</strong>
    TNS Ping Utility for Linux: Version 9.2.0.8.0 - Production on 05-NOV-2008 17:20:21
    Copyright (c) 1997, 2006, Oracle Corporation. All rights reserved.
    Used parameter files:
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.121.42.81)(PORT = 1521))) (CONNECT_DATA = (SID = test1) (SERVER = DEDICATED)))
    <strong>TNS-12541: TNS:no listener</strong>{color}
    When I look at the listener I get:
    {color:#339966}oracle@ablora01:admin&gt; <strong>lsnrctl status</strong>
    LSNRCTL for Linux: Version 9.2.0.8.0 - Production on 05-NOV-2008 17:21:55
    Copyright (c) 1991, 2006, Oracle Corporation. All rights reserved.
    Connecting to (ADDRESS=(PROTOCOL=tcp)(PORT=1521))
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for Linux: Version 9.2.0.8.0 - Production
    Start Date 04-NOV-2008 17:35:04
    Uptime 0 days 23 hr. 46 min. 50 sec
    Trace Level off
    Security OFF
    SNMP OFF
    Listener Log File /abl/apps/oracle/9.2/network/log/listener.log
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ablora01.internal.XXX.com)(PORT=1521)))
    Services Summary...
    Service "BOCHUM" has 1 instance(s).
    Instance "BOCHUM", status READY, has 1 handler(s) for this service...
    Service "test1" has 1 instance(s).
    <strong>Instance "test1", status READY, has 1 handler(s) for this service...</strong>
    Service "test1XDB" has 1 instance(s).
    Instance "test1", status READY, has 1 handler(s) for this service...
    The command completed successfully{color}
    When I try sqlnet it first fails and I have to reenter password:
    {color:#339966}{color:#ff0000}oracle@ablora01:admin&gt; <strong>sqlplus scott/tiger@TEST1_10.121.42.81</strong>
    SQL*Plus: Release 9.2.0.8.0 - Production on Wed Nov 5 17:10:42 2008
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    {color:#ff0000}ERROR:
    {color}<strong>{color:#ff0000}ORA-12541: TNS:no listener
    {color}</strong>{color}
    {color:#ff0000}{color:#ff0000}Enter user-name: scott
    Enter password:{color}
    Connected to:
    Oracle9i Release 9.2.0.8.0 - Production
    JServer Release 9.2.0.8.0 - Production
    SQL&gt; select * from tab;
    TNAME TABTYPE CLUSTERID
    BONUS TABLE
    DEPT TABLE
    EMP TABLE
    SALGRADE TABLE
    {color}
    Do you please know, why it complains about the missing listener?
    And my actual target is to allow a program from 10.121.42.81
    to connect to the "test1" instance.
    Regards
    Alex
    Edited by: user10507116 on Nov 5, 2008 12:29 PM

  • Parameters of tnsnames.ora

    hello. i am new in oracle 10g and i want to take advice. i see the setting parameters of tnsnames.ora on Oracle Net Manager and i set the tnsnames.ora with it.
    i developed a client application working with remote oracle 10g database on windows platforms. i developet it on VisualStudio, this application can work with both ms sql and oracle 10g. the user chooses it. when the user chooses Oracle i must create connection string and connect to the remote db.
    i can implement it with two way
    1. i want only connection name which is defined in tnsnames.ora and connect over it.
    2. i make an interface user set the simple and advanced settings of connection parameters and i can insert them into connection string.
    which way should i use. i think that it is better to set all of parameters in my application because it will be easier for user. but i think about the future versions of oracle . there may be problems on them.
    what do you advice me?
    thanks.

    Hello user "user518019":
    I'm also new in the Oracle world but I have programming since a lot of years. I would recommend to you following a simple rule:
    if your applicattion is very simple you must follow the simple way to connect to DB.
    By using a "tnsnames.ora" you only need to know a DB name to connect to it. In the other hand, if your are using non-default ports o also like this (per example, a more complicated enviroment) you would need a more detailed box to especify address, port number, service name, etc, etc...
    I suppose Oracle will continue using "tnsnames.ora" a lot of years, but this is only a impression. I hope send you some help with this.

  • Strange Behaviour of TNSNAMES.ora file

    Hello Guys,
    Now we have 2 database servers with different IP obviously and same SID with 9i and 10g databases.
    Our application is developed in forms 6i. Before 10g server, application was using 9i database server as its database and there were no problems. Developer client is installed at user's machine and they were having no connectivity issue with 9i database. Now after updation of database server. We have changed the IP address of tnsnames.ora file at every client machine. Now there is no information at client ends to connect with database 9i, but it must connect with 10g.
    The client is still connecting with 9i database which is really strange. Just want to ask if connection information also need to be changes in some other file other then tnsnames.ora file.
    Regards,
    Imran

    This is what making me worried, how the application is connecting with oracle 9i when TNS has no information about 9i server.
    Well ifi we directly connect form builder with DB it does connects with 10g database, while the application is not. I have tried this.
    Regards,
    Imran

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

Maybe you are looking for

  • How do I share files on iCloud between different apps?

    Hi, how do I share files on iCloud between different apps? I would like to edit simple plain text files on my Mac and my iPad using different apps. They don't see the content of each other. How do I fix this? example: when I create a .txt files: Bywo

  • Unable to Serialize ReportClientDocument using "StateServer" session mode

    Hello, In my ASP.NET application, I am using "StateServer" session state mode for maintaining session variables. The problem however is that this mode requires all the objects inside the session variables to be serialized and for some reason ReportCl

  • Reinstallation of Photoshop 10 in my Imac with Mavericks OSX creates error code 213:5

    I reformatted my hard drive and reinstalled all of my software. However when I install Photoshop Elements 10 and attempt to boot the program I get an error message of ,"Error_213:5".  I have read Permission fixes about the PCD folder and applied  "Ap

  • Help on Dispyaing Missing Time in a day

    Thanks in Advance I want to display my output and insert missing time records Original Query In the above query 9:01 and 9:03 are missing for same date SQL> SELECT * FROM MISSING_TIME; DATE_TIME DESCRIPTION1 DESCRIPT2 9/25/2003 9:00:00 AM test1 test2

  • Copying pages to the local portal

    Hi, Is it possible for me to copy the pages from our production portal to my local portal. This is because I would like to make try out something on the portal pages and I cannot do that in Production. Also, can I use WebDAV for the same? Thanks a lo