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.
- Create a DG4ODBC init file on your Oracle machine. To do this, change to the
%ORACLE_HOME%\hs\admindirectory. Create a copy of the file
initdg4odbc.ora. Name the new file
Note In these instructions, replace %ORACLE_HOME% with the location of your Oracle HOME directory. For example,
- 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"
- Comment out the line that enables DG4ODBC tracing. For example:
#HS_FDS_TRACE_LEVEL = <trace_level>
- Add an entry to
%ORACLE_HOME%\network\admin\listener.orathat creates a SID_NAME for DG4ODBC. For example:
SID_LIST_LISTENER = (SID_LIST = (SID_DESC= (SID_NAME=quickbooksol) (ORACLE_HOME=%ORACLE_HOME%) (PROGRAM=dg4odbc) ) )
- Add a DG4ODBC entry to
%ORACLE_HOME%\network\admin\tnsnames.orathat 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.
- Start (or restart) the Oracle Listener:
cd %ORACLE_HOME%\bin lsnrctl stop lsnrctl start
- Connect to your Oracle database in SQL*Plus.
- 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';
- Try querying your QuickBooks data. For example:
SELECT * FROM "PurchaseOrder"@QUICKBOOKSOLLINK;
- If you have problems connecting to QuickBooks from Oracle, enable DG4ODBC tracing and check the trace files written to the
%ORACLE_HOME%\hs\tracedirectory. To enable DG4ODBC tracing, add the line
HS_FDS_TRACE_LEVEL = DEBUGto
initquickbooks.oraand then start / restart the Oracle listener. If the
tracedirectory does not exist, create it.
- If you enable ODBC Driver Manager tracing, but do not get a trace file or get an empty trace file, change the trace file location to the Windows TEMP directory. For example,