日期:2014-05-16  浏览次数:20500 次

Oracle10g 配置tnsnames.ora和listener.ora方法
文件位置:oracle\product\10.2.0\db_1\NETWORK\ADMIN



tnsnames.ora 配置服务器或本地数据库



EXTPROC_CONNECTION_DATA =    \\安装Oracle之后原有的配置
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    )
    (CONNECT_DATA =
      (SID = PLSExtProc)
      (PRESENTATION = RO)
    )
  )



//以下是新的数据库配置
demo = //你建立数据库的时候写的数据库名
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) //HOST 写IP本地写localhost 端口默认是1521
    )
    (CONNECT_DATA =
      (SERVICE_NAME = demo)  //一般 service_name和 数据库名一样
    )
  )





listener.ora 监听器配置(直接复制粘贴ok)



SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = C:\oracle\product\10.2.0\db_1) \\路径要写你本地安装目录路径
      (PROGRAM = extproc)
    )
  )


1 楼 star65225692 2011-10-11  
好文顶啦~~~