Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.0 » SQL Anywhere Server - Database Administration » Starting and Connecting to Your Database » Connecting to a database » Working with ODBC data sources


Creating an ODBC data source on Mac OS X

Before you can create an ODBC data source on Mac OS X, you must first add the SQL Anywhere ODBC driver.


Storing user IDs, passwords (encrypted or unencrypted), and/or database keys in a data source is not secure. It is recommended that you do not store this information in a data source if the database contains sensitive data.

To add the SQL Anywhere ODBC driver

  1. Launch the ODBC Administrator from /Applications/Utilities.

  2. Select the Drivers tab.

  3. Click Add.

  4. In the Description field, type SQL Anywhere 11.

  5. Click Choose and select the SQL Anywhere ODBC driver in both the Driver File Name and Setup File Name fields. By default, it is located in /Applications/SQLAnywhere11/System/lib/dbodbc11_r.bundle.

    The _r in the bundle name indicates that it is the threaded version of the driver. There is also an unthreaded version (dbodbc11.bundle) for use with unthreaded applications.

  6. Click OK.

Once you have added the SQL Anywhere ODBC driver, you can create an ODBC data source that is used to connect to your database.

Creating an ODBC data source

To create an ODBC data source

  1. Launch the ODBC Administrator from /Applications/Utilities.

  2. In the ODBC Administrator, click the User DSN tab, and then click Add.

  3. Choose the SQL Anywhere 11 driver from the list of available drivers. Click OK.

  4. Type Demo11 in the Data Source Name field and add the following connection parameters, as shown below. The connection parameters and values are case insensitive.

    Keyword Value
    PWD sql
    START dbeng11
    DBF /Applications/SQLAnywhere11/System/demo.db
    ThreadManager ON
    Driver SQL Anywhere 11

    For more information about connection parameters, see Connection parameters and network protocol options.

  5. Click OK.

  6. Click Apply.

  7. Press Command+Q to exit the ODBC Administrator.

Alternatively, you can add the information with a text editor. The ODBC configuration files are located in /Library/ODBC within your Home directory. There is an odbcinst.ini file for driver information and an odbc.ini file for data source information.

You can also use the Data Source utility (dbdsn) to create ODBC data sources on Mac OS X. See Data Source utility (dbdsn).