This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Creating an ODBC DSN for macOS clients

You can use the Vertica ODBC Driver to set up an ODBC DSN.

You can use the Vertica ODBC Driver to set up an ODBC DSN. This procedure assumes that the driver is already installed, as described in Installing the ODBC client driver.

Setting up a DSN

  1. Using your web browser, download and install the Apple ODBC Administrator Tool.

  2. Locate and open the ODBC Administrator Tool after installation:

    1. Navigate to Finder > Applications > Utilities.

    2. Open the ODBC Administrator Tool.

  3. Click the Drivers tab, and verify that the Vertica driver is installed.

  4. Specify if you want all users on your client system to be able to access the DSN for the Vertica database:

    • If you want all users to have access, then click the System DSN tab.

    • Otherwise, click the User DSN tab to create a DSN that is only usable by your Macintosh user account.

  5. Click Add... to create a new DSN to connect to the Vertica database.

  6. Scroll through the list of drivers in the Choose A Driver dialog box to locate the Vertica driver. Select the driver, and then click OK. A dialog box opens that requests DSN parameter information.

  7. In the dialog box, enter the Data Source Name (DSN) and an optional Description. To do so, click Add to insert keywords (parameters) and values that define the settings needed to connect to your database, including database name, server host, database user name (such as dbadamin), database password, and port. Then, click OK.

  8. In the ODBC Administrator dialog box, click Apply.

    See ODBC DSN connection properties for a complete list of parameters including those specific to Vertica.

After configuring the ODBC Administrator Tool, you may need to configure additional driver settings before you can use your DSN, depending on your environment. See Additional ODBC Driver Configuration Settings for details.

1 - Testing an ODBC DSN using iodbctest

The standard iODBC Driver Manager on OS X includes a utility named iodbctest that lets you test a DSN to verify that it is correctly configured.

The standard iODBC Driver Manager on OS X includes a utility named iodbctest that lets you test a DSN to verify that it is correctly configured. You pass this command a connection string in the same format that you would use to open an ODBC database connection. After configuring your DSN connection, you can run a query to verify that the connection works.

For example:


# iodbctest "DSN=VerticaDSN;UID=dbadmin;PWD=password"
iODBC Demonstration program
This program shows an interactive SQL processor
Driver Manager: 03.52.0607.1008
Driver: 07.01.0200 (verticaodbcw.so)
SQL> SELECT table_name FROM tables;
table_name
--------------------------------------------------------------------------------------------------------------------------------
customer_dimension
product_dimension
promotion_dimension
date_dimension
vendor_dimension
employee_dimension
shipping_dimension
warehouse_dimension
inventory_fact
store_dimension
store_sales_fact
store_orders_fact
online_page_dimension
call_center_dimension
online_sales_fact
numbers
result set 1 returned 16 rows.