--- [EMAIL PROTECTED] wrote:
> How does one use the IPC protocol when connecting to a database on the 
> same machine?
> 
> This used to work for Oracle 7...
> 
>     $ENV{ORACLE_SID} = 'THE_SID';
>     $dbh = DBI->connect('dbi:Oracle:','ods',$passwd);


That is not using the IPC protocol.

When you connect to a database by setting ORACLE_SID (and ORACLE_HOME),
you are using the "Bequeath" protocol, in which case the client
communicates with the server via shared memory.  

The mechanism works the same in v7, v8 and v9.  If you are having 
troubles, it is not due to Oracle version, but to your configuration.  
If you've changed the database to v8, is the client still using 
v7 libraries?  If so, you cannot connect this way.  The environment
variables ORACLE_HOME and ORACLE_SID must be identical in the server
and the client in order to connect this way (so obviously they
have to be using the exact same lib versions)

The IPC protocol uses Unix domain sockets for server-client 
communication, and requires an appropriately configured
Oracle listener process, with an entry like:

  (ADDRESS_LIST = (ADDRESS=(PROTOCOL=IPC)(KEY=<somekey>)))

and a corresponding tnsnames.ora entry.


> The TNS adaptor works fine, 

There isn't really a "TNS adapter", per se.  They are all
TNS adapters (TCP, IPC, et. al.)  This is a common source
of confusion.


> but I would imagine that IPC is faster...

"imagine" is the right word.  On most modern unix'es, domain sockets
are no faster than tcp sockets, and sometimes slower.  The Oracle
IPC protocol is largely obsolete, IMHO.

The Bequeath adapter can be slightly faster, but you'd probably
need a careful benchmark to even detect the difference. And the 
difference will depend heavily on what you're app is doing,
with the realisitic difference ranging from nil to negligible.

Bottom line:  it's a waste of time to fool around with it.


Mark



__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

Reply via email to