Skip to main content

MarkLogic Server on Kubernetes

Perform a connection test
  1. Follow the MarkLogic Knowledge article for setting up ODBC on a Linux environment:

    odbc.ini

    [MarkLogicSQL]
    Description=MarkLogicSQL
    Driver=MarkLogicSQL
    Trace=No
    TraceFile=
    Database=ml-odbc
    Servername=ml-odbc.ml-kube.com
    Username=<username>
    Password=<password>
    Port=31032
    Protocol=7.4
    ReadOnly=No
    SSLMode=disable
    UseServerSidePrepare =Yes
    ShowSystemTables=No
    ConnSettings=
  2. Connect to the ODBC.

  3. Test a query:

    ODBC test

    [azureuser@marklogic1083 ~]$ isql -v MarkLogicSQL 
    +---------------------------------------+
    | Connected!                            |
    |                                       |
    | sql-statement                         |
    | help [tablename]                      |
    | quit                                  |
    |                                       |
    +---------------------------------------+
    SQL> SELECT employees.FirstName, employees.LastName, SUM(expenses.Amount) 
    AS ExpensesPerEmployee FROM employees JOIN expenses ON employees.EmployeeID = 
    expenses.EmployeeID GROUP BY employees.FirstName, employees.LastName ORDER BY 
    ExpensesPerEmployee;
    +---------------------------------------------------------------------------------
    FIRST NAME                : LAST NAME                : EXPENSE PER EMPLOYEE
    ----------------------------------------------------------------------------------
    Jane                      : Lead                     : 155.22
    John                      : Widget                   : 190.97
    Debbie                    : Goodall                  : 259.84
    Steve                     : Manager                  : 282.95
    
    SQLRowCount returns -1
    4 rows fetched
    SQL>