Configuring the ODBC Driver on Linux
You must configure the Informatica MongoDB ODBC driver with details of the MongoDB database and the ODBC driver manager before you can run the MongoDB tasks or mappings. Configure the ODBC driver on a 64-bit Linux machine and add the DSN entry for the MongoDB data source in the odbc.ini file.
If the Secure Agent runs on a RHEL 6.x version, use the mongodb_Linux64_6.0.zip file, and if the Secure Agent runs on a RHEL 7.x version, use the mongodb_Linux64_7.0.zip file.
1. Place the mongodb_Linux64_<X.0>.zip file in the following location on the Linux machine: ~/temp/ directory.
2. Unzip the following file: ~/temp/mongodb_Linux64_<x.o>.zip.
The following directory appears: ~/temp/linux
3. Copy ~/temp/linux/mongodb to the following directory: <Secure Agent installation directory>/drivers/odbc
4. Update the following paths in the <Secure Agent installation directory>/drivers/odbc/mongodb/lib/informatica.mongodbodbc.ini configuration file:
- - ErrorMessagesPath=<Secure Agent installation directory>/drivers/odbc/mongodb/ErrorMessages
- - LogPath=<Secure Agent installation directory>/drivers/odbc/mongodb/log
5. Provide the execute permissions to the files in the following directory: chmod +x -R <Secure Agent installation directory>/drivers/odbc/mongodb/
6. Add the DSN entry for the MongoDB data source in the odbc.ini file.
The following section shows a sample entry in the odbc.ini file:
[Sample_Mongodb_ODBC_DSN]
Description=Informatica MongoDB ODBC Driver (64-bit) DSN
Driver=<Secure Agent installation directory>/drivers/odbc/mongodb/lib/libmongodbodbc_sb64.so
Server=HOST_NAME
Port=27017
AuthMechanism=SCRAM-SHA-1
Database=TEST
UID=USER_NAME
PWD=PASSWORD
AuthSource=admin
7. Set the ODBCINI environment variable on the Linux machine to the location of the odbc.ini file in which you created the data source name.
To set the ODBCINI environment variable, you must export the ODBCINI variable.
For example, run the following script from the Linux machine: export ODBCINI=<Secure Agent installation directory>/odbc.ini
8. Set LD_LIBRARY_PATH on the Linux machine to the following location: <Secure Agent installation location>/drivers/odbc/mongodb/lib/
To set LD_LIBRARY_PATH, you must export the LD_LIBRARY_PATH variable.
For example, run the following script from the Linux machine: export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:Secure Agent installation directory>/drivers/odbc/mongodb/lib/
9. Restart the Secure Agent.
Configuring the Schema Editor on Linux
To ensure that the Schema Editor works on the Linux machine where the Secure Agent is installed, you must set the ODBCSYSINI environment variable.
Configure the following steps to set the ODBCSYSINI environment variable:
- 1. Add the following MongoDB ODBC driver entry in the odbcinst.ini file:
[ODBC Drivers]
Informatica MongoDB ODBC Driver 64-bit=Installed
[Informatica MongoDB ODBC Driver 64-bit]
Description=Informatica MongoDB ODBC Driver (64-bit)
Driver=<Secure Agent installation directory>/drivers/odbc/mongodb/lib/libmongodbodbc_sb64.so
- 2. Set the ODBCSYSINI environment variable on the Linux machine to the location of the odbcinst.ini file.
To set the ODBCSYSINI environment variable, you must export the ODBCSYSINI variable.
For example, run the following script from the Linux machine: export ODBCSYSINI=<Secure Agent installation directory>/odbcinst.ini
- 3. Restart the Secure Agent.
Connection Configuration Preferences for Schema Editor
The driver searches for the environment variables ODBCINI and ODBCSYSINI to locate the configuration files and read the DSN.
If the environment variables do not exist, the schema editor searches for the files in the following directories:
- •/etc/odbc.ini
- •/etc/odbcinst.ini