LINQPad - Connection String to my Oracle DB

旧街凉风 提交于 2019-12-03 03:47:26

There is a build issue in the newest IQDriver release. Revert to previous version (2.0.7) and you won't see that error. Author removed latest version, so you can do that directly from LINQPad (Add connection | Select IQ | Delete Driver | Re-download IQ Driver).

I've just got this working with the latest version of LINQPad (4.55.03) Premium, and IQ (2.1.1.0), as of 2015-03-09.

In our workplace, we use the TNSNAMES.ORA file to connect to Oracle 11g using PL/SQL Developer with entries such as:

TNS_NAME =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = the-host-name)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = the-service-name)
    )
  )

and JDBC connection strings for ColdFusion's connection to Oracle in the format

jdbc:oracle:thin:@
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = the-host-name)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = the-service-name)
    )
  )

In LINQPad's Choose Data Context window, select the IQ driver and click Next...

Provider: Oracle
Connection Mode: Direct (although my workstation has both 32 and 64 bit Oracle clients installed, which PL/SQL Developer and ColdFusion use, respectively)
Server: the-host-name
User Name: your Oracle username
Password: its password

On the Advanced tab:

Additional connection string options:
SERVICE NAME=the-service-name

Clicking Test shows Connection Successful

The connection icon (a cog) in the connections pane then populated with the list of tables.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!