linux oracle odbc 应用程序需要的连接串及配置

1. 配置 db_1/network/admin/tnsnames.ora

ORCL =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.75)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = orcl)
    )
  )

 

2. oracle odbc 连接串  DRIVER={Oracle 11g ODBC Driver};uid=SYSTEM;pwd=MANAGER;Database=orcl;ServerName=192.168.2.75;Port=1521;DBQ=orcl

DBQ:TNS service name

 

注意:linux 下 oracle odbc 连接串中不加 DBQ 项,会产生以下错误(具体原因还为调研):

SQLSTATE=[HY000] [unixODBC][Oracle][ODBC][Ora]ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA

 

 

 

你可能感兴趣的:(linux oracle odbc 应用程序需要的连接串及配置)