www.openlinksw.com
docs.openlinksw.com

Book Home

Contents
Preface

ODBC Drivers

Windows Data Source Configuration
Unix Data Source Configuration
Mac OS X Data Source Configuration
Creating ODBC Data Sources MySQL Oracle 8 (or 9) PostgreSQL ODBC-JDBC Lite Bridges for Java Microsoft or Sybase SQL Server (TDS) Virtuoso Testing the ODBC Data Source
ODBC to Jet Data Type Mapping
New Features

5.3. Mac OS X Data Source Configuration

5.3.1. Creating ODBC Data Sources

OpenLink Software's components are fully supported on Mac OS X version 10.1.x ("Puma") and 10.2.x ("Jaguar"). In most ways, this looks the same to users. However, there are some significant differences to be aware of between these Operating Systems.

As shipped from Apple, Mac OS X did not include any ODBC support until Jaguar. The ODBC Driver Manager, Data Source Administrator, etc. - all had to be delivered with the Drivers.

When Apple introduced Darwin, an Open-Source project meant to form the kernel of Mac OS X, OpenLink determined to port its open-source iODBC Driver Manager to the new platform. With the introduction of the Preview Release of Mac OS X, the traditional set of dynamic libraries was broadened to include a system of Frameworks to encourage the development of fully ODBC compliant, native Mac OS X drivers and client applications.

That set of Frameworks, along with the OpenLink ODBC Administrator (then known as the iODBC Administrator), has been included with all OpenLink installations for Mac OS X since 10.0. The OpenLink ODBC Administrator supports all core features of ODBC, and presents driver-specific DSN configuration panels, as defined by the Driver developer, through the use of Setup Libraries.

Jaguar's release marked Apple's recognition that Data Access was an important part of an Enterprise Operating System. Already part of the standard distribution of Darwin, the basic iODBC dynamic libraries are now a part of the standard installation of Mac OS X 10.2. Apple also included their own version of an ODBC Administrator, as a proof-of-concept. Apple's Administrator permits Driver Registration, Tracing, and all other core features of ODBC; however, among other hard edges, all DSN configuration must be done by manually entering Keyword-Value pairs. Further, the user must know what Keywords to use, along with their acceptable Values.

5.3.1.1. Mac OS X ODBC Data Sources

The OpenLink ODBC Administrator for Mac OS X currently supports creation of User and System Data Source Names (DSNs). Support for File DSNs will be delivered in a future release.

A User DSN is only available to the user who creates the data source. Its parameters are stored in that user's settings file ~/Library/Preferences/ODBC.preference .

A System DSN is available to the whole system so that any user, including the system itself, will be able to use that data source. Its parameters are stored in the System settings file /Library/Preferences/ODBC.preference.

A File DSN is a special 'mobile' data source that stores the data source information associated with the Driver in a file, which may then be copied and shared among different users and ODBC application host machines.

The steps for creating a DSN are as follows:-

  1. Launch the OpenLink ODBC Administrator, found in the /Applications/Utilities/ directory.

    OpenLink ODBC Administrator icon

    Figure: 5.3.1.1.1.1. OpenLink ODBC Administrator icon
  2. Click the tab for the kind of DSN you wish to create -- User or System. Press the Add button to begin creating a new Data source.

    iODBC Data Source Administrator

    Figure: 5.3.1.1.1.2. iODBC Data Source Administrator
  3. Select the Driver to be used to create your ODBC DSN. In this example the "OpenLink SQL Server Lite Driver" is highlighted. Then click the Finish button.

    Choose an ODBC Driver

    Figure: 5.3.1.1.1.3. Choose an ODBC Driver
  4. You will now be presented with the ODBC Data Source Configuration dialog for the driver selected. Generally, there will be several tabs, most of which will need some information.


5.3.1.2. Common Data Source Tab

First is the Data Source Tab. The parameters on this tab are similar (not identical) for all OpenLink Single-Tier drivers. This tab always holds the Name and Description parameters. Generally, it will also include parameters describing the target database host - Hostname, Port, and, if the Driver handles more than one DBMS, Server Type. Specific information will be presented for each Driver, below.


5.3.1.3. Common Connection Tab

The second and possibly third tab hold fields specific to the database communications layer. The name(s) of the tab(s), the fields, and their data, are specific to each database. The database specific settings are detailed further in the text. The following list will allow you to quick jump to the relevent section (if reading on-line):

Common fields are:


5.3.1.4. Common Preferences Tab

The Preferences tab parameters are also generally common across all OpenLink Single-Tier Drivers for ODBC. All Preferences parameters are defined here, though they may not all appear on your Driver.



5.3.2. MySQL

5.3.2.1. Data Source tab

MySQL Data Source tab

Figure: 5.3.2.1.1. MySQL Data Source tab

5.3.2.2. Connection tab

MySQL Connection tab

Figure: 5.3.2.2.1. MySQL Connection tab

5.3.2.3. Preferences tab

MySQL Preferences tab

Figure: 5.3.2.3.1. MySQL Preferences tab


5.3.3. Oracle 8 (or 9)

5.3.3.1. Data Source tab

Oracle Data Source tab

Figure: 5.3.3.1.1. Oracle Data Source tab
Choose Oracle Directory dialog

Figure: 5.3.3.1.2. Choose Oracle Directory dialog
Net Service Name Editor tab

Figure: 5.3.3.1.3. Net Service Name Editor tab

5.3.3.2. Connection tab

Oracle Connection tab

Figure: 5.3.3.2.1. Oracle Connection tab

5.3.3.3. Preferences tab

Oracle Preferences tab

Figure: 5.3.3.3.1. Oracle Preferences tab


5.3.4. PostgreSQL

5.3.4.1. Data Source tab

PostgreSQL Data Source tab

Figure: 5.3.4.1.1. PostgreSQL Data Source tab

5.3.4.2. Connection tab

PostgreSQL Connection tab

Figure: 5.3.4.2.1. PostgreSQL Connection tab

5.3.4.3. Preferences tab

PostgreSQL Preferences tab

Figure: 5.3.4.3.1. PostgreSQL Preferences tab


5.3.5. ODBC-JDBC Lite Bridges for Java

5.3.5.1. Data Source tab

ODBC-JDBC Lite Bridge Data Source tab

Figure: 5.3.5.1.1. ODBC-JDBC Lite Bridge Data Source tab

5.3.5.2. Connection tab

ODBC-JDBC Lite Bridge Connection tab

Figure: 5.3.5.2.1. ODBC-JDBC Lite Bridge Connection tab

5.3.5.3. Options tab

ODBC-JDBC Lite Bridge Options tab

Figure: 5.3.5.3.1. ODBC-JDBC Lite Bridge Options tab

5.3.5.4. Preferences tab

ODBC-JDBC Lite Bridge Preferences tab

Figure: 5.3.5.4.1. ODBC-JDBC Lite Bridge Preferences tab


5.3.6. Microsoft or Sybase SQL Server (TDS)

5.3.6.1. Installation

The OpenLink ODBC Driver for Microsoft SQL Server for Mac OS X is distributed in a single disk image (.dmg) file, which contains a Macintosh Installer mpkg.

Double-click the mpkg to start the installation process.


Figure: 5.3.6.1.1.

You will encounter a warning message that will ask you if you are sure that you want to install the software click to continue.


Figure: 5.3.6.1.1.

The installer will display a "Welcome" message. Click "Continue."


Figure: 5.3.6.1.1.

The next screen will display the Read-Me file, including any last-minute updates to these documents. Please read carefully and click "Continue" when finished.


Figure: 5.3.6.1.1.

The next screen will display the License Agreement for the OpenLink Single-Tier Driver for ODBC. Please read and click "Continue".


Figure: 5.3.6.1.1.

You will be prompted to "Agree" to continue the installation or "Disagree" to abort.


Figure: 5.3.6.1.1.

You will be asked to select a Destination Volume. Generally, this should be your Mac OS X boot volume. Click on the desired disk icon and then click "Continue".


Figure: 5.3.6.1.1.

You may now choose the Easy Install, or if you are an experienced user, you may Customize which components are installed. OpenLink generally recommends the Easy Install.

If you have installed OpenLink or iODBC components in the past, click "Upgrade" to continue; otherwise, click "Install".


Figure: 5.3.6.1.1.

Figure: 5.3.6.1.2.

You must have an Administration username and password to install the OpenLink driver. Enter your Mac OS X Username and Password.


Figure: 5.3.6.1.1.

You will be shown a graphical progress bar as the Installation progresses, followed by System Optimization.

You will need to locate the license file.


Figure: 5.3.6.1.1.


Figure: 5.3.6.1.1.

When the process is complete, you will be told that the software was successfully installed. Click "Close" and your new database driver for ODBC is ready for use.


Figure: 5.3.6.1.1.


5.3.6.2. Configuration

To configure an ODBC DSN, run theOpenLink iODBC Administrator located in the /Applications/iODBC folder:


Figure: 5.3.6.2.1.

Click the System DSN tab:


Figure: 5.3.6.2.1.

Click the Add button. Then, select theOpenLink SQL Server Lite Driver from the list of available drivers:


Figure: 5.3.6.2.1.

Click Finish.

The Data Source tab prompts for a DSN name, description, and information that identifies the target SQL Server DBMS.


Figure: 5.3.6.2.1.

Use the "Advanced" button to manually configure a connection if the SQL Server instance could not be dynamically located, as detailed below.


Figure: 5.3.6.2.1.

Click OK to continue.

The Connection Tab takes a combination of required and optional parameters required to make a connection to the target database:


Figure: 5.3.6.2.1.

Click Continue.

The Options tab enables you to set some standard and SQL Server-specific parameters.


Figure: 5.3.6.2.1.

Click Continue to view additional preferences that can be set for the connection.


Figure: 5.3.6.2.1.

Click the Finish button to save your new Data Source Name.



5.3.7. Virtuoso

5.3.7.1. DSN tab

Virtuoso DSN tab

Figure: 5.3.7.1.1. Virtuoso DSN tab

5.3.7.2. Identity tab

Virtuoso Identity tab

Figure: 5.3.7.2.1. Virtuoso Identity tab

5.3.7.3. Security tab

Virtuoso Security tab

Figure: 5.3.7.3.1. Virtuoso Security tab


5.3.8. Testing the ODBC Data Source

Once an ODBC Data Source has been configured, you can test it by highlighting the desired DSN and clicking the Test button, on the User DSN or System DSN tabs of the OpenLink ODBC Administrator. This will present you with the following multi-tab dialog box, with the opportunity to override any of the DSN parameters on the fly.

OpenLink ODBC Administrator

Figure: 5.3.8.1. OpenLink ODBC Administrator
SQL Server Single-Tier DSN Connection Test, Identity tab

Figure: 5.3.8.2. SQL Server Single-Tier DSN Connection Test, Identity tab
SQL Server Single-Tier DSN Connection Test, Connection tab

Figure: 5.3.8.3. SQL Server Single-Tier DSN Connection Test, Connection tab
SQL Server Single-Tier DSN Connection Test, Preferences tab

Figure: 5.3.8.4. SQL Server Single-Tier DSN Connection Test, Preferences tab
SQL Server Single-Tier DSN Connection Test, About tab

Figure: 5.3.8.5. SQL Server Single-Tier DSN Connection Test, About tab

When all parameters are as desired, click Connect, and a successful test will bring the following message:

DSN Connection Test Results

Figure: 5.3.8.6. DSN Connection Test Results

Unsuccessful test connections may present any of a number of error messages. To resolve those errors, please refer to the troubleshooting section of this manual.

For more thorough testing, you can use odbctest, a sample application installed along with the OpenLink Lite Driver. odbctest is a simple command-line, ODBC compliant, Interactive SQL client.

It may be accessed through the Terminal application, by issuing the command /Library/iodbc/bin/odbctest

At the SQL command prompt enter "?" for a list of ODBC DSNs on your machine, or enter a valid ODBC Connect String (e.g., with the DSN created above, named "DEMO", you would enter: DSN=DEMO;UID=<Username>;PWD=<Password>).

From here, any valid SQL Statement may be executed. Generally, you will need to know a valid table name within the database to be able to retrieve information from it. Within odbctest, the command 'tables' will return a list of all tables accessible through your active connection.

If the query executes successfully you will see a table of the data returned by the query; if unsuccessful, you will see the entire error message returned from the backend DBMS.