Configuring a data source in the system information file
- Last Updated: October 27, 2020
- 2 minute read
- DataDirect Connectors
- ODBC
- MongoDB 8.0
- Documentation
The default odbc.ini file installed in the installation
directory is a template in which you create data source definitions. You enter your
site-specific database connection information using a text editor. Each data source definition
must include the keyword Driver=, which is the full path to
the driver.
The following examples show the minimum connection string options that must be set to complete a test connection, where xx represents iv for 32-bit or dd for 64-bit drivers, and yy represents the extension. The values for the options are samples and are not necessarily the ones you would use.
To take advantage of the driver's features, we recommended that you launch the DataDirect Schema Tool; although, it is not required to test the connection. For additional information on the DataDirect Schema Tool, see "Creating and customizing schemas using the DataDirect Schema Tool."
[ODBC Data Sources]
MongoDB=DataDirect 8.0 MongoDB Driver
[MongoDB]
Driver=ODBCHOME/lib/xxmongo28.yy
Database=mongodb2
HostName=MongodbServer
PortNumber=27017
SchemaDefinition=~/progress/datadirect/mongodb_schema/MongodbServer.config
Connection Option Descriptions:
Database: The name of the database to
which you want to connect by default. The default is
INFORMATION_SCHEMA.
HostName: Either the name or the IP address of the server to which you want
to connect.
PortNumber: The port number of the server
listener. The default is 27017.
SchemaDefinition: The name and location of
the configuration file where the relational map of native data is written. The driver either
creates or looks for this file when connecting to the database. The default is:
~/progress/datadirect/mongodb_schema/hostname.config
- hostname
- is the value specified for the HostName connection option.
See "Schema Definition" for details.