Loading TOC...
SQL Data Modeling Guide (PDF)

SQL Data Modeling Guide — Chapter 5

Installing and Configuring the MarkLogic Server ODBC Driver

Tableau, Qlik, and other SQL tools require an ODBC driver on the client machine to communicate with MarkLogic Server. This chapter describes how to install and configure your MarkLogic Server ODBC driver on your client.

There is a 32-bit and 64-bit Windows MarkLogic ODBC driver and a 64-bit Linux ODBC driver, which are available from the MarkLogic Developer site:

http://developer.marklogic.com/products/odbc

Locate the ODBC driver for MarkLogic Server and follow the appropriate setup procedure to configure it on your client machine:

Configuring the ODBC Driver on Windows

Tableau and Qlik communicate with MarkLogic Server via a 32-bit or 64-bit ODBC driver. This section describes how to configure your ODBC driver for use with MarkLogic.

  1. To launch the ODBC Data Source Administrator, open your Control Panel and navigate to:
    System and Security > Administrative Tools > Data Sources (ODBC)
  2. Click the System DSN tab and click Add:

  3. Select either the MarkLogic SQL (64-bit) or MarkLogic SQL (x86) (32-bit) driver and click Finish:

  4. Set up an ODBC app server, as described in Create an ODBC App Server.
  5. In the MarkLogic SQL ODBC Driver Setup dialog, enter a name for your data source, the database name (SQLdata), the name of the machine that hosts your MarkLogic Server, the port number of your MarkLogic ODBC App Server (5432), set SSL mode to ‘allow', and your MarkLogic Server login credentials. Click Test to test the connection to MarkLogic Server.

  6. If your connection test was successful, click Save. Otherwise, recheck your settings and retest.

Configuring the ODBC Driver on Linux

Dependencies:openssl and unixODBC.

The following procedure describes how to install the MarkLogic ODBC driver on Linux. The unixODBC tool is only needed for testing your connection to MarkLogic via the mlsqlodbc driver. If you don't think it is necessary to test your ODBC connection, skip to Step 3.

  1. Obtain a copy of unixODBC (2.3.4). You might be able to install it with yum, but if not, you can download the correct version from http://www.unixodbc.org/ to your /tmp directory and use the following procedure to install:
    cd /tmp
    tar -xvzf unixODBC-2.3.4.tar.gz
    cd /tmp/unixODBC-2.3.4
    ./configure
    make
    sudo make install
  2. If you want to communicate with MarkLogic over SSL, you can install the openssl libraries as follows:
    yum install openssl-libs

    You can optionally install the GUI tools for unixODBC:

    yum install unixODBC-gui-qt 
  3. Install the ODBC driver package (named mlsqlodbc-1.4-20170317.x86_64.rpm in this example):
    rpm -i mlsqlodbc-1.4-20170317.x86_64.rpm
  4. Call odbcinst to write the DSN to the current user's .odbc.ini file:
    odbcinst -i -s -f /opt/MarkLogic/templates/mlsql.template
  5. The name of the ODBC driver is MarkLogicSQL. Use isql to connect to MarkLogicSQL to confirm that the ODBC driver was correctly installed (the MarkLogic username and password in this example is admin/admin):
    isql -v MarkLogicSQL admin admin
  6. If you don't want to have to enter your username and password each time you run isql, you can edit the ~/.odbc.ini file to add your MarkLogic username and password:
    [MarkLogicSQL]
    Description      = MarkLogicSQL
    Driver           = MarkLogicSQL
    Trace            = No
    TraceFile        =
    Database         = marklogic
    Servername       = localhost
    Username         = admin
    Password         = admin
    Port             = 5432
    Protocol         = 7.4
    ReadOnly         = No
    SSLMode          = disable
    UseServerSidePrepare  = Yes
    ShowSystemTables      = No
    ConnSettings          =
  7. Test using isql without a username and password:
    isql -v MarkLogicSQL

    If you encounter problems, make sure that the settings in the configuration files point to the right locations for your environment. Calling odbcinst -j will return the list of the configuration files for the ODBC driver.

« Previous chapter
Next chapter »
Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy