Quick Start: Progress DataDirect® for ODBC for MongoDBTM Driver on Windows (32-bit and 64-bit)

The following basic information enables you to connect with and test your driver immediately after installation. For installation instructions, see the Progress DataDirect for ODBC Drivers Installation Guide. This Quick Start covers the following topics:

Driver Requirements

Connecting to a Database

Testing the Connection

Tuning the Drivers for Optimal Performance

Driver Requirements

The driver requires a Java Virtual Machine (JVM): J2SE 6 or higher.

Connecting to a Database

1       Start the ODBC Administrator to display a list of user data sources.

2       On the User DSN tab, click Add to display a list of installed drivers. Select the appropriate driver from the list and click Finish to display the driver Setup dialog box.

3       On the General tab, provide the required information; then, click Apply. The General tab has the following required options:

       Data Source Name: Type a string that identifies this data source configuration in the system information, such as "Accounting."

       Host Name: Type the URL of the interface to which you want to connect.

       Port Number: Type the port number of the server listener. The default is 27017.

       Database: Type the name of the database to which you want to connect. The default is INFORMATION_SCHEMA.

Important: This value is case-insensitive if you have access privileges to query the list of databases on the server. If you do not have access, it is case-sensitive.

       Schema Definition Path: Type 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:

application_data_folder\Local\Progress\DataDirect\

MongoDB Schema\host_name.config

where:

application_data_folder is the application data folder for your platform and data source type.

host_name is the value specified for the Host Name connection option.

4       To take full advantage of the driver's features, click Schema Tool to customize your schema definition using the DataDirect Schema Tool. You can also customize your schema definition later if the need arises. Refer to the "Using the Driver" chapter of the Progress DataDirect for ODBC for MongoDB User's Guide and Reference for more information.

Testing the Connection

1       At the bottom of the Driver Setup dialog box, click Test Connect to attempt to connect to the data source using the connection properties that you specified. A logon dialog box appears. Note that the information you enter in the logon dialog box during a test connect is not saved. Click OK.

If the driver can connect, it releases the connection and displays a connection established message. If the driver cannot connect because of an improper environment or incorrect connection value, it displays an appropriate error message. Click OK.

2       Click OK or Cancel at the bottom of the Driver Setup dialog box. If you click OK, the values you have specified become the defaults when you connect to the data source.

Tuning the Drivers for Optimal Performance

The driver has connection options that directly affect performance. To tune the driver for optimal performance, set the following options:

If your application does not use threads

Disable Application Using Threads on the Advanced tab.

If your application requires encryption of data

Controlled by Encryption Method on the Security Tab. Data encryption may adversely affect performance because of the additional overhead (mainly CPU usage) required to encrypt and decrypt data.

If you know the typical fetch size for your application

Set Fetch Size to suit your environment. Smaller fetch sizes can improve the initial response time of the query. Larger fetch sizes improve overall fetch times at the cost of additional memory.

If your application retrieves large sets of data

Result Memory Size, on the Advanced tab, controls the maximum size of an intermediate result set the driver holds in memory. When the size of an intermediate result sets exceed the limit determined by this option, the driver writes to disk, which results in performance loss. Increase the value specified to improve performance.

Note: If the size of an intermediate result set exceeds the available heap size used by the JVM, an out of memory error is returned. If you receive this error, decrease the value specified until results are successfully returned. Alternatively, you can increase the available memory by adjusting the JVMArgs option.

JVM Arguments, on the SQL Engine tab, specifies the heap size used by the JVM. Used in conjunction with the Result Memory Size connection option, you can address memory and performance concerns by increasing the maximum Java heap size to ensure that result sets fit easily within the free heap space. For example, for a heap size of 1024 MB, specify JVMArgs={-Xmx1024m}.

If your application does not require the most recent version of data

Set Read Preference to secondary or secondaryPreferred. When connecting to a replica set, reading from secondary members (read-only server nodes) can improve performance by distributing queries across secondary members and reducing the demand on the primary member (read-write server node).

©2016. Progress Software Corporation. All rights reserved.

5/16, 8.0.1