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

SQL Anywhere 12.0.0 » SQL Anywhere Server - Database Administration » Starting and connecting to your database » SQL Anywhere database connections » Creating ODBC data sources


Create an ODBC data source on Mac OS X

The SQL Anywhere ODBC driver must be added before you create the ODBC data source.


Storing user IDs, encrypted or unencrypted passwords, and database keys in a data source is not recommended.

 To add the SQL Anywhere ODBC driver
  1. If necessary, go to [external link] to download the ODBC Administrator tool.

  2. Launch the ODBC Data Source Administrator from /Applications/Utilities.

  3. Select the Drivers tab.

  4. Click Add.

  5. In the Description field, type SQL Anywhere 12.

  6. 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/SQLAnywhere12/System/lib32/dbodbc12_r.bundle.

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

  7. Click OK.

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).

 To create an ODBC data source
  1. Launch the ODBC Data Source Administrator from /Applications/Utilities.

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

  3. In the Name list, click SQL Anywhere 12.

  4. Click OK.

  5. In the Data Source Name field, type Demo12.

  6. Add the following connection parameters. The connection parameters and values are case insensitive.

    Keyword Value
    UserID DBA
    Password sql
    StartLine dbeng12
    DatabaseFile /Applications/SQLAnywhere12/System/demo.db
    ThreadManager ON
    Driver SQL Anywhere 12

    For more information about connection parameters, see Connection parameters.

  7. Click OK.

  8. Click Apply.

  9. Press Command+Q to exit the ODBC Data Source Administrator.

 See also