Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: DBI connect without an entry in TNSNAMES.ORA

by chanakya (Friar)
on Nov 10, 2006 at 07:31 UTC ( #583300=note: print w/replies, xml ) Need Help??

in reply to DBI connect without an entry in TNSNAMES.ORA


I guess its not possible to connect to SID without the entry in TNSNAMES.ORA. I've tried it before but it just doesn't work, because the listener on the remote machine will search for the SID defined in TNSNAMES.ORA

Hope that helps.
  • Comment on Re: DBI connect without an entry in TNSNAMES.ORA

Replies are listed 'Best First'.
Re^2: DBI connect without an entry in TNSNAMES.ORA
by ericdp (Novice) on Nov 10, 2006 at 15:11 UTC
    I was afraid of that. I was hoping giving a fully qualified connection string would be able to bypass the need for an entry in this file. I guess that Oracle has hooks into this file in order for the local client to connect.


      You absolutely can connect from a client with no tnsnames.ora file, I do it all of the time, with the same syntax that you are using.

      You have obvoiusly not been using valuable tools that are available to you: the documentation for DBD::Oracle and oracle client tools

      The documentation for DBD::Oracle has a huge amount of documentation regarding connections and you can view it on the CPAN

      You have a bad SID/host combination in your script or in your environment. Read the DBD::Oracle documentation on connections and which piece of configuration data (DBI connection string; DBD environment variables; DBI environmant variables; Oracle client files and environment variables) interact. Especially the precedence.

      Here are some more options on how you could attempt to debug the issues:
      1. Verify all of your assumptions:
        • does the database instance actually reside on that server?
        • does the environment contain/lack all of the informaitn you expected
        • does the tnsnames.ora file exist and does it contain any entry that looks similar to the one to which you are trying to connect?
      2. Check for software bugs:
        • You know you are running old version of modules, check the Changelog for bugs related to connections for each version between the one you are using and the current version.

      Finally, when people are trying to help you and ask you questions, answer the questions.


Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://583300]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2022-12-09 01:53 GMT
Find Nodes?
    Voting Booth?

    No recent polls found