:

IPC vs TCP Connectivity Using TNSNames

When your code requires a connection to the database, and it  is on the same physical machine, it can be very advantageous to add an entry  into your TNSNames file so that the connection can occur using the IPC protocol  rather than the TCP protocol.

This is because the IPC protocol negates the need for the  process to contact the NIC in order to resolve the IP address only to realise  that the destination is the same server. It reduces the need for packet  building and deciphering. This change should show a noticeable difference when sending and receiving large amounts of data to and from the database.

To implement this, simply place the IPC address in the TNSNames file first, followed by the TCP address afterwards. If it can use IPC  it will; if not, it will use the TCP one. Remember to test it first…

Here is an example configuration with IPC set-up first:

DATABASE1 =   (DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =  (PROTOCOL = IPC)(Key = IPCKEY))
     (ADDRESS =  (PROTOCOL = TCP)(HOST = MYHOST)(PORT = 1521))
   )
     (CONNECT_DATA =       (SID =  DATABASE1)
   )
)

Like it, share it...

Category: SQL Net


Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *