Configuring the Simba MongoDB JDBC Driver Options for MongoDB Connector

Configuring the Simba MongoDB JDBC Driver Options for MongoDB Connector

Configure the Simba MongoDB JDBC Driver Properties

Configure the Simba MongoDB JDBC Driver Properties

When you create a MongoDB connection, configure the
Additional Connection Properties
to specify the Simba MongoDB JDBC driver properties.
The following table describes the Simba MongoDB JDBC driver properties that you can configure in a MongoDB connection:
Property
Description
AuthMechanism
The authentication mechanism that the driver uses to connect to the MongoDB server.
You can specify one of the following values:
  • None. The driver does not authenticate the MongoDB connection.
  • SCRAM-SHA-1. The driver authenticates the MongoDB connection using the SCRAM-SHA-1 protocol, which is the default authentication protocol used by MongoDB.
  • GSSAPI. The driver authenticates the MongoDB connection using the Kerberos protocol.
  • PLAIN. The driver authenticates the MongoDB connection using the LDAP protocol.
AuthSource
The name of the MongoDB database that you want to authenticate.
BatchSize
The maximum number of documents that a query returns at a time.
Default is 4096.
CatalogSchemaSwap
Specifies whether the driver treats MongoDB databases as schemas or catalogs.
If you specify
true
, the driver treats MongoDB databases as schemas.
If you specify
false
, the driver treats MongoDB databases as catalogs.
connectTimeoutMS
The number of milliseconds to wait during connection attempts before timing out. If connecting to the server takes longer than the specified amount of time, then the driver stops the connection attempt.
DefaultStringColumnLength
The maximum number of characters that a STRING column can contain.
You can specify a maximum value of 2147483647.
Default is 255.
DmlBatchSize
The maximum number of documents that the driver can handle at one time during a write operation.
Default is 500.
EnableDoubleBuffer
Specifies whether the driver retrieves the data using double-buffering or single-buffering.
If you specify
true
, the driver uses double-buffering to retrieve the data.
If you specify
false
, the driver uses single-buffering to retrieve the data.
EnableMixedTypeFilter
Specifies whether the driver uses mixed type filtering, which allows a value to pass the filter even if it is not the same data type as the specified filter term.
If you specify
true
, the driver retrieves all values that match the specified filter term, even if the values are stored as different data types than the filter term.
If you specify
false
, the driver only retrieves values that match the data type of the specified filter term.
Default is true.
EnableTransaction
Specifies whether the driver supports connections where auto-commit mode is disabled.
If you specify
true
, the driver supports connections where auto-commit mode is disabled.
If you specify
false
, the driver does not support connections where auto-commit mode is disabled.
Default is false.
gssapiServiceName
The Kerberos service principal name of the MongoDB server.
Default is
mongodb
.
JSONColumnSize
Specifies the default column length for JSON fields.
Default length is
1023
.
LoadMetadataTable
Specifies where the Secure Agent looks for the schema definition.
If you specify
true
, the Secure Agent loads the schema definition from the MongoDB database.
If you specify
false
, the Secure Agent loads the schema definition from the JSON file specified in the
LocalMetadataFile
key.
LocalMetadataFile
Specifies the complete path and name of JSON file containing the schema definition that the Secure Agent uses to connect to MongoDB.
LogLevel
Species whether the Secure Agent logs error messages in the session log.
You can specify one of the following values:
  • 0: Disable all logging.
  • 1: Enable logging on the FATAL level, which logs very severe error events that will lead the driver to abort.
  • 2: Enable logging on the ERROR level, which logs error events that might still allow the driver to continue running.
  • 3: Enable logging on the WARNING level, which logs events that might result in an error if action is not taken.
  • 4: Enable logging on the INFO level, which logs general information that describes the progress of the driver.
  • 5: Enable logging on the DEBUG level, which logs detailed information that is useful for debugging the driver.
  • 6: Enable logging on the TRACE level, which logs all driver activity.
When logging is enabled, the driver produces the following log files in the location specified in the
LogPath
property:
  • A
    MDBJDriver_driver.log
    file that logs driver activity that is not specific to a connection.
  • A
    MongoDBJDBC_connection_[Number].log
    file for each connection made to the database, where [Number] is a number that distinguishes each log file from the others. This file logs driver activity that is specific to the connection.
LogPath
The complete path to the folder where the driver saves log files when logging is enabled.
NoCursorTimeout
Specifies whether the driver allows active cursors on the data source server to expire.
If you specify
true
, the driver prevents the data source server from timing out idle cursors.
If you specify
false
,The data source server times out idle cursors when the inactivity threshold specified on the server transpires
When this property is set to True, if the driver quits or loses the connection to the server unexpectedly, there is a risk of the cursor remaining open on the server indefinitely. You can adjust the threshold for idle cursor timeouts on the MongoDB server.
ReplicaSet
If you specify
true
, The driver reports the JSON column.
Name of the replica set of the database.
SamplingLimit
The maximum number of records that the Secure Agent can sample to generate the schema definition.
To sample every record in the database, set this option to 0.
Default is 100.
SamplingStepSize
The interval at which the Secure Agent samples records when scanning through the database to generate a temporary schema definition.
For example, if you set the sampling interval to 2, the Secure Agent samples every second record in the database.
Default is 1.
SamplingStrategy
Specifies how the Secure Agent samples data when generating a temporary schema definition.
You can specify one of the following values:
  • Forward: The Secure Agent samples data starting from the first record in the database, then samples the next record, and so on.
  • Backwards: The Secure Agent samples data starting from the last record in the database, then samples the preceding record, and so on.
Default is Forward.
SocketTimeout
Specifies the amount of time, in milliseconds, before an attempt to send or receive on a socket time out.
When this property is set to
-1
, the driver does not specify the amount of time before a socket connection times out.
SSL
Specifies whether the Secure Agent establishes a secure connection to the MongoDB server using SSL.
If you specify
true
, the Secure Agent establishes an encrypted connection to the MongoDB server.
If you specify
false
, the Secure Agent establishes an unencrypted connection to the MongoDB server.
Not Applicable for MongoDB Connector.
sslTrustStore
Applicable only if you enable SSL.
The path and file name of the truststore file.
Not Applicable for MongoDB Connector.
sslTrustStorePwd
The password for the truststore file.
Not Applicable for MongoDB Connector.
UseJSONColumn
Specifies whether the driver reports a special column named
DocumentAsJson
that retrieves or stores whole documents as JSON-formatted strings.
If you specify
true
, The driver reports the JSON column.
If you specify
false
, The driver does not report the JSON column.
Only enable this option as needed. The process of converting documents into JSON strings decreases the performance of the driver.
WriteConcern
Specifies the total number of primary and secondary servers that the driver uses to report a successful write operation.
Default is 1.
If you use a value that is greater than
1
, you must specify an appropriate value for the
WriteConcernTimeout
property.
WriteConcernJournaled
Specifies whether the driver requires the data from a write operation to be committed to the journal before the write operation can be acknowledged.
If you specify
1
, the driver requires the data from to be committed to the journal.
If you specify
0
, the driver does not require the data to be committed to the journal.
Default is 1.
WriteConcernTimeout
The maximum number of seconds that the driver waits for a secondary server to acknowledge a write operation before reporting that the operation has failed.
By default, or when this property is set to 0, the driver does not time out. Instead, the driver waits until all secondary servers acknowledge the write operation, and then reports that the operation has succeeded.
This option is applicable only when
WriteConcern
is enabled.

0 COMMENTS

We’d like to hear from you!