LINQPad - Connection String to my Oracle DB

后端 未结 2 777
囚心锁ツ
囚心锁ツ 2021-02-06 16:01

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

2条回答
  •  南笙
    南笙 (楼主)
    2021-02-06 16:51

    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.

提交回复
热议问题