macOS DSN Configuration
This section shows how to set up ODBC connectivity and configure DSNs on macOS.
Minimum macOS Version
The CData ODBC Driver for DB2 driver requires macOS Sierra (10.12) or above.
Licensing the Driver
In a terminal, run the following commands to license the driver. To activate a trial, omit the <key> input.
cd "/Applications/CData ODBC Driver for DB2/bin"
sudo ./install-license.sh <key>
You'll be prompted for a name and password. These refer to your name and your machine's password.
Connecting to DB2
Set the following properties to connect:- Server: The name of the server running DB2.
- Port: The port the DB2 server is listening on.
- Database: The name of the DB2 database.
Authenticating to DB2
The driver supports authenticating directly to the DB2 with user credentials as well as authenticating using the API key of an application integrated with DB2, such as Watson Query.
DB2 User Credentials
Set AuthScheme to USRIDPWD. Provide the following credentials:
- User: The username of a user with access to the database.
- Password: The password of a user with access to the database.
IAM
The driver supports authenticating to the DB2 server using the API key of an application that connects to it, such as Watson Query.
Set AuthScheme to IBMIAMAuth. Provide the following credentials:
- User: The IBMid or service ID tied to a user of the DB2 server.
- Password: The API key associated with the application that requires access to the DB2 database.
Uninstalling the Driver
The easiest way to uninstall the driver is to open a terminal and run the included uninstall.sh script, located in the installation directory. For example:
cd "/Applications/CData ODBC Driver for DB2" sudo ./uninstall.sh
Note: The script needs to be run from the installation directory.