Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

The DBD::Oracle documentation states that if your database resides on the same machine as your Perl code, then you can use a local IPC connector rather than TCP. My initial thought to this is that local IPC should be quicker.

The DBD::Oracle docs, however, do not cover Oracle 9i which is what I am using. The connection methods stated in the DBD::Oracle docs produce the error
DBI connect('','user',...) failed: ORA-06401: NETCMN: invalid driver designator (DBD ERROR: OCIServerAttach)
when I try running:

#!/usr/local/bin/perl BEGIN { $ENV{ORACLE_HOME} = '/app/oracle/product/9.0.1'; $ENV{TWO_TASK} = 'P:mydb'; } use DBI; $dbh = DBI->connect('dbi:Oracle:', 'user', 'pass') || die $!; $dbh->do("select 1 from dual"); $dbh->disconnect;

The DBD::Oracle docs suggest running $ORACLE_HOME/bin/adapters to make sure that the IPC adaptor is installed - mine is:

Installed Oracle Net Tranport Protocols are: IPC TCP/IP BEQueath SSL RAW

I did find a reference to a problem of this sort on Usenet but the article doesn't provide much help.

Can someone please suggest how I could connect to Oracle 9i with DBD::Oracle using something other than TCP/IP? If anyone has done this before, does a non-TCP/IP connection improve performance?

As you will be able to tell from my recent posts, I am having quite a lot of difficulty getting Oracle 9i to play nicely with Perl under my circumstances :)

Many thanks,

==fx, Infinity Is Colourless


In reply to Connecting DBD::Oracle without using TCP/IP by fx

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (1)
As of 2024-04-19 18:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found