Jcat
宠辱不惊,闲看庭前花开花落~~
posts - 173,comments - 67,trackbacks - 0
Oracle建好后,tnsnames和listener中自动就带有如下内容,这里咱们就来解释一下这些东西是干什么用的

----TNSNAMES.ora----
EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    )
    (CONNECT_DATA =
      (SID = PLSExtProc)
      (PRESENTATION = RO)
    )
  )

----LISTENER.ora----
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = /opt/oracle/10gR2)
      (PROGRAM = extproc)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
      (ADDRESS = (PROTOCOL = TCP)(HOST = dcm)(PORT = 1521))
    )
  )


IPC - Inner Process Communication
When a process is on the same machine as the server, use the IPC protocol for connectivity instead of TCP. Inner Process Communication on the same machine does not have the overhead of packet building and deciphering that TCP has.
I've seen a SQL job that runs in 10 minutes using TCP on a local machine run as fast as one minute using an IPC connection. The difference in time is most dramatic when the Oracle process has to send and/or receive large amounts of data to and from the database.
For example, a SQL*Plus connection that counts the number of rows of some tables will run about the same amount of time, whether the database connection is made via IPC or TCP. But if the SQL*Plus connection spools much data to a file, the IPC connection will often be much faster -- depending on the data transmitted and the machine workload on the TCP stack.

For how to configure it:
1. you should add one IPC line in the LISTENER.ORA
2. You should also add one IPC line in the TNSNAMES.ORA



PLSExtPro - PL/Sql External Procdure
默认安装时,会安装一个PL/SQL外部程序(extproc--这是程序名)条目在listener.ora中,是oracle为调用外部程序默认配置的监听,它的名字(也就是SID)通常是ExtProc或PLSExtProc
但一般不会使用它,可以直接从listener.ora中将这项移除,因为对ExtProc已经有多种攻击手段了,在不使用外部程序时,Oracle也是建议删除的。



extproc的作用
就是在pl/sql中调用外部语句,如c,java写的过程。
现在,Oracle已经全面支持JAVA了,这东西也就过时了,之所以继续保留是考虑到兼容以前老版本的数据库实例。

[oracle@dcm bin]$ extproc
Oracle Corporation --- TUESDAY   JAN 05 2010 21:58:23.878
Heterogeneous Agent Release 10.2.0.1.0 - Production

posted on 2010-01-05 21:59 Jcat 阅读(634) 评论(0)  编辑  收藏 所属分类: Database

只有注册用户登录后才能发表评论。


网站导航: