You can use an ODBC connection to connect to ODBC-compliant databases including Informix, Microsoft Access, dBase, DB2, Teradata, Netezza, Greenplum, Microsoft Excel, and Microsoft Azure SQL Data Warehouse.
Before you create an ODBC connection to read from or write to any ODBC-compliant database, be sure to complete the prerequisites.
Configure the ODBC driver
To use an ODBC connection, you'll need to install the ODBC client and ODBC driver on your machine.
•ODBC client is a front-end application installed in your machine. You use the ODBC client application to connect to databases.
•ODBC driver is a back-end application installed on a computer that is used to store data for access by several users. An ODBC driver processes ODBC function calls, submits SQL requests to a specific data source, and returns results to the client application.
An ODBC client can access any database for which there is an ODBC driver.
Configure the DB2 ODBC driver on Linux
Before you establish an ODBC connection to connect to DB2 on Linux, configure the ODBC driver.
1To get the DB2 ODBC 64-bit driver, contact Informatica Global Customer Support.
2Install the DB2 ODBC driver on the Secure Agent machine.
3Configure the odbc.ini file properties in the following format:
[ODBC_DB2] Driver=/root/ODBC_Drivers/DWdb228.so Description=<Description of the data source> Database=<Name of the database> IpAddress=<IP address for the DB2 server> LogonID=<Login id for the DB2 database> Password=<Password for the DB2 database> TcpPort=50000
4Specify the following properties in the odbc.ini file:
Property
Description
Driver
Location of the DB2 ODBC driver file.
Description
Description of the data source.
Database
Name of the DB2 database.
IpAddress
IP address of the DB2 server.
LogonID
Login id for the DB2 database.
Password
Password for the DB2 database.
TcpPort
Port number of the DB2 server.
5From the command line, run the following command to export the odbc.ini file:
Export ODBCINI=/<odbc.ini file path>/odbc.ini
6Restart the Secure Agent.
Configure the DB2 ODBC driver on Windows
Before you establish an ODBC connection to connect to DB2 on Windows, configure the ODBC driver.
1To get the DB2 ODBC 64-bit driver, contact Informatica Global Customer Support.
2Install the DB2 ODBC driver on the Secure Agent machine.
3Open the folder in which ODBC data source file is installed.
4Run the odbcad32.exe file.
The ODBC Data Source Administrator dialog box appears.
5Click System DSN.
6Select the odbc_db2 system data source, and click Add.
The Create New Data Source dialog box appears.
7Select DataDirect 8.0 DB2 Wire Protocol.
8Click Finish.
The ODBC DB2 Wire Protocol Driver Setup dialog box appears.
9Specify the following connection properties:
Property
Description
Data Source Name
Name of the data source.
Description
Description of the data source.
Ip Address
IP address for the DB2 server.
Tcp Port
Port number of the DB2 server.
Location Name
Not applicable.
Collection
Not applicable.
Database Name
Name of the DB2 database.
10Click Test Connect to test the connection that you configured.
The Logon to DB2 Wire Protocol dialog box appears.
11Specify the credentials of the DB2 database.
12Click OK.
Configure the Microsoft Azure ODBC driver
Before you establish an ODBC connection to connect to Microsoft Azure SQL Data Warehouse, configure the ODBC driver.
1Download the Microsoft ODBC drivers from the Microsoft Azure website, and then install the drivers for Windows and Linux operating systems.
2On Linux, you need to set the ODBCINI and LD_LIBRARY_PATH environmental variables for the driver and create the DSN entries. Add the path of the odbc.ini file to the ODBCINI environment variable.
5Restart the Secure Agent after you configure the environment variables.
Configure the SAP IQ ODBC driver on Linux
Before you establish an ODBC connection to connect to SAP IQ on Linux, configure the ODBC driver.
1To get the SAP IQ ODBC 64-bit driver, contact Informatica Global Customer Support.
2Install the SAP IQ ODBC driver on the Secure Agent machine.
3Configure the odbc.ini file properties in the following format:
[SAPIQ_ODBC] Driver=<SAP IQ location>/lib64/DWsyiq28.so DriverUnicodeType=1 UserID=<Username for the SAP IQ database> Password=<Password for the SAP IQ database> CommLinks=tcpip(host=hostname;port=2638) ServerName=<Server name of the SAP IQ database> DatabaseName=<Database name> AutoStop=no Charset=UTF-8 Language=EN
4Run the following command to export the odbc.ini file:
Export ODBCINI=/<odbc.ini file path>/odbc.ini
5Restart the Secure Agent.
Configure the SAP IQ ODBC driver on Windows
Before you establish an ODBC connection to connect to SAP IQ on Windows, configure the ODBC driver.
1To get the SAP IQ ODBC 64-bit driver, contact Informatica Global Customer Support.
2Install the SAP IQ ODBC driver on the Secure Agent machine.
3Open the folder in which ODBC data source file is installed.
4Run the odbcad32.exe file.
The ODBC Data Source Administrator dialog box appears.
5Click System DSN.
6Select the odbc_sybase system data source, and click Add.
The Create New Data Source dialog box appears.
7Select DataDirect 8.0 Sybase Wire Protocol.
8Click Finish.
The ODBC Configuration for SQL Anywhere dialog box appears.
9Specify the following connection properties:
Property
Description
Authentication
The authentication mode to access the database.
User ID
User name to access the SAP IQ database.
Password
Password to access the SAP IQ database.
Encode password
Not applicable.
Action
The method to connect the SAP IQ database.
Host
Host name of the SAP IQ server.
Port
Port number of the SAP IQ server.
Server Name
Domain name of the SAP IQ account.
Database Name
Name of the SAP IQ database.
10Click OK.
Configure the Teradata ODBC driver on Linux
Before you establish an ODBC connection to connect to Teradata on Linux, configure the ODBC driver.
1Add the path of the odbc.ini file to the ODBCINI environment variable. For example,
4Restart the Secure Agent after you configure the environment variables.
Prepare for Kerberos authentication
You can use Kerberos authentication to connect to DB2 or SAP Sybase ASE databases by placing the required configuration files on the Secure Agent machine. You can also use Kerberos authentication to connect to SSL-enabled DB2 or SAP Sybase ASE databases.
When you configure Kerberos authentication to connect to DB2 or SAP Sybase ASE, consider the following guidelines:
•You can't use the Hosted Agent or serverless runtime environment.
•Ensure that the Secure Agent and database server that you use are registered in the KDC server.
•You can't add more than one KDC to a krb5.conf file.
•You can't generate a credential cache file for more than one Kerberos principal user.
Configure Kerberos authentication
Before you use Kerberos authentication to connect to DB2 or SAP Sybase ASE on Linux or Windows, the organization administrator needs to perform the prerequisite tasks.
1To configure the krb5.conf file, perform the following tasks:
aCreate a krb5.conf file on the Secure Agent machine.
bAdd the details of the Key Distribution Center (KDC) and admin server to the krb5.conf file in the following format:
[realms] <REALM NAME> = { kdc = <Location where KDC is installed> admin_server = <Location where KDC is installed> } [domain_realm] <domain name or host name> = <Domain name or host name of Kerberos> <domain name or host name> = <Domain name or host name of Kerberos>
2Set the following environment variables on the Secure Agent machine.
4To generate the credential cache file on the Secure Agent machine and use Kerberos authentication to connect to the selected ODBC subtype, perform the following tasks:
aOn the Secure Agent machine, run the following command and specify the user name and realm name of the selected ODBC subtype:
Kinit <user name>@<realm_name>
bWhen prompted, enter the password for the Kerberos principal user.
Set environment variables
To use Kerberos authentication to connect to DB2 or SAP Sybase ASE, you need to set the required environment variables on the Secure Agent machine.
•setenv KRB5CCNAME <Absolute path and file name of the credentials cache file>
•setenv KRB5_CONFIG <Absolute path of the Kerberos configuration file>\krb5.conf
After you set the environmental variables, you need to restart the Secure Agent.
Alternatively, you can add the environment variables when you create an ODBC connection with the subtype as DB2 or SAP Sybase ASE.
Enter the KRB5_CONFIG and KRB5CCNAME details in the Kerberos Connection Properties field in the ODBC connection.
For example, add the properties in the following format:
KRB5_CONFIG=<Absolute path of the Kerberos configuration file>\krb5.conf;KRB5CCNAME=<Absolute path of the credential cache file>/<File name>
Note: Ensure that you separate each key-value pair with a semicolon.