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.
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:-
Launch the OpenLink ODBC Administrator, found in the /Applications/Utilities/ directory.
|
|
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.
|
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.
|
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.
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.
The name of the ODBC DSN. This is how you will generally refer to this data source, from within ODBC client applications.
Any extra information you wish to note about the DSN you are creating. This is generally not displayed by ODBC client applications, though it is available to them.
This is the fully qualified hostname, or IP address, of the machine hosting the DBMS you wish to access, e.g., dbms-server.example.com, or 192.168.155.123. Any hostname which will be resolved by your local DNS is acceptable.
Select the version and/or vendor of the DBMS engine you will be accessing, from the list presented. If your exact version is not listed, try the closest version available. If that fails, please contact OpenLink Technical Support.
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:
This specifies the default username to be used when attempting to make a connection. You may override this at run time.
This attribute specifies the number of records to be returned in a chunk. Values may range from 1 to 999. Setting this value too high or too low can significantly impact performance. Generally, best results are achieved with values between 50 and 150.
Suppress the ODBC "Username" and "Password" login dialog box when interacting with your ODBC DSN from within an ODBC compliant application. Please note — this requires that these values be correctly specified within the DSN, which can open a security hole.
Specify whether the connection is to be "Read-only". Make sure the checkbox is unchecked to request a "Read/Write" connection.
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.
Lets you specify a file containing SQL statements that will be run against the database upon connection, automatically.
Allows you to limit the maximum number of rows to return from a query. The default value of 0 means no limit.
Extra support or altered functionality for better compatibility with Microsoft Jet using applications such as Microsoft Access. This generally doesn't apply to Macintosh applications; however, we retain the option.
Change the default commit behaviour of the OpenLink Lite Driver. The default mode is AutoCommit mode (box unchecked).
Disable any limitation enforced by the cursor library. The limitation is enforced by default, to prevent the Driver claiming all available memory when a result set is very large. The limit is normally never reached.
Enables or disables the row version cache used with dynamic cursors.
When dynamic cursor sensitivity is set high, the Cursor Library calculates checksums for each row in the current rowset and compares these with the checksums (if any) already stored in the row version cache for the same rows when fetched previously. If the checksums differ for a row, the row has been updated since it was last fetched and the row status flag is set to SQL_ROW_UPDATED. The row version cache is then updated with the latest checksums for the rowset.
From the user's point of view, the only visible difference between the two sensitivity settings is that a row status flag can never be set to SQL_ROW_UPDATED when the cursor sensitivity is low. (The row status is instead displayed as SQL_ROW_SUCCESS.) In all other respects, performance aside, the two settings are the same - deleted rows don't appear in the rowset, updates to the row since the row was last fetched are reflected in the row data, and inserted rows appear in the rowset if their keys fall within the span of the rowset.
If your application does not need to detect the row status SQL_ROW_UPDATED, you should leave the 'High Cursor Sensitivity' checkbox unchecked, as performance is improved. The calculation and comparison of checksums for each row fetched carries an overhead.
For this option to take effect, the table 'oplrvc' must already have been created, using the appropriate script for the target database.
Checked by default, this parameter determines whether long-data fields are retrieved after all other fields in a query, or in whatever order they appear in the query. Performance is generally best with this enabled; hence the default setting.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
You will encounter a warning message that will ask you if you are sure that you want to install the software click to continue.
|
The installer will display a "Welcome" message. Click "Continue."
|
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.
|
The next screen will display the License Agreement for the OpenLink Single-Tier Driver for ODBC. Please read and click "Continue".
|
You will be prompted to "Agree" to continue the installation or "Disagree" to abort.
|
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".
|
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".
|
|
You must have an Administration username and password to install the OpenLink driver. Enter your Mac OS X Username and Password.
|
You will be shown a graphical progress bar as the Installation progresses, followed by System Optimization.
You will need to locate the license file.
|
|
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.
|
To configure an ODBC DSN, run theOpenLink iODBC Administrator located in the /Applications/iODBC folder:
|
Click the System DSN tab:
|
Click the Add button. Then, select theOpenLink SQL Server Lite Driver from the list of available drivers:
|
Click Finish.
The Data Source tab prompts for a DSN name, description, and information that identifies the target SQL Server DBMS.
|
Use the "Advanced" button to manually configure a connection if the SQL Server instance could not be dynamically located, as detailed below.
|
Click OK to continue.
The Connection Tab takes a combination of required and optional parameters required to make a connection to the target database:
|
Click Continue.
The Options tab enables you to set some standard and SQL Server-specific parameters.
|
Click Continue to view additional preferences that can be set for the connection.
|
Click the Finish button to save your new Data Source Name.
|
|
When selected the ???? will ??? for daylight saving changes. This is so that ???.
If selected the pick options for the Database name and Character set are accessed from the datasource.
This field is enabled if the above field is checked. Password is used to make a connection to the datasource to obtain the choices for subsequent fields.
The name of the Virtuoso database that is to be accessed by the data source. This is a dynamically generated menu, showing only those databases actually available on the data source when the DSN is configured. If you need to manually specify this information, you may edit the appropriate ODBC.preference text file. Please contact OpenLink Technical Support, for assistance.
The name of an installed character set on the Virtuoso server. The default is the setting active on the Virtuoso Server. This is a dynamically generated menu, showing only those databases actually available on the data source when the DSN is configured. If you need to manually specify this information, you may edit the appropriate ODBC.preference text file. Please contact OpenLink Technical Support, for assistance.
|
Enable encryption.
Name of certificate file to be used.
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.
|
|
|
|
|
When all parameters are as desired, click Connect, and a successful test will bring the following message:
|
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.
|
Previous
Unix Data Source Configuration |
Chapter Contents |
Next
ODBC to Jet Data Type Mapping |