Skip Ribbon Commands
Skip to main content
Navigate Up
Sign In

Quick Launch

Average Rating:

facebook Twitter
Email
Print Bookmark Alert me when this article is updated

Feedback

HOW TO: Configure a MongoDB connection using ODBC on UNIX (For PC/IDQ)
Solution
To configure an ODBC connection for MongoDB (Simba MongoDB driver versions 2.2.8 or above) on UNIX, perform the following steps:


​​​1. Set the ODBCHOME environment variable.

    • ODBCHOME - Set the variable to the ODBC installation directory. For instance:

$ setenv ODBCHOME $INFA_HOME/ODBC7.1


​2. ​​​ODBCINI environment variable so that it points to the location of the odbc.ini file. If you keep the odbc.ini file in $ODBCHOME:

       $ setenv ODBCINI $INFA_HOME/ODBC7.1/odbc.ini​

Note 

If this variable is not set, it would look for .odbc.ini in the user's home directory.


​3. Set the shared library environment variable.

    • Solaris LD_LIBRARY_PATH
    • Linux LD_LIBRARY_PATH
    • AIX LIBPATH
    • HP-UX SHLIB_PATH

Example

$ setenv LD_LIBRARY_PATH "${LD_LIBRARY_PATH}:$HOME/server_dir:$ODBCHOME/lib


4. ​Set the PATH environment variable. 

Example

$ setenv PATH ${PATH}:$ODBCHOME/bin


​5. Update the file $INFA_HOME/tools/mongodb/lib/informatica.mongodbodbc.ini file.


[Driver]​

DriverManagerEncoding=UTF-16

ErrorMessagesPath=<INFA_HOME>/tools/mongodb/ErrorMessages/

LogLevel=0  ###Update this value to 6 if you want to enable odbc tracing.

LogPath=<INFA_HOME>/tools/mongodb/log/

SwapFilePath=/tmp 


​6. Add following DSN entry in odbc.ini file.


[MongoDB_DSN]

# Driver: The location where the ODBC driver is installed to.

Driver=[INFA_HOME]/tools/mongodb/lib/libinformaticamongodbodbc64.so

# Required: These values can also be specified in the connection string.

Server=[Host]

Port=[Port]

# Optional

AuthMechanism=SCRAM-SHA-1   ### Use SCRAM-SHA-1 for native DB user. Use PLAIN for LDAP user.

AuthSource=admin

Database=[DB name]

IgnoreTransactions=1

EnableDoubleBuffer=0

#EnableReplicaSet=0            ### Set this to 1 if you have Replica set

#gssapiServiceName=mongodb

#LoadMetadataTable=

#LocalMetadataFile=

#PWD=

#ReplicaSet=                   ### Set this to Replica set name if you have one

#ReadPreference=Primary

#SamplingLimit=100

#SamplingStepSize=1

#SamplingStrategy=Forward

#SecondaryServers=             ### Set this if you have Secondary servers like <Server1>:<Port1>,<Server2>:<Port2>,…

#SSL=0                         ### Set this parameter to 1 if DB is SSL enabled.

#sslAllowInvalidCertificates=0 ### Set this parameter to 1 if DB is SSL enabled.

#sslCADir=

#sslCAFile=

#sslCRLFile=

#sslPEMKeyFile=

#sslPEMKeyPwd=

#UID=

 

7. ​Test the DSN [MongoDB_DSN] using ssgodbc tool.  

8. For PowerCenter in Workflow Manager, create the relational connection with ODBC type and use the DSN [MongoDB_DSN] for connecting the string. 

9. ​For IDQ, Create the ODBC type relational connection in Admin console/Developer tool and use the connect string as MongoDB_DSN. 

Note


The base version of Simba MongoDB driver in Informatica installation 10.4 or other lower 10.x versions are Simba MongoDb driver v1.8.1. This version is not recommended for using.

​​​
More Information
For more information, refer the Simba documentation in $INFA_HOME/tools/mongodb/docs/’Simba MongoDB ODBC Install and Configuration Guide.pdf and the sample DSN present in the odbc.ini file present in $INFA_HOME/tools/mongodb/Setup directory. 


Reference
Applies To
Product: Data Quality; PowerCenter
Problem Type: Configuration
User Type: Administrator
Project Phase: Configure
Product Version:
Database:
Operating System:
Other Software:
Attachments
Last Modified Date:8/8/2020 3:40 AMID:622622
People who viewed this also viewed

Feedback

Did this KB document help you?



What can we do to improve this information (2000 or fewer characters)