Connect to QuickBooks Online from Oracle

The QuickBooks Online ODBC driver enables you to work with QuickBooks Online data in Oracle just as if you were working with data stored in a Oracle table.

Download the QuickBooks Online ODBC driver. Then follow the instructions in this article to install and license the driver and set up the ODBC data source that enables you to connect Oracle to QuickBooks online.

The following instructions show you how to connect Oracle on Windows to QuickBooks Online. For further information about DG4ODBC, refer to our DG4ODBC for Windows tutorial.

  1. Create a DG4ODBC init file on your Oracle machine. To do this, change to the %ORACLE_HOME%\hs\admin directory. Create a copy of the file initdg4odbc.ora. Name the new file initquickbooksol.ora.

    Note In these instructions, replace %ORACLE_HOME% with the location of your Oracle HOME directory. For example, C:\oraclexe\app\oracle\product\11.2.0\server.

  2. Ensure these parameters and values are present in your init file:
    HS_FDS_CONNECT_INFO = my_quickbooks_online_odbc_dsn

    Replace my_quickbooks_online_odbc_dsn with the name of a QuickBooks ODBC driver data source that connects to the target QuickBooks server. For example

    HS_FDS_CONNECT_INFO = "QuickBooksOnlineSystemDSN"
  3. Comment out the line that enables DG4ODBC tracing. For example:
    #HS_FDS_TRACE_LEVEL = <trace_level>
  4. Add an entry to %ORACLE_HOME%\network\admin\listener.ora that creates a SID_NAME for DG4ODBC. For example:
    SID_LIST_LISTENER =
     (SID_LIST =
       (SID_DESC=
         (SID_NAME=quickbooksol)
         (ORACLE_HOME=%ORACLE_HOME%)
         (PROGRAM=dg4odbc)
       )
     )
  5. Add a DG4ODBC entry to %ORACLE_HOME%\network\admin\tnsnames.ora that specifies the SID_NAME created in the previous step. For example:
    QUICKBOOKSOL =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = oracle_host)(PORT = 1521))
        (CONNECT_DATA =
          (SID = quickbooksol)
        )
        (HS = OK)
      )

    Replace oracle_host with the host name of your Oracle machine.

  6. Start (or restart) the Oracle Listener:
    cd %ORACLE_HOME%\bin
    lsnrctl stop
    lsnrctl start
  7. Connect to your Oracle database in SQL*Plus.
  8. In SQL*Plus, create a database link for the target QuickBooks server. For example:
    CREATE PUBLIC DATABASE LINK quickbooksollink CONNECT TO "dummyuser" IDENTIFIED BY "password" USING 'quickbooksol';
  9. Try querying your QuickBooks data. For example:
    SELECT * FROM "PurchaseOrder"@QUICKBOOKSOLLINK;

Notes