LINQPad - Connection String to my Oracle DB

吃可爱长大的小学妹 提交于 2019-12-04 09:44:28

问题


I just started using LINQPad and all works great when connecting to my SQL Server DB, but now I'm trying to set up a second connection to my Oracle DB and I'm getting stuck as to how to do it.

I downloaded the IQ driver (v 2.0.8.0 - Latest) and when I go to add a new connection, I select Oracle as my DB Provider and don't know how to do the rest based upon my usual connection string looking as follows:

Data Source=(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = [IP Address])(PORT = [Port]))(CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = [Service Name])));User Id=[name];Password=[password];" 

I know that you usually post what you've tried, but, believe me, I've tried filling in those text boxes every which way I could think of and keep getting errors when I click the "Test" button.

Also, one of the errors I get is: License not valid due to the problems with dotConnect for Oracle installation - I don't think that's the only issue, but I'm sure I'll also need to fix that problem too....

Any suggestions / links to offer about what to fill in where to make this work??

THANKS!!!!!!!


回答1:


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).




回答2:


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.



来源:https://stackoverflow.com/questions/19404899/linqpad-connection-string-to-my-oracle-db

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