74
Simba MongoDB ODBC Driver with SQL Connector Installation and Configuration Guide Simba Technologies Inc. Version 2.0.1 February 16, 2016

SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

  • Upload
    others

  • View
    10

  • Download
    0

Embed Size (px)

Citation preview

Page 1: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

Simba MongoDB ODBC Driver withSQL Connector

Installation and ConfigurationGuide

Simba Technologies Inc.

Version 2.0.1February 16, 2016

Page 2: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

Copyright © 2016 Simba Technologies Inc. All Rights Reserved.

Information in this document is subject to change without notice. Companies, namesand data used in examples herein are fictitious unless otherwise noted. No part of thispublication, or the software it describes, may be reproduced, transmitted, transcribed,stored in a retrieval system, decompiled, disassembled, reverse-engineered, ortranslated into any language in any form by any means for any purpose without theexpress written permission of Simba Technologies Inc.

Trademarks

Simba, the Simba logo, SimbaEngine, SimbaEngine C/S, SimbaExpress andSimbaLib are registered trademarks of Simba Technologies Inc. All other trademarksand/or servicemarks are the property of their respective owners.

Contact Us

Simba Technologies Inc.938 West 8th AvenueVancouver, BC CanadaV5Z 1E5

Tel: +1 (604) 633-0008

Fax: +1 (604) 633-0004

www.simba.com

www.simba.com 2

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 3: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

About This Guide

PurposeThe Simba MongoDB ODBC Driver with SQL Connector Installation andConfiguration Guide explains how to install and configure the Simba MongoDB ODBCDriver with SQL Connector. The guide also provides details related to features of thedriver.

AudienceThe guide is intended for end users of the Simba MongoDB ODBC Driver with SQLConnector, as well as administrators and developers integrating the driver.

Knowledge PrerequisitesTo use the Simba MongoDB ODBC Driver with SQL Connector, the followingknowledge is helpful:

l Familiarity with the platform on which you are using the Simba MongoDB ODBCDriver with SQL Connector

l Ability to use the data source to which the Simba MongoDB ODBC Driver withSQL Connector is connecting

l An understanding of the role of ODBC technologies and driver managers inconnecting to a data source

l Experience creating and configuring ODBC connectionsl Exposure to SQL

Document ConventionsItalics are used when referring to book and document titles.

Bold is used in procedures for graphical user interface elements that a user clicks andtext that a user types.

Monospace font indicates commands, source code, or contents of text files.Underline is not used.

The pencil icon indicates a short note appended to a paragraph.

The star icon indicates an important comment related to the precedingparagraph.

The thumbs up icon indicates a practical tip or suggestion.

www.simba.com 3

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 4: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

Table of Contents

About SimbaMongoDB ODBC Driver with SQLConnector 7

WindowsDriver 8Installing the Driver onWindows 8Creating a Data Source Name 9Configuring Authentication onWindows 11Configuring AdvancedOptions 12ConfiguringWrite-Back Options 13Configuring SSL Verification 14Exporting a Data Source Name 16Importing a Data Source Name 16Configuring Logging Options 16Verifying the Version Number 18

LinuxDriver 20Linux System Requirements 20Installing the Driver 20Setting the LD_LIBRARY_PATH Environment Variable 21

MacOS X Driver 22Installing the Driver onMac OSX 22Verifying the Version Number 23

Configuring ODBC Connections for Non-WindowsPlatforms 24Configuration Files 24Sample Configuration Files 25Configuring the Environment 25Defining DSNs in odbc.ini 26Specifying ODBC Drivers in odbcinst.ini 27Configuring Driver Settings in simba.mongodbodbc.ini 28Configuring Authentication on non-Windows systems 29Configuring SSL Verification 30Configuring Logging Options 31

Using a Connection String 33DSN Connection String Example 33DSN-less Connection String Examples 33

www.simba.com 4

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 5: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

Features 37Authentication 37Catalog Support 37Double-Buffering 37SQLConnector 38Data Types 38SchemaDefinitions 42Virtual Tables 44Write-back 47

Driver Configuration Options 50Allow Self-Signed Certificates 51Authentication Source 51Batch Size 51Binary Column Size 52Certificate Authority File 52Certificate Authority Directory 52Certificate Revocation List File 53Connect to Replica Set 53Database 53Documents to Fetch Per Block 53Documents to Sample 54Enable Double-Buffering 54Enable Passdown 54Enable SSL 55Expose Binary as SQL_LONGVARBINARY 55Expose Strings as SQL_WVARCHAR 55JournaledWrites 56Local File 56Mechanism (Authentication) 56Mechanism (Metadata) 57Password 57PEM Key File 58PEM Key Password 58Port 58Replica Set Name 58SamplingMethod 59Secondary Servers 59

www.simba.com 5

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 6: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

Server 59Service Name 60Step Size 60String Column Size 60Timeout 60Username 61Write Concern 61

Contact Us 63

Third-Party Trademarks 64

Third-Party Licenses 65

www.simba.com 6

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 7: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

About Simba MongoDB ODBC Driver with SQLConnector

The Simba MongoDB ODBC Driver with SQL Connector enables BusinessIntelligence (BI), analytics, and reporting on data that is stored in MongoDB databases.The driver complies with the ODBC 3.80 data standard and adds importantfunctionality such as Unicode, as well as 32- and 64-bit support for high-performancecomputing environments on all platforms.

ODBC is one of the most established and widely supported APIs for connecting to andworking with databases. At the heart of the technology is the ODBC driver, whichconnects an application to the database. For more information about ODBC, see theData Access Standards Glossary: http://www.simba.com/resources/data-access-standards-library. For complete information about the ODBC specification, see theODBC API Reference: http://msdn.microsoft.com/en-us/library/windows/desktop/ms714562(v=vs.85).aspx.

The Simba MongoDB ODBC Driver with SQL Connector is available for Microsoft®Windows®, Linux, and Mac OS X platforms.

The Installation and Configuration Guide is suitable for users who are looking toaccess data residing within MongoDB from their desktop environment. Applicationdevelopers may also find the information helpful. Refer to your application for detailson connecting via ODBC.

For basic configuration instructions that allow you to quickly set up theWindows driver so that you can evaluate and use it, see the Simba MongoDBODBC Driver with SQL Connector Quickstart Guide for Windows. The guidealso explains how to use the driver in various applications.

www.simba.com 7

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 8: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

Windows Driver

Installing the Driver on WindowsOn 64-bit Windows operating systems, you can execute both 32- and 64-bitapplications. However, 64-bit applications must use 64-bit drivers and 32-bitapplications must use 32-bit drivers. Make sure that you use the version of the drivermatching the bitness of the client application accessing data in MongoDB:

l SimbaMongoDBODBC32.msi for 32-bit applicationsl SimbaMongoDBODBC64.msi for 64-bit applications

You can install both versions of the driver on the same computer.

You install the Simba MongoDB ODBC Driver with SQL Connector on client machinesthat access data stored in MongoDB databases. Each machine that you install thedriver on must meet the following minimum system requirements:

l One of the following operating systems:o Windows 7 SP1, 8, or 8.1o Windows Server 2008 R2 SP1, 2012, or 2012 R2

l 600 MB of available disk space

To install the driver, you must have Administrator privileges on the computer.

The driver supports MongoDB versions 2.4, 2.6, and 3.0.

To install the Simba MongoDB ODBC Driver with SQL Connector:

1. Depending on the bitness of your client application, double-click to runSimbaMongoDBODBC32.msi or SimbaMongoDBODBC64.msi.

2. Click Next.3. Select the check box to accept the terms of the License Agreement if you agree,

and then click Next.4. To change the installation location, click Change, then browse to the desired

folder, and then click OK. To accept the installation location, click Next.5. Click Install.6. When the installation completes, click Finish.7. If you received a license file via e-mail, then copy the license file into the \lib

subfolder in the installation folder you selected above.

To avoid security issues, you may need to save the license file on yourlocal computer prior to copying the file into the \lib subfolder.

www.simba.com 8

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 9: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

Creating a Data Source NameTypically, after installing the Simba MongoDB ODBC Driver with SQL Connector, youneed to create a Data Source Name (DSN).

Alternatively, for information about DSN-less connections, see DSN-less ConnectionString Examples on page 33.

To create a Data Source Name:

1. Open the ODBC Administrator:l If you are using Windows 7 or earlier, click Start , then click AllPrograms, then click the Simba MongoDB ODBC Driver 2.0 programgroup corresponding to the bitness of the client application accessing datain MongoDB, and then click ODBC Administrator.

l Or, if you are using Windows 8 or later, on the Start screen, type ODBCadministrator, and then click the ODBC Administrator search resultcorresponding to the bitness of the client application accessing data inMongoDB.

2. In the ODBC Data Source Administrator, click the Drivers tab, and then scrolldown as needed to confirm that the Simba MongoDB ODBC Driver appears inthe alphabetical list of ODBC drivers that are installed on your system.

3. Choose one:l To create a DSN that only the user currently logged into Windows can use,click the User DSN tab.

l Or, to create a DSN that all users who log into Windows can use, click theSystem DSN tab.

4. Click Add.5. In the Create New Data Source dialog box, select Simba MongoDB ODBC

Driver and then click Finish. The Simba MongoDB ODBC Driver DSN Setupdialog box opens.

6. In the Data Source Name field, type a name for your DSN.7. Optionally, in the Description field, type relevant details about the DSN.8. In the Server field, type the name or IP address of the host where your MongoDB

instance is running.9. In the Port field, type the number of the TCP port that the server uses to listen for

client connections.

The default port used by MongoDB is 27017.10. In the Database field, type the name of the database that you want to access.

www.simba.com 9

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 10: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

11. If you are connecting to a replica set in your MongoDB implementation, select theConnect to Replica Set check box and then do the following:a. In the Replica Set Name field, type the name of the replica set.b. In the Secondary Servers field, type a comma-separated list of the servers

in the replica set. You can indicate the TCP port that each server is using tolisten for client connections by appending a colon (:) and the port number tothe server name or IP address.

12. If the database that you are connecting to requires authentication, then use theoptions in the Authentication area to configure authentication as needed. Formore information, see Configuring Authentication on Windows on page 11.

13. To configure advanced driver options including write-back options, clickAdvanced Options. For more information, see Configuring Advanced Optionson page 12.

14. To configure client-server verification over SSL, click SSL Options. For moreinformation, see Configuring SSL Verification on page 14.

15. To launch the Schema Editor application and create or customize the schemadefinition that the driver uses when connecting to the database, click SchemaEditor.

For more information, see Schema Definitions on page 42 and theSchema Editor User Guide for ODBC Connections.

l On Windows 7 or earlier, the guide is available from the SimbaMongoDB ODBC Driver program group in the Start menu.

l On Windows 8 or later, you can search for the guide on the Startscreen.

l On all platforms, the guide is available in the installation directory ofthe driver.

16. To configure logging behavior for the driver, click Logging Options. For moreinformation, see Configuring Logging Options on page 16.

17. To test the connection, click Test. Review the results as needed, and then clickOK.

If the connection fails, then confirm that the settings in the SimbaMongoDB ODBC Driver DSN Setup dialog box are correct. Contact yourMongoDB server administrator as needed.

18. To save your settings and close the Simba MongoDB ODBC Driver DSN Setupdialog box, click OK.

19. To close the ODBC Data Source Administrator, click OK.

www.simba.com 10

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 11: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

Configuring Authentication on WindowsSome MongoDB databases require authentication. You can configure the SimbaMongoDB ODBC Driver with SQL Connector to provide your credentials andauthenticate the connection to the database using one of the following methods:

l Using Your MongoDB User Name and Password on page 11l Using Kerberos on page 11l Using LDAP on page 12

Using Your MongoDB User Name and Password

You can configure the driver to pass your user name and password to the MongoDBserver to authenticate the connection.

To configure User Name and Password authentication:

1. To access authentication options, open the ODBC Data Source Administratorwhere you created the DSN, select the DSN, and then click Configure.

2. In the Mechanism drop-down list, selectMongoDB User Name and Password.3. To use a database other than the admin database to check your credentials, type

the name of the database in the Authentication Source field.4. In the Username field, type an appropriate user name for accessing the

MongoDB database.5. In the Password field, type the password corresponding to the user name you

typed above.6. Optionally, to save the password in the DSN, select the Save Password

(Unencrypted) check box.

If you save your password in the DSN, then anyone who has access toyour connection information can see your password.

7. To save your settings and close the dialog box, click OK.

Using Kerberos

You can configure the driver to use the Kerberos protocol to authenticate theconnection.

To configure Kerberos authentication:

1. To access authentication options, open the ODBC Data Source Administratorwhere you created the DSN, select the DSN, and then click Configure.

2. In the Mechanism drop-down list, select Kerberos.3. In the Service name field, type the service name of the MongoDB server.4. To save your settings and close the dialog box, click OK.

www.simba.com 11

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 12: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

Using LDAP

You can configure the driver to use the LDAP protocol to authenticate the connection.

To configure LDAP authentication:

1. To access authentication options, open the ODBC Data Source Administratorwhere you created the DSN, select the DSN, and then click Configure.

2. In the Mechanism drop-down list, select LDAP.3. In the Username field, type your user name for LDAP authentication.4. In the Password field, type the password corresponding to the user name you

typed above.5. Optionally, to save the password in the DSN, select the Save Password

(Unencrypted) check box.

If you save your password in the DSN, then anyone who has access toyour connection information can see your password.

6. To save your settings and close the dialog box, click OK.

Configuring Advanced OptionsYou can configure advanced options to modify the behavior of the driver.

To configure advanced options:

1. To access advanced options, open the ODBC Data Source Administrator whereyou created the DSN, then select the DSN, then click Configure, and then clickAdvanced Options.

2. To retrieve data using double-buffering instead of single-buffering, select theEnable Double-Buffering check box. You can configure the buffer size usingthe Documents to fetch per block field.

3. In the Documents to fetch per block field, type the maximum number ofdocuments that a query returns at a time. This setting also determines the buffersize used when double-buffering is enabled.

4. To return MongoDB String data as SQL_WVARCHAR instead of SQL_VARCHAR, select the Expose Strings as SQL_WVARCHAR check box.

5. In the String Column Size field, type the maximum data length for Stringcolumns.

6. To return MongoDB Binary data as SQL_LONGVARBINARY instead of SQL_VARBINARY, select the Expose Binary as SQL_LONGVARBINARY checkbox.

7. In the Binary Column Size field, type the maximum data length for Binarycolumns.

www.simba.com 12

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 13: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

8. To configure the driver to optimize joins between virtual tables and pass filteringand aggregation optimizations to the MongoDB database for handling, select theEnable Passdown check box.

9. Use the options in the Metadata area to specify the schema definition to usewhen connecting to the database:

l To configure the driver to use a schema definition stored in a JSON file,select Local File from the Mechanism drop-down list, and then clickBrowse and select the JSON file that you want to use.

l To configure the driver to use a schema definition stored in the MongoDBdatabase that you are connecting to, in the Mechanism drop-down list,select Database.

10. Use the options in the Sampling area to configure how the driver samples data togenerate temporary schema definitions:a. In the Sampling Method list, select the direction in which the driver reads

data during sampling. For example, if you select Forward, the driversamples data starting from the first record in the database, then samples thenext record, and so on.

b. In the Documents to sample field, type the maximum number ofdocuments that the driver can sample to generate the schema definition. Tosample every document in the database, type 0.

Typically, sampling a large number of documents results in a schemadefinition that is more accurate and better able to represent all the data inthe database. However, the sampling process may take longer thanexpected when many documents are sampled, especially if the databasecontains complex, nested data structures.

11. In the Step Size field, type the interval at which the driver samples a record whenscanning through the database. For example, if you set this option to 2, then thedriver samples every second record in the database starting from the first record.

12. To configure write-back behavior in the driver, clickWriteback Options. Formore information, see Configuring Write-Back Options on page 13.

13. To save your settings and close the Advanced Options dialog box, click OK.14. To close the Simba MongoDB ODBC Driver DSN Setup dialog box, click OK.

Configuring Write-Back OptionsYou can configure write-back options to modify how the driver writes data to theMongoDB data store.

To configure write-back options:

1. To access write-back options, open the ODBC Data Source Administrator whereyou created the DSN, select the DSN, click Configure, click AdvancedOptions, and then clickWriteback Options.

www.simba.com 13

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 14: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

2. In the Batch Size field, type the maximum number of documents that the drivercan handle at one time during a write operation.

3. Use the options in the Write Concern Settings area to configure how the driverreports the success of a write operation:a. In theWrite Concern field, type the total number of primary and secondary

servers that must acknowledge a write operation in order for the driver toreport a successful write operation.

Be aware of the following:l If you use a value that is greater than 1, make sure to alsospecify an appropriate value in the Timeout field. Setting thisoption to a value greater than 1 without specifying a timeoutinterval may cause the driver to wait indefinitely for replica setmembers to come online.

l The process for acknowledging a write operation typicallytakes four times longer than an INSERT or UPDATEoperation, but it is necessary if fault tolerance is important.

b. In the Timeout field, type the maximum number of seconds that the driverwaits for a secondary server to acknowledge a write operation beforereporting that the operation has failed.

c. To require the data to be committed to the journal before a write operationcan be acknowledged, select the Journaled Writes check box.

For detailed information about the write concern feature in MongoDB, see"Write Concern" in the MongoDB Manual:https://docs.mongodb.org/manual/core/write-concern/.

4. To save your settings and close the Writeback Options dialog box, click OK.5. Click OK to close the Advanced Options dialog box, and then click OK to close

the Simba MongoDB ODBC Driver DSN Setup dialog box.

Configuring SSL VerificationIf you are connecting to a MongoDB server that has Secure Sockets Layer (SSL)enabled, then you can configure the driver to connect to an SSL-enabled socket. Whenconnecting to a server over SSL, the driver supports identity verification between theclient and the server.

Configuring an SSL Connection without Identity Verification

You can configure a connection that uses SSL but does not verify the identity of theclient or the server.

To configure an SSL connection without verification:

1. To access the SSL options for a DSN, open the ODBC Data SourceAdministrator where you created the DSN, then select the DSN, then click

www.simba.com 14

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 15: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

Configure, and then click SSL Options.2. Select the Enable SSL check box.3. To save your settings and close the dialog box, click OK.

Configuring One-way SSL Verification

You can configure one-way verification so that the client verifies the identity of theMongoDB server.

To configure one-way SSL verification:

1. To access the SSL options for a DSN, open the ODBC Data SourceAdministrator where you created the DSN, then select the DSN, then clickConfigure, and then click SSL Options.

2. Select the Enable SSL check box.3. To allow self-signed certificates from the server, select the Allow Self-Signed

Certificates check box.4. Choose one:

l To verify the server using a certificate from a specific PEM file, in theCertificate Authority File field, specify the full path of the PEM file.

l Or, to verify the server using certificates stored in multiple PEM files, in theCertificate Authority Directory field, specify the full path to the directorywhere the PEM files are located.

5. In the Certificate Revocation List File field, specify the full path of the PEM filecontaining the list of revoked certificates.

6. To save your settings and close the dialog box, click OK.

Configuring Two-way SSL Verification

You can configure two-way SSL verification so that the client and the MongoDB serververify each other.

To configure two-way SSL verification:

1. To access the SSL options for a DSN, open the ODBC Data SourceAdministrator where you created the DSN, then select the DSN, then clickConfigure, and then click SSL Options.

2. Select the Enable SSL check box.3. To allow self-signed certificates from the server, select the Allow Self-Signed

Certificates check box.4. In the PEM Key File field, specify the full path of the PEM file containing the

certificate for verifying the client.5. If the client certificate is protected with a password, type the password in the PEM

Key Password field.6. Choose one:

www.simba.com 15

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 16: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

l To verify the server using a certificate from a specific PEM file, in theCertificate Authority File field, specify the full path of the PEM file.

l Or, to verify the server using certificates stored in multiple PEM files, in theCertificate Authority Directory field, specify the full path to the directorywhere the PEM files are located.

7. In the Certificate Revocation List File field, specify the full path of the PEM filecontaining the list of revoked certificates.

8. To save your settings and close the dialog box, click OK.

Exporting a Data Source NameAfter you configure a DSN, you can export it to be used on other machines. When youexport a DSN, all of its configuration settings are saved in a .sdc file. You can thendistribute the .sdc file to other users so that they can import your DSN configurationand use it on their machines.

To export a Data Source Name:

1. Open the ODBC Data Source Administrator where you created the DSN, selectthe DSN, click Configure, and then click Logging Options.

2. Click Export Configuration, specify a name and location for the exported DSN,and then click Save.

Your DSN is saved as a .sdc file in the location that you specified.

Importing a Data Source NameYou can import a DSN configuration from a .sdc file and then use those settings toconnect to your data store.

To import a Data Source Name:

1. Open the ODBC Data Source Administrator where you created the DSN, selectthe DSN, click Configure, and then click Logging Options.

2. Click Import Configuration, browse to select the .sdc file that you want toimport the DSN configuration from, and then click Open.

3. Click OK to close the Logging Options dialog box.

The Simba MongoDB ODBC Driver DSN Setup dialog box loads the configurationsettings from the selected .sdc file. You can now save this DSN and use it to connectto your data store.

Configuring Logging OptionsTo help troubleshoot issues, you can enable logging. In addition to functionalityprovided in the Simba MongoDB ODBC Driver with SQL Connector, the ODBC DataSource Administrator provides tracing functionality.

www.simba.com 16

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 17: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

Only enable logging or tracing long enough to capture an issue. Logging ortracing decreases performance and can consume a large quantity of diskspace.

The driver allows you to set the amount of detail included in log files. The followingtable lists the logging levels provided by the Simba MongoDB ODBC Driver with SQLConnector, in order from least verbose to most verbose.

Logging Level Description

OFF Disables all logging.

FATAL Logs very severe error events that will lead the driver to abort.

ERROR Logs error events that might still allow the driver to continuerunning.

WARNING Logs potentially harmful situations.

INFO Logs general information that describes the progress of thedriver.

DEBUG Logs detailed information that is useful for debugging thedriver.

TRACE Logs more detailed information than the DEBUG level.

Table 1. Simba MongoDB ODBC Driver with SQL ConnectorLogging Levels

To enable driver logging:

1. To access logging options, open the ODBC Data Source Administrator whereyou created the DSN, then select the DSN, then click Configure, and then clickLogging Options.

2. From the Log Level drop-down list, select the desired level of information toinclude in log files.

3. In the Log Path field, specify the full path to the folder where you want to savelog files. You can type the path into the field, or click Browse and then browse toselect the folder.

4. In the Max Number Files field, type the maximum number of log files to keep.

After the maximum number of log files is reached, each time an additionalfile is created, the driver deletes the oldest log file.

5. In the Max File Size field, type the maximum size of each log file in megabytes(MB).

www.simba.com 17

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 18: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

After the maximum file size is reached, the driver creates a new file andcontinues logging.

6. Click OK.7. Restart your ODBC application to ensure that the new settings take effect.

The Simba MongoDB ODBC Driver with SQL Connector produces a log file namedmongodbodbc_driver.log at the location that you specify in the Log Path field.

To disable driver logging:

1. Open the ODBC Data Source Administrator where you created the DSN, thenselect the DSN, then click Configure, and then click Logging Options.

2. From the Log Level drop-down list, select LOG_OFF.3. Click OK.

To start tracing using the ODBC Data Source Administrator:

1. In the ODBC Data Source Administrator, click the Tracing tab.2. In the Log File Path area, click Browse. In the Select ODBC Log File dialog box,

browse to the location where you want to save the log file, then type a descriptivefile name in the File name field, and then click Save.

3. On the Tracing tab, click Start Tracing Now.

To stop ODBC Data Source Administrator tracing:

On the Tracing tab in the ODBC Data Source Administrator, click Stop TracingNow.

For more information about tracing using the ODBC Data Source Administrator, see"How to Generate an ODBC Trace with ODBC Data Source Administrator" on theMicrosoft Support website: http://support.microsoft.com/kb/274551.

Verifying the Version NumberIf you need to verify the version of the Simba MongoDB ODBC Driver with SQLConnector that is installed on your Windows machine, you can find the version numberin the ODBC Data Source Administrator.

To verify the version number:

1. Open the ODBC Administrator:l If you are using Windows 7 or earlier, click Start , then click AllPrograms, then click the Simba MongoDB ODBC Driver 2.0 programgroup corresponding to the bitness of the client application accessing datain MongoDB, and then click ODBC Administrator.

www.simba.com 18

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 19: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

l Or, if you are using Windows 8 or later, on the Start screen, type ODBCadministrator, and then click the ODBC Administrator search resultcorresponding to the bitness of the client application accessing data inMongoDB.

2. Click the Drivers tab and then find the Simba MongoDB ODBC Driver in the listof ODBC drivers that are installed on your system. The version number isdisplayed in the Version column.

www.simba.com 19

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 20: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

Linux Driver

Linux System RequirementsYou install the Simba MongoDB ODBC Driver with SQL Connector on client machinesthat access data stored in MongoDB databases. Each machine that you install thedriver on must meet the following minimum system requirements:

l One of the following distributions:o Red Hat® Enterprise Linux® (RHEL) 5, 6, or 7o CentOS 5, 6, or 7o SUSE Linux Enterprise Server (SLES) 11 or 12

l 800 MB of available disk spacel One of the following ODBC driver managers installed:

o iODBC 3.52.7 or latero unixODBC 2.3.0 or later

l All of the following libsasl libraries installedo cyrus-sasl-2.1.22-7 or aboveo cyrus-sasl-gssapi-2.1.22-7 or aboveo cyrus-sasl-plain-2.1.22-7 or above

l Before you can use the Kerberos authentication mechanism, you must installKerberos.

For information about how to install and configure Kerberos, see theMIT Kerberos Documentation: http://web.mit.edu/kerberos/krb5-latest/doc/.

The driver supports MongoDB versions 2.4, 2.6, and 3.0.

Installing the DriverThe driver is available as a tarball package containing the following:

l simba/mongodbodbc contains the release notes and the Simba MongoDBODBC Driver with SQL Connector Installation and Configuration Guide.

l simba/mongodbodbc/ErrorMessages contains error message filesrequired by the driver.

l simba/mongodbodbc/lib/32 contains the 32-bit driver and thesimba.mongodbodbc.ini configuration file.

l simba/mongodbodbc/lib/64 contains the 64-bit driver and thesimba.mongodbodbc.ini configuration file.

www.simba.com 20

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 21: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

l simba/mongodbodbc/Setup contains sample configuration files namedodbc.ini and odbcinst.ini.

l simba/mongodbodbc/Tools/32/SchemaEditor contains the 32-bitSchema Editor application.

l simba/mongodbodbc/Tools/64/SchemaEditor contains the 64-bitSchema Editor application.

To install the Simba MongoDB ODBC Driver with SQL Connector:

1. Log in as the root user, then navigate to the folder containing the tarball package,and then run the tar command to extract the package and install the driver.For example:

tar --directory=/opt -zxvf [TarballName]

[TarballName] is the name of the tarball package containing the driver youwant to install.

2. If you received a license file via e-mail, then copy the license file into theopt/simba/mongodbodbc/lib/32 oropt/simba/mongodbodbc/lib/64 folder, depending on the version of thedriver that you installed.

To avoid security issues, you may need to save the license file on yourlocal computer prior to copying the file into the folder.

Setting the LD_LIBRARY_PATH Environment VariableThe LD_LIBRARY_PATH environment variable must include the paths to the installedODBC driver manager libraries.

For example, if ODBC driver manager libraries are installed in /usr/local/lib,then set LD_LIBRARY_PATH as follows:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

For information about how to set environment variables permanently, refer to yourLinux shell documentation.

For information about creating ODBC connections using the Simba MongoDB ODBCDriver with SQL Connector, see Configuring ODBC Connections for Non-WindowsPlatforms on page 24.

www.simba.com 21

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 22: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

Mac OS X Driver

Installing the Driver on Mac OSXThe Simba MongoDB ODBC Driver with SQL Connector supports both 32- and 64-bitclient applications.

You install the Simba MongoDB ODBC Driver with SQL Connector on client machinesthat access data stored in MongoDB databases. Each machine that you install thedriver on must meet the following minimum system requirements:

l Mac OS X version 10.9 or 10.10l 500 MB of available disk spacel iODBC 3.52.7 or laterl Before you can use the Kerberos authentication mechanism, you must installKerberos.

For information about how to install and configure Kerberos, see the MITKerberos Documentation: http://web.mit.edu/kerberos/krb5-latest/doc/.

The driver supports MongoDB versions 2.4, 2.6, and 3.0.

The Simba MongoDB ODBC Driver with SQL Connector driver files are installed in thefollowing directories:

l /opt/simba/mongodbodbc contains release notes, the Simba MongoDBODBC Driver with SQL Connector Installation and Configuration Guide, and theSchema Editor User Guide for ODBC Connections.

l /opt/simba/mongodbodbc/ErrorMessages contains error message filesrequired by the driver.

l /opt/simba/mongodbodbc/Setup contains sample configuration filesnamed odbc.ini and odbcinst.ini.

l /opt/simba/mongodbodbc/lib contains the driver binaries and thesimba.mongodbodbc.ini configuration file.

l /opt/simba/mongodbodbc/Tools/SchemaEditor contains the SchemaEditor application.

To install the Simba MongoDB ODBC Driver with SQL Connector:

1. Double-click SimbaMongoDBODBC.dmg to mount the disk image.2. Double-click SimbaMongoDBODBC.pkg to run the installer.3. In the installer, click Continue.4. On the Software License Agreement screen, click Continue, and when the

prompt appears, click Agree if you agree to the terms of the License Agreement.

www.simba.com 22

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 23: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

5. Optionally, to change the installation location, click Change Install Location,then select the desired location, and then click Continue.

6. To accept the installation location and begin the installation, click Install.7. When the installation completes, click Close.8. If you received a license file via e-mail, then copy the license file into the

/opt/simba/mongodbodbc/lib folder.To avoid security issues, you may need to save the license file on yourlocal computer prior to copying the file into the folder.

Verifying the Version NumberIf you need to verify the version of the Simba MongoDB ODBC Driver with SQLConnector that is installed on your Mac OS X machine, you can query the versionnumber through the Terminal.

To verify the version number:

At the Terminal, run the following command:

pkgutil --info com.simba.mongodbodbc

The command returns information about the Simba MongoDB ODBC Driver with SQLConnector that is installed on your machine, including the version number.

www.simba.com 23

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 24: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

Configuring ODBC Connections for Non-WindowsPlatforms

The following sections describe how to configure ODBC connections when using theSimba MongoDB ODBC Driver with SQL Connector with non-Windows platforms:

l Configuration Files on page 24l Sample Configuration Files on page 25l Configuring the Environment on page 25l Defining DSNs in odbc.ini on page 26l Specifying ODBC Drivers in odbcinst.ini on page 27l Configuring Driver Settings in simba.mongodbodbc.ini on page 28l Configuring Logging Options on page 31l Configuring Authentication on non-Windows systems on page 29l Configuring SSL Verification on page 30l Configuring Logging Options on page 31

Configuration FilesODBC driver managers use configuration files to define and configure ODBC datasources and drivers. By default, the following configuration files residing in the user’shome directory are used:

l .odbc.ini is used to define ODBC data sources, and it is required for DSNs.l .odbcinst.ini is used to define ODBC drivers, and it is optional.

Also, by default the Simba MongoDB ODBC Driver with SQL Connector is configuredusing the simba.mongodbodbc.ini file, which is located in one of the followingdirectories depending on the version of the driver that you are using:

l /opt/simba/mongodbodbc/lib/32 for the 32-bit driver on Linuxl /opt/simba/mongodbodbc/lib/64 for the 64-bit driver on Linuxl /opt/simba/mongodbodbc/lib for the driver on Mac OS X

The simba.mongodbodbc.ini file is required.The simba.mongodbodbc.ini file in the /lib subfolder provides defaultsettings for most configuration options available in the Simba MongoDB ODBCDriver with SQL Connector.

You can set driver configuration options in your odbc.ini andsimba.mongodbodbc.ini files. Configuration options set in asimba.mongodbodbc.ini file apply to all connections, whereas configurationoptions set in an odbc.ini file are specific to a connection. Configuration options set

www.simba.com 24

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 25: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

in odbc.ini take precedence over configuration options set insimba.mongodbodbc.ini. For information about the configuration optionsavailable for controlling the behavior of DSNs that are using the Simba MongoDBODBC Driver with SQL Connector, see Driver Configuration Options on page 50.

Sample Configuration FilesThe driver installation contains the following sample configuration files in the Setupdirectory:

l odbc.inil odbcinst.ini

These sample configuration files provide preset values for settings related to theSimba MongoDB ODBC Driver with SQL Connector.

The names of the sample configuration files do not begin with a period (.) so that theyappear in directory listings by default. A file name beginning with a period (.) ishidden. For odbc.ini and odbcinst.ini, if the default location is used, then thefile names must begin with a period (.).If the configuration files do not exist in the home directory, then you can copy thesample configuration files to the home directory, and then rename the files. If theconfiguration files already exist in the home directory, then use the sampleconfiguration files as a guide to modify the existing configuration files.

Configuring the EnvironmentOptionally, you can use three environment variables, ODBCINI, ODBCSYSINI, andSIMBAMONGODBINI, to specify different locations for the odbc.ini,odbcinst.ini, and simba.mongodbodbc.ini configuration files by doing thefollowing:

l Set ODBCINI to point to your odbc.ini file.l Set ODBCSYSINI to point to the directory containing the odbcinst.ini file.l Set SIMBAMONGODBINI to point to your simba.mongodbodbc.ini file.

For example, if your odbc.ini and simba.mongodbodbc.ini files are located in/etc and your odbcinst.ini file is located in /usr/local/odbc, then set theenvironment variables as follows:

export ODBCINI=/etc/odbc.iniexport ODBCSYSINI=/usr/local/odbcexport SIMBAMONGODBINI=/etc/simba.mongodbodbc.ini

www.simba.com 25

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 26: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

The following search order is used to locate the simba.mongodbodbc.ini file:

1. If the SIMBAMONGODBINI environment variable is defined, then the driversearches for the file specified by the environment variable.

SIMBAMONGODBINI must specify the full path, including the file name.2. The directory containing the driver’s binary is searched for a file named

simba.mongodbodbc.ini (not beginning with a period).3. The current working directory of the application is searched for a file named

simba.mongodbodbc.ini (not beginning with a period).4. The directory ~/ (that is, $HOME) is searched for a hidden file named

.simba.mongodbodbc.ini.5. The directory /etc is searched for a file named simba.mongodbodbc.ini

(not beginning with a period).

Defining DSNs in odbc.iniODBC Data Source Names (DSNs) are defined in the odbc.ini configuration file.This file is divided into several sections:

l [ODBC] is optional. This section is used to control global ODBC configuration,such as ODBC tracing.

l [ODBC Data Sources] is required. This section lists the DSNs andassociates them with a driver.

l A section having the same name as the data source specified in the [ODBCData Sources] section is required to configure the data source.

The following is an example of an odbc.ini configuration file for Linux:[ODBC Data Sources]Sample Simba MongoDB ODBC DSN 32=Simba MongoDB ODBC Driver32-bit[Sample Simba MongoDB DSN 32]Driver=/opt/simba/mongodbodbc/lib/32/libmongodbodbc_sb32.soServer=[MyServer]Port=27107

[MyServer] is the host name or IP address of the MongoDB server.

The following is an example of an odbc.ini configuration file for Mac OS X:

[ODBC Data Sources]Sample Simba MongoDB DSN=Simba MongoDB ODBC Driver

www.simba.com 26

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 27: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

[Sample Simba MongoDB DSN]Driver=/opt/simba/mongodbodbc/lib/libmongodbodbc_sbUniversal.dylibServer=[MyServer]Port=27107

[MyServer] is the host name or IP address of the MongoDB server.

To create a Data Source Name:

1. In a text editor, open the odbc.ini configuration file.2. In the [ODBC Data Sources] section, add a new entry by typing the Data

Source Name (DSN), then an equal sign (=), and then the driver name.3. Add a new section to the file, with a section name that matches the DSN you

specified above, and then add configuration options to the section. Specify theconfiguration options as key-value pairs.

4. Save the odbc.ini configuration file.

For information about the configuration options available for controlling the behavior ofDSNs that are using the Simba MongoDB ODBC Driver with SQL Connector, seeDriver Configuration Options on page 50.

Specifying ODBC Drivers in odbcinst.iniODBC drivers are defined in the odbcinst.ini configuration file. This configurationfile is optional because drivers can be specified directly in the odbc.iniconfiguration file, as described in Defining DSNs in odbc.ini on page 26.

The odbcinst.ini file is divided into the following sections:

l [ODBC Drivers] lists the names of all the installed ODBC drivers.l For each driver, a section having the same name as the driver name specified inthe [ODBC Drivers] section lists the driver attributes and values.

The following is an example of an odbcinst.ini configuration file for Linux:[ODBC Drivers]Simba MongoDB ODBC Driver 32-bit=InstalledSimba MongoDB ODBC Driver 64-bit=Installed[Simba MongoDB ODBC Driver 32-bit]Description=Simba MongoDB ODBC Driver (32-bit)Driver=/opt/simba/mongodbodbc/lib/32/libmongodbodbc_sb32.so

www.simba.com 27

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 28: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

[Simba MongoDB ODBC Driver 64-bit]Description=Simba MongoDB ODBC Driver (64-bit)Driver=/opt/simba/mongodbodbc/lib/64/libmongodbodbc_sb64.so

The following is an example of an odbcinst.ini configuration file for Mac OS X:

[ODBC Drivers]Simba MongoDB ODBC Driver=Installed[Simba MongoDB ODBC Driver]Description=Simba MongoDB ODBC DriverDriver=/opt/simba/mongodbodbc/lib/libsimbamongodbodbc_sbUniversal.dylib

To define a driver:

1. In a text editor, open the odbcinst.ini configuration file.2. In the [ODBC Drivers] section, add a new entry by typing the driver name and

then typing =Installed.Give the driver a symbolic name that you want to use to refer to the driverin connection strings or DSNs.

3. Add a new section to the file with a name that matches the driver name you typedabove, and then add configuration options to the section based on the sampleodbcinst.ini file provided in the Setup directory. Specify the configurationoptions as key-value pairs.

4. Save the odbcinst.ini configuration file.

Configuring Driver Settings in simba.mongodbodbc.iniThe simba.mongodbodbc.ini file contains configuration settings for the SimbaMongoDB ODBC Driver with SQL Connector. Settings that you define in this file applyto all connections that use the driver.

You do not need to modify the settings in the simba.mongodbodbc.ini file to usethe driver and connect to your data source.

www.simba.com 28

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 29: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

Configuring Authentication on non-Windows systemsSome MongoDB databases require authentication. You can configure the SimbaMongoDB ODBC Driver with SQL Connector to provide your credentials andauthenticate the connection to the database using one of the following methods:

l Using Your MongoDB User Name and Password on page 29l Using Kerberos on page 29l Using LDAP on page 29

Using Your MongoDB User Name and Password

You can configure the driver to pass your user name and password to the MongoDBserver to authenticate the connection.

To configure User Name and Password authentication:

1. In a text editor, open the odbc.ini configuration file.2. Set the AuthMechanism property to SCRAM-SHA-1.3. To use a database other than the admin database to check your credentials, set

the AuthSource property to the name of the database.4. Set the UID property to an appropriate user name for accessing the MongoDB

database.5. Set the PWD property to the password corresponding to the user name you typed

above.6. Save the odbc.ini configuration file.

Using Kerberos

You can configure the driver to use the Kerberos protocol to authenticate theconnection.

Kerberos must be installed and configured before you can use this authenticationmechanism. For information about how to install and configure Kerberos, see the MITKerberos Documentation: http://web.mit.edu/kerberos/krb5-latest/doc/.

To configure Kerberos authentication:

1. In a text editor, open the odbc.ini configuration file.2. Set the AuthMechanism property to GSSAPI.3. Set the gssapiServiceName property to the service name of the MongoDB

server.4. Save the odbc.ini configuration file.

Using LDAP

You can configure the driver to use the LDAP protocol to authenticate the connection.

www.simba.com 29

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 30: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

To configure LDAP authentication:

1. In a text editor, open the odbc.ini configuration file.2. Set the AuthMechanism property to PLAIN.3. Set the UID property to your user name for LDAP authentication.4. Set the PWD property to the password corresponding to the user name you typed

above.5. Save the odbc.ini configuration file.

Configuring SSL VerificationIf you are connecting to a MongoDB server that has Secure Sockets Layer (SSL)enabled, then you can configure the driver to connect to an SSL-enabled socket. Whenconnecting to a server over SSL, the driver supports identity verification between theclient and the server.

Configuring an SSL Connection without Identity Verification

You can configure a connection that uses SSL but does not verify the identity of theclient or the server.

To configure an SSL connection without verification:

1. In a text editor, open the odbc.ini configuration file.2. Set the SSL property to 1.3. Save the odbc.ini configuration file.

Configuring One-way SSL Verification

You can configure one-way verification so that the client verifies the identity of theMongoDB server.

To configure one-way SSL verification:

1. In a text editor, open the odbc.ini configuration file.2. Set the SSL property to 1.3. To allow self-signed certificates from the server, set the

sslAllowInvalidCertificates property to 1.4. Choose one:

l To verify the server using a certificate from a specific PEM file, set thesslCAFile property to the full path of the PEM file.

l Or, to verify the server using certificates stored in multiple PEM files, set thesslCADir property to the full path of the directory where the PEM files arelocated.

5. Set the sslCRLFile to the full path of the PEM file containing the list of revoked

www.simba.com 30

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 31: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

certificates.6. Save the odbc.ini configuration file.

Configuring Two-way SSL Verification

You can configure two-way SSL verification so that the client and the MongoDB serververify each other.

To configure two-way SSL verification:

1. In a text editor, open the odbc.ini configuration file.2. Set the SSL property to 1.3. To allow self-signed certificates from the server, set the

sslAllowInvalidCertificates property to 1.4. Set the sslPEMKeyFile property to the full path of the PEM file containing the

certificate for verifying the client.5. If the client certificate is protected with a password, set the sslPEMKeyPwd

property to the password.6. Choose one:

l To verify the server using a certificate from a specific PEM file, set thesslCAFile property to the full path of the PEM file.

l Or, to verify the server using certificates stored in multiple PEM files, set thesslCADir property to the full path of the directory where the PEM files arelocated.

7. Set the sslCRLFile to the full path of the PEM file containing the list of revokedcertificates.

8. Save the odbc.ini configuration file.

Configuring Logging OptionsTo help troubleshoot issues, you can enable logging in the driver.

Only enable logging long enough to capture an issue. Logging decreasesperformance and can consume a large quantity of disk space.

Use the LogLevel key to set the amount of detail included in log files. The followingtable lists the logging levels provided by the Simba MongoDB ODBC Driver with SQLConnector, in order from least verbose to most verbose.

LogLevel Value Description

0 Disables all logging.

Table 2. Simba MongoDB ODBC Driver with SQL ConnectorLogging Levels

www.simba.com 31

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 32: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

LogLevel Value Description

1 Logs very severe error events that will lead the driver to abort.

2 Logs error events that might still allow the driver to continuerunning.

3 Logs potentially harmful situations.

4 Logs general information that describes the progress of thedriver.

5 Logs detailed information that is useful for debugging thedriver.

6 Logs more detailed information than LogLevel=5.

To enable logging:

1. Open the simba.mongodbodbc.ini configuration file in a text editor.2. Set the LogLevel key to the desired level of information to include in log files.

For example:

LogLevel=23. Set the LogPath key to the full path to the folder where you want to save log

files. For example:

LogPath=/localhome/employee/Documents4. Set the LogFileCount key to the maximum number of log files to keep.

After the maximum number of log files is reached, each time an additionalfile is created, the driver deletes the oldest log file.

5. Set the LogFileSize key to the maximum size of each log file in megabytes(MB).

After the maximum file size is reached, the driver creates a new file andcontinues logging.

6. Save the simba.mongodbodbc.ini configuration file.7. Restart your ODBC application to ensure that the new settings take effect.

To disable logging:

1. Open the simba.mongodbodbc.ini configuration file in a text editor.2. Set the LogLevel key to 0.3. Save the simba.mongodbodbc.ini configuration file.

www.simba.com 32

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 33: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

Using a Connection String

For some applications, you may need to use a connection string to connect to yourdata source. For detailed information about how to use a connection string in an ODBCapplication, refer to the documentation for the application that you are using.

The connection strings in the following topics are examples showing the minimum setof connection attributes that you must specify to successfully connect to the datasource. Depending on the configuration of the data source and the type of connectionyou are working with, you may need to specify additional connection attributes. Fordetailed information about all the attributes that you can use in the connection string,see Driver Configuration Options on page 50.

l DSN Connection String Example on page 33l DSN-less Connection String Examples on page 33

DSN Connection String ExampleThe following is an example of a connection string for a connection that uses a DSN:

DSN=[DataSourceName];

[DataSourceName] is the DSN that you are using for the connection.

You can set additional configuration options by appending key-value pairs to theconnection string. Configuration options that are passed in using a connection stringtake precedence over configuration options that are set in the DSN.

For information about creating a DSN on a Windows computer, see Creating a DataSource Name on page 9. For information about creating a DSN on a non-Windowscomputer, see Defining DSNs in odbc.ini on page 26.

DSN-less Connection String ExamplesSome applications provide support for connecting to a data source using a driverwithout a DSN. To connect to a data source without using a DSN, use a connectionstring instead.

The placeholders in the examples are defined as follows, in alphabetical order:

l [MongoDBDatabase] is the database that you want to access.l [PortNumber] is the number of the TCP port that the MongoDB server uses tolisten for client connections.

l [ServerInfo] is the IP address or host name of the MongoDB server to which youare connecting.

l [ServiceName] is the Kerberos service principal name of the MongoDB server.

www.simba.com 33

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 34: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

l [SetName] is the name of the replica set that you want to access.l [YourPassword] is the password corresponding to your user name.l [YourUserName] is the user name that you use to access the MongoDB server.

Connecting to a Standard MongoDB Server Without Authentication

The following is the format of a DSN-less connection string for a standard connectionto a MongoDB server that does not require authentication:

Driver=Simba MongoDB ODBC Driver;Server=[ServerInfo];Port=[PortNumber];Database=[MongoDBDatabase];

For example:

Driver=Simba MongoDB ODBC Driver;Server=192.168.222.160;Port=27017;Database=TestData;

Connecting to a Standard MongoDB Server that Requires MongoDB User Nameand Password Authentication

The following is the format of a DSN-less connection string for a standard connectionto a MongoDB server that requiresMongoDB User Name and Passwordauthentication:

Driver=Simba MongoDB ODBC Driver;Server=[ServerInfo];Port=[PortNumber];Database=[MongoDBDatabase];authMechanism=SCRAM-SHA-1;UID=[YourUserName];PWD=[YourPassword];

For example:

Driver=Simba MongoDB ODBC Driver;Server=192.168.222.160;Port=27017;Database=TestData;authMechanism=SCRAM-SHA-1;UID=simba;PWD=simba;

Connecting to a Standard MongoDB Server that Requires Kerberos Authentication

The following is the format of a DSN-less connection string for a standard connectionto a MongoDB server that requires Kerberos authentication:

Driver=Simba MongoDB ODBC Driver;Server=[ServerInfo];Port=[PortNumber];Database=[MongoDBDatabase];authMechanism=GSSAPI;gssapiServiceName=[ServiceName];

For example:

Driver=Simba MongoDB ODBC Driver;Server=192.168.222.160;Port=27017;Database=TestData;authMechanism=GSSAPI;gssapiServiceName=mongodb;

www.simba.com 34

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 35: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

Connecting to a Standard MongoDB Server that Requires LDAP Authentication

The following is the format of a DSN-less connection string for a standard connectionto a MongoDB server that requires LDAP authentication:

Driver=Simba MongoDB ODBC Driver;Server=[ServerInfo];Port=[PortNumber];Database=[MongoDBDatabase];authMechanism=PLAIN;UID=[YourUserName];PWD=[YourPassword];

For example:

Driver=Simba MongoDB ODBC Driver;Server=192.168.222.160;Port=27017;Database=TestData;authMechanism=PLAIN;UID=simba;PWD=simba;

Connecting to a Replica Set Without Authentication

The following is the format of a DSN-less connection string for connecting to a replicaset that does not require authentication:

Driver=Simba MongoDB ODBC Driver;Server=[ServerInfo];Port=[PortNumber];Database=[MongoDBDatabase];EnableReplicaSet=1;SecondaryServers=[Server1]:[PortNumber1], [Server2]:[PortNumber2];ReplicaSet=[SetName];

For example:

Driver=Simba MongoDB ODBC Driver;Server=192.168.222.160;Port=27017;Database=TestData;EnableReplicaSet=1;SecondaryServers=192.168.222.165:27017,192.168.222.231:27017;ReplicaSet=TestSet;

Connecting to a Replica Set that Requires MongoDB User Name and PasswordAuthentication

The following is the format of a DSN-less connection string for connecting to a replicaset that requires MongoDB User Name and Password authentication:

Driver=Simba MongoDB ODBC Driver;Server=[ServerInfo];Port=[PortNumber];Database=[MongoDBDatabase];UID=[YourUserName];PWD=[YourPassword];EnableReplicaSet=1;SecondaryServers=[Server1]:[PortNumber1], [Server2]:[PortNumber2];ReplicaSet=[SetName];

For example:

Driver=Simba MongoDB ODBC Driver;Server=192.168.222.160;Port=27017;Database=TestData;UID=simba;PWD=simba;EnableReplicaSet=1;SecondaryServers=192.168.222.165:27017,192.168.222.231:27017;ReplicaSet=TestSet;

www.simba.com 35

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 36: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

Connecting to a Replica Set that Requires Kerberos Authentication

The following is the format of a DSN-less connection string for connecting to a replicaset that requires Kerberos authentication:

Driver=Simba MongoDB ODBC Driver;Server=[ServerInfo];Port=[PortNumber];Database=[MongoDBDatabase];authMechanism=GSSAPI;gssapiServiceName=[ServiceName];EnableReplicaSet=1;SecondaryServers=[Server1]:[PortNumber1], [Server2]:[PortNumber2];ReplicaSet=[SetName];

For example:

Driver=Simba MongoDB ODBC Driver;Server=192.168.222.160;Port=27017;Database=TestData;authMechanism=GSSAPI;gssapiServiceName=ServiceName;EnableReplicaSet=1;SecondaryServers=192.168.222.165:27017,192.168.222.231:27017;ReplicaSet=TestSet;

Connecting to a Replica Set that Requires LDAP Authentication

The following is the format of a DSN-less connection string for connecting to a replicaset that requires LDAP authentication:

Driver=Simba MongoDB ODBC Driver;Server=[ServerInfo];Port=[PortNumber];Database=[MongoDBDatabase];authMechanism=PLAIN;UID=[YourUserName];PWD=[YourPassword];EnableReplicaSet=1;SecondaryServers=[Server1]:[PortNumber1], [Server2]:[PortNumber2];ReplicaSet=[SetName];

For example:

Driver=Simba MongoDB ODBC Driver;Server=192.168.222.160;Port=27017;Database=TestData;authMechanism=PLAIN;UID=simba;PWD=simba;EnableReplicaSet=1;SecondaryServers=192.168.222.165:27017,192.168.222.231:27017;ReplicaSet=TestSet;

www.simba.com 36

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 37: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

Features

More information is provided on the following features of the Simba MongoDB ODBCDriver with SQL Connector:

l Authentication on page 37l Catalog Support on page 37l Double-Buffering on page 37l SQL Connector on page 38l Data Types on page 38l Schema Definitions on page 42l Virtual Tables on page 44l Write-back on page 47

AuthenticationThe Simba MongoDB ODBC Driver with SQL Connector can authenticate connectionsby using the Kerberos protocol, the LDAP protocol, or the authentication mechanismbuilt into MongoDB, which requires a user name and a password.

For information about configuring the Windows driver to authenticate your connection,see Configuring Authentication on Windows on page 11. For information aboutconfiguring the Linux or Mac OS X driver to authenticate your connection, seeConfiguring Authentication on non-Windows systems on page 29.

Catalog SupportThe Simba MongoDB ODBC Driver with SQL Connector supports catalogs by usingthe name of the MongoDB database as the catalog. Doing so allows the driver to workeasily with various ODBC applications.

The driver supports queries against MongoDB databases outside of the one that youare connected to, as well as joins between tables that belong to different databases.To work with data from other databases, in your SQL statements, specify the database(or catalog) that each table belongs to using the syntax DatabaseName.TableName.

Double-BufferingThe Simba MongoDB ODBC Driver with SQL Connector is capable of using double-buffering to improve driver performance during SELECT operations.

The impact of double-buffering depends on how the transfer speed of your networkcompares to the data processing speed of the driver. If the transfer speed issignificantly higher, then enabling double-buffering allows the driver to make full use ofthe network's capabilities. Conversely, if the transfer speed is considerably lower, the

www.simba.com 37

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 38: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

additional processes involved in double-buffering might cause a decrease inperformance.

To make optimal use of double-buffering, you need to set an appropriate buffer size. Abuffer size that is too small might decrease performance, while a buffer size that is toolarge might diminish the performance improvements from double-buffering. If thetransfer speed of the network is slow, the additional time spend processing a largebuffer size might cause a decrease in performance.

For information about configuring double-buffering in the Windows driver, seeConfiguring Advanced Options on page 12. For information about configuring double-buffering in the Linux or Mac OS X driver, see Enable Double-Buffering on page 54and Documents to Sample on page 54.

SQL ConnectorThe SQL Connector feature of the driver allows applications to execute standard SQLqueries against MongoDB. It converts SQL-92 queries to MongoDB API calls andprocesses the results.

Data TypesThe Simba MongoDB ODBC Driver with SQL Connector supports many MongoDBdata types, and converts data between MongoDB and SQL data types as needed. Themapping between each data type is determined by the schema definition, which youcan create by using the Schema Editor application that is installed with the driver.

For information about how to use the Schema Editor, see the Schema EditorUser Guide for ODBC Connections.

l On Windows 7 or earlier, the guide is available from the SimbaMongoDB ODBC Driver program group in the Start menu.

l On Windows 8 or later, you can search for the guide on the Start screen.l On all platforms, the guide is available in the installation directory of thedriver.

The following table lists the supported data type mappings.

To support complex data types such as objects and arrays, the driver renormalizes thedata into virtual tables. For more information, see Virtual Tables on page 44.

www.simba.com 38

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 39: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

MongoDB Type SQL Type

Binary SQL_LONGVARBINARY

The Binary data type is mapped to SQL_BINARYinstead if the Expose Binary as SQL_LONGVARBINARY option (theUseSqlLongVarbinary key) is disabled.

Boolean SQL_BIT

SQL_DOUBLE

SQL_INTEGER

SQL_BIGINT

SQL_VARCHAR

Date SQL_TIMESTAMP

NumberDouble SQL_DOUBLE

SQL_INTEGER

SQL_BIGINT

SQL_VARCHAR

NumberInt SQL_DOUBLE

SQL_INTEGER

SQL_BIGINT

SQL_VARCHAR

NumberLong SQL_DOUBLE

SQL_INTEGER

SQL_BIGINT

SQL_VARCHAR

ObjectID SQL_VARCHAR

Table 3. Supported Data Types

www.simba.com 39

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 40: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

MongoDB Type SQL Type

String SQL_WVARCHAR

The String data type is mapped to SQL_VARCHARinstead if the Expose strings as SQL_WVARCHARoption (the UseSqlWVarchar key) is disabled.

UUID SQL_BINARY

Array N/A

The data is renormalized into a virtual table.

Object N/A

The data is renormalized into columns.

If different rows in the sampled data have the same field with different data types, thena precedence order is used to determine the MongoDB type. The type specified in theschema definition will be the first one from the following list that appears in the sampledata:

1. Array2. Object3. Binary4. String5. NumberDouble6. NumberLong7. NumberInt

For example, the driver treats the following field named f as MongoDB data of typeArray:

{f : {g1 : 1}}{f : [1, 2, 3]}

Data types that do not have a direct mapping from MongoDB to ODBC are representedas type VARCHAR in ODBC. The detected MongoDB type is used during INSERTand UPDATE operations.

Unsupported Types

The following MongoDB data types are not supported:

www.simba.com 40

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 41: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

l DBPointerl JavaScriptl JavaScript (with scope)l Max keyl Min keyl Regular Expressionl Symboll Timestampl Undefined

The Timestamp data type is available only for internal use in MongoDB. Formore information, see "Timestamps" in the MongoDB Manual:https://docs.mongodb.org/manual/reference/bson-types/#timestamps.

Embedded Documents

The driver renormalizes embedded documents into columns. For example, considerthe following JSON document:

{"contact": {"address": {"street": "1-123 Broadway","city": "Vancouver"}}, "phone": "+12345678"}

When generating the schema definition, the driver identifies the following columns inthe document, all of type String:

contact_address_street contact_address_city phone

1-123 Broadway Vancouver +12345678

The driver is able to work with these columns as if they were standard table columns.

Arrays

The ODBC interface does not natively support collection-based data types, so theSimba MongoDB ODBC Driver with SQL Connector implements two options foraccessing and interacting with collection-based data. Depending on preference, arraysin MongoDB can be renormalized into virtual tables or columns.

By default, arrays are renormalized into virtual tables. To view array elements ascolumns instead, use the Move to Parent option in the Schema Editor. You can createthe column in a parent virtual table or in the base table.

www.simba.com 41

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 42: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

For more information about using the Schema Editor to manage your schemadefinitions, see the Schema Editor User Guide for ODBC Connections.

l On Windows 7 or earlier, the guide is available from the SimbaMongoDB ODBC Driver program group in the Start menu.

l On Windows 8 or later, you can search for the guide on the Start screen.l On all platforms, the guide is available in the installation directory of thedriver.

Arrays as Virtual Tables

The driver can renormalize MongoDB arrays into virtual tables. For more information,see Virtual Tables on page 44.

Arrays as Columns

The driver can also renormalize MongoDB arrays into columns. Consider the followingJSON document:

{"values": ["hello", 1, {"v1": {"v2": "this is an embeddeddocument"}}]}

The driver can represent the array elements using the following columns, wherevalues_1 is of type Double and the other two are of type String:

values_0 values_1 values_2_v1_v2

Hello 1.0 this is an embedded document

The driver works with these columns as if they were standard table columns.

The column names include the index of the array element that the column represents,starting with an index of 0. In other words, the first element of the array uses a suffix of_0, the second element uses _1, and so on.

Schema DefinitionsTo ensure consistent support for your MongoDB data, you must configure the driver touse a schema definition from a JSON file or the database. You can use the SchemaEditor application in conjunction with the driver to create a schema definition and thensave it in a JSON file or the database.

www.simba.com 42

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 43: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

For information about how to use the Schema Editor, see the Schema EditorUser Guide for ODBC Connections.

l On Windows 7 or earlier, the guide is available from the SimbaMongoDB ODBC Driver program group in the Start menu.

l On Windows 8 or later, you can search for the guide on the Start screen.l On all platforms, the guide is available in the installation directory of thedriver.

When the driver connects to a database without a specified schema definition, itautomatically generates a temporary schema definition using the settings defined inthe Sampling area of the Advanced Options dialog box (the SamplingStrategy,SamplingLimit, and SamplingStepSize properties in the odbc.ini configuration file).However, temporary schema definitions do not persist after the connection is closed,and the driver may generate different schema definitions during subsequentconnections to the same database.

Mapping MongoDB Data

MongoDB is a "schemaless" data store; the databases are able to store data that doesnot follow the rules of data typing and structure that apply to traditional relational data,and the tables may contain complex data such as nested arrays or arrays of differently-typed elements. Because traditional ODBC toolsets may not support these datastructures, the Simba MongoDB ODBC Driver with SQL Connector generates aschema definition that maps the MongoDB data to an ODBC-compatible format.

The Simba MongoDB ODBC Driver with SQL Connector does the following whengenerating a schema definition:

1. Samples the data in the database in order to detect its structure and determinethe data mappings that best support the data.

2. Assigns a MongoDB data type to each column.3. Maps each MongoDB data type to the SQL data type that is best able to

represent the greatest number of values.4. Renormalizes single-level objects into columns.5. For each array or nested object in the database, the driver generates a virtual

table to expand the data, and saves these virtual tables as part of the schemadefinition. For more information about virtual tables, see Virtual Tables on page44.

During this sampling process, the driver defines data types for each column, but doesnot change the data types of the individual cells in the database. As a result, columnsmay contain mixed data types. During read operations, values are converted to matchthe SQL data type of the column so that the driver can work with all the data in thecolumn consistently.

www.simba.com 43

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 44: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

Virtual TablesOne advantage of the MongoDB design is the ability to store data that is denormalizedinto a fewer number of tables. However, the ODBC interface does not natively supportaccessing denormalized data types such as arrays and objects. By expanding the datacontained within arrays and objects into virtual tables, the Simba MongoDB ODBCDriver with SQL Connector allows you to directly interact with the data but leave thestorage of the data in its denormalized form in MongoDB.

If any columns are mapped to a denormalized data type during the sampling process,then the driver creates the following tables and saves them as part of the schemadefinition:

l A base table, which contains only the normal data from the real table.l A virtual table for each column of denormalized data, expanding the nested data.

Virtual tables refer to the data in the real table, enabling the driver to access thedenormalized data. By querying the virtual tables, you can access the contents ofarrays and objects via ODBC. When you write or modify data in a virtual table, the datain the real table in the MongoDB database is updated.

The base table and virtual tables appear as additional tables in the list of tables thatexist in the database, and are named using the following conventions:

l The base table uses the same name as the real table that it represents.l In the ODBC layer, the name of each virtual table is formed using the name of thereal table that contains the array or object, an underscore (_), and the name ofthe array or object.

l In the MongoDB layer, the name of each virtual table is formed using the name ofthe collection that the data comes from, a period (.), and then the name of thearray or object followed by a set of closed square brackets ([]) for eachhierarchy level in which the array or object is nested.

For example, consider the example MongoDB table named CustomerTable shownbelow.

www.simba.com 44

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 45: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

_id CustomerName Invoices Service

Level Contacts Ratings

1111 ABC [{invoice_id: ”123”,item: ”toaster”,price: ”456”,discount: ”0.2”},{invoice_id: ”124”,item: ”oven”, price:”1235”, discount:”0.2”}]

Silver [{type: primary,name: "JohnJohnson"},{type: invoicing,name: "JillJilliamson"}]

[5,6]

2222 XYZ [{invoice_id: ”135”,item: ”fridge”, price:”12543”, discount:”0.0”}]

Gold [{type: primary,name: "Jane Doe"}]

[1,2]

Table 4. CustomerTable Example

CustomerTable has two columns that have an array of Objects in each cell, Invoicesand Contacts, and one column that has an array of Scalar types, Ratings. Multiplevirtual tables would be generated for this single source table. The first table is the basetable, which is shown below.

_id Customer Name Service Level

1111 ABC Silver

2222 XYZ Gold

Table 5. CustomerTable Base Table

The base table contains all of the data of the original table, but the data from the arrayshas been omitted and will be expanded in the virtual tables.

The following three tables show the virtual tables that represent the original arrays inthe example.

_id Invoices_index invoice_id item price discount

1111 0 123 toaster 456 0.2

Table 6. CustomerTable_Invoices Example

www.simba.com 45

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 46: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

_id Invoices_index invoice_id item price discount

1111 1 124 oven 1235 0.2

2222 0 135 fridge 12543 0.0

_id Contacts_index type name

1111 0 primary John Johnson

1111 1 invoicing Jill Jilliamson

2222 0 primary Jane Doe

Table 7. CustomerTable_Contacts Example

_id Ratings_index Ratings_value

1111 0 5

1111 1 6

2222 0 1

2222 1 2

Table 8. CustomerTable_Ratings Example

Each of these tables contain the following:

l A reference back to the original primary key column corresponding to the row ofthe original array (via the _id column)

l An indication of the position of the data within the original array (using theInvoices_index, Contacts_index, and Ratings_index columns)

l The expanded data for each element within the array:o Invoices: invoice_id, item, price and discounto Contacts: type and nameo Ratings: Ratings_value

You can select, insert, and update data in the base tables and virtual tables as if theywere standard relational tables, and the driver will handle the storage details withinMongoDB.

www.simba.com 46

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 47: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

For example, to append 7 to the Ratings array in the CustomerTable where _id = 1111,execute the following statement:

INSERT INTO CustomerTable_Ratings (_id, Ratings_value)VALUES (1111, 7)

Some operations may be processed differently or not supported for certain types ofdata. For more information, see Write-back on page 47.

Write-backThe Simba MongoDB ODBC Driver with SQL Connector supports Data ManipulationLanguage (DML) statements such as INSERT, UPDATE, and DELETE. The driverdoes not support SQL subqueries or ODBC transactions.

Writing data to the MongoDB database may change the typing of the data. Ifthe existing data is of a type that is different from the column data type specifiedin the schema definition, then the existing data will be replaced by new datathat is of the column data type.

When the driver samples the data and generates the schema definition, the driverdefines a SQL data type and a MongoDB data type for each column in the base tablesand virtual tables, but does not change the data types of the individual values in thedatabase. As a result, columns may contain mixed data types. The driver supportsDML statements on mixed data types. When you execute a write operation, the driverwill attempt to complete the operation using the column data type specified in theschema definition.

The data provided in DML statements must match the column data types. For example,a String value cannot be inserted in a column that is defined as an Integer column inthe schema definition.

The driver handles each DML statement as described below.

The CREATE, ALTER, and DROP statements are not supported for tables.

INSERT

Each row in MongoDB needs to have a unique ID represented by the _id column. If notprovided during insertion, MongoDB auto-generates a unique ID for each row. The _idfield is exposed as a valid column in the driver and can be auto-generated whenissuing INSERT statements through the driver. For example, consider the followingtable.

www.simba.com 47

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 48: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

_id sample_column

"517024D6CC79814E3FEBD352" 1

"5170ED77E49CC93A918DE316" 2

Table 9. Before INSERT Example

To insert a document with an auto-generated value for _id (data type: jstOID), issue thefollowing command:

INSERT INTO sample_table_1(sample_column) VALUES(3)

The following table shows the table after the insertion.

_id sample_column

"517024D6CC79814E3FEBD352" 1

"5170ED77E49CC93A918DE316" 2

"51710FFCE49CC93A918DE322" 3

Table 10. After INSERT Example

The value for the _id column can also be inserted using the INSERT statements, as inthe following examples:

INSERT INTO sample_table_2(_id, sample_column) VALUES(1,1)INSERT INTO sample_table_2 VALUES(1,1)

UPDATE

When updating rows, special care needs to be taken to avoid duplicate values for the _id column. As mentioned before, _id needs to be unique across all rows. When anUPDATE statement tries to set a value for the _id column and matches multiple rows,only one of the rows is updated with the new values, and the driver return an error forthe remaining rows. UPDATE is not executed atomically.

DELETE

The DELETE statement is not supported for virtual tables.

The driver considers a table valid as long as the table contains some data. If a table iscompletely empty, then the driver is not able to access the table. Consider thefollowing example:

DELETE FROM sample_table_3

www.simba.com 48

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 49: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

The command removes all data from sample_table_3. Therefore, sample_table_3 isinvalid. Any users attempting to access the table receive an error.

www.simba.com 49

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 50: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

Driver Configuration Options

Driver Configuration Options lists the configuration options available in the SimbaMongoDB ODBC Driver with SQL Connector alphabetically by field or button label.See Expose Strings as SQL_WVARCHAR on page 55.

When creating or configuring a connection from a Windows computer, the fields andbuttons are available in the following dialog boxes:

l Simba MongoDB ODBC Driver DSN Setupl Advanced Optionsl SSL Optionsl Writeback Options

When using a connection string or configuring a connection from a Linux or Mac OS Xcomputer, use the key names provided.

You can pass in configuration options in your connection string, or set them inyour odbc.ini and simba.mongodbodbc.ini files when you are using a non-Windows version of the driver. Configuration options set in asimba.mongodbodbc.ini file apply to all connections, whereas configurationoptions passed in using the connection string or set in an odbc.ini file arespecific to a connection. Configuration options passed in using the connectionstring take precedence over configuration options set in odbc.ini. Configurationoptions set in odbc.ini take precedence over configuration options set insimba.mongodbodbc.ini

The following configuration options are available:

l Allow Self-Signed Certificates onpage 51

l Authentication Source on page 51l Batch Size on page 51l Binary Column Size on page 52l Certificate Authority File on page52

l Certificate Authority Directory onpage 52

l Certificate Revocation List File onpage 53

l Connect to Replica Set on page53

l Database on page 53

l Expose Strings as SQL_WVARCHAR on page 55

l Journaled Writes on page 56l Local File on page 56l Mechanism (Authentication) onpage 56

l Mechanism (Metadata) on page57

l Password on page 57l PEM Key File on page 58l PEM Key Password on page 58l Port on page 58l Replica Set Name on page 58l Sampling Method on page 59

www.simba.com 50

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 51: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

l Documents to Fetch Per Block onpage 53

l Documents to Sample on page 54l Enable Double-Buffering on page54

l Enable Passdown on page 54l Enable SSL on page 55l Expose Binary as SQL_LONGVARBINARY on page 55

l Secondary Servers on page 59l Server on page 59l Service Name on page 60l Step Size on page 60l String Column Size on page 60l Timeout on page 60l Username on page 61l Write Concern on page 61

Allow Self-Signed Certificates

Key Name Default Value Required

sslAllowInvalidCertificates Clear (0) No

Description

This option specifies whether the driver allows self-signed SSL certificates from theserver.

l Enabled (1): The driver authenticates the MongoDB server even if the server isusing a self-signed certificate.

l Disabled (0): The driver does not allow self-signed certificates from the server.

This setting is only applicable when SSL is enabled.

Authentication Source

Key Name Default Value Required

AuthSource admin No

Description

The name of the MongoDB database that you want to use to check your credentials forauthentication.

Batch Size

Key Name Default Value Required

DmlBatchSize 500 No

www.simba.com 51

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 52: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

Description

The maximum number of documents that the driver can handle at one time during awrite operation.

Binary Column Size

Key Name Default Value Required

DefaultBinaryColumnLength 32767 No

Description

The maximum data length for Binary columns.

Certificate Authority File

Key Name Default Value Required

sslCAFile None No

Description

The full path of the .pem file that you use to verify the server.To configure the driver to access multiple .pem files for SSL verification, usethe Certificate Authority Directory option or the sslCADir key instead.

Certificate Authority Directory

Key Name Default Value Required

sslCADir None No

Description

The full path of the directory containing the .pem files that you use to verify the server.This setting enables the driver to access multiple .pem files for SSL verification.

To specify a single .pem file, use the Certificate Authority File option or thesslCAFile key instead.

www.simba.com 52

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 53: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

Certificate Revocation List File

Key Name Default Value Required

sslCRLFile None No

Description

The full path of the .pem file containing the list of revoked certificates.

Connect to Replica Set

Key Name Default Value Required

EnableReplicaSet Clear (0) No

Description

This option specifies whether the driver can access replica sets in your MongoDBimplementation.

l Enabled (1): The driver can access replica sets in your MongoDBimplementation.

l Disabled (0): The driver cannot access replica sets.

Database

Key Name Default Value Required

Database test Yes

Description

The name of the MongoDB database that you want to access.

Documents to Fetch Per Block

Key Name Default Value Required

BatchSize 4096 No

Description

The maximum number of documents that a query returns at a time.

www.simba.com 53

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 54: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

This setting also determines the buffer size used when double-buffering is enabled.

Documents to Sample

Key Name Default Value Required

SamplingLimit 100 No

Description

The maximum number of records that the driver can sample to generate a temporaryschema definition. When this option is set to 0, the driver samples every document inthe database.

Typically, sampling a large number of documents results in a schema definitionthat is more accurate and better able to represent all the data in the database.However, the sampling process may take longer than expected when manydocuments are sampled, especially if the database contains complex, nesteddata structures.

Enable Double-Buffering

Key Name Default Value Required

EnableDoubleBuffer Selected (1) No

Description

This option specifies whether the driver retrieves the data using double-buffering. Formore information about double-buffering, see Double-Buffering on page 37.

l Enabled (1): The driver retrieves the data using double-buffering.l Disabled (0): The driver retrieves the data using single-buffering.

Enable Passdown

Key Name Default Value Required

EnablePassdownOptimization Selected (1) No

Description

This option specifies whether the driver optimizes joins between virtual tables, andpasses filtering and aggregation optimizations to the MongoDB database for handling.

www.simba.com 54

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 55: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

l Enabled (1): The driver optimizes joins between virtual tables, and passesfiltering and aggregation optimizations to the MongoDB database for handling.

l Disabled (0): The driver does not optimize joins, and does not pass filtering andaggregation optimizations to the MongoDB database.

Enable SSL

Key Name Default Value Required

SSL Clear (0) No

Description

This option specifies whether the driver uses SSL to connect to the server.

l Enabled (1): The driver uses SSL to connect to the server.l Disabled (0): The driver does not use SSL to connect to the server.

Expose Binary as SQL_LONGVARBINARY

Key Name Default Value Required

UseSqlLongVarbinary 1 No

Description

This option specifies whether the driver returns Binary columns as data of type SQL_LONGVARBINARY or SQL_VARBINARY.

l Enabled (1): The driver returns Binary columns as SQL_LONGVARBINARYdata.

l Disabled (0): The driver returns Binary columns as SQL_VARBINARY data.

Expose Strings as SQL_WVARCHAR

Key Name Default Value Required

UseSqlWVarchar Selected (1) No

Description

This option specifies how the String data type is mapped to SQL.

www.simba.com 55

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 56: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

l Enabled (1): The MongoDBString data type is mapped to SQL_WVARCHAR.l Disabled (0): The MongoDBString data type is mapped to SQL_VARCHAR.

Journaled Writes

Key Name Default Value Required

WriteConcernJournaled Clear (0) No

Description

This option specifies whether the driver requires that the data from a write operation tobe committed to the journal before the write operation can be acknowledged.

l Enabled (1): The driver requires that the data from a write operation to becommitted to the journal before the write operation can be acknowledged.

l Disabled (0): The driver does not require that the data from a write operation tobe committed to the journal before the write operation can be acknowledged.

This option is only applicable when the Write Concern option or theWriteConcern key is enabled.

Local File

Key Name Default Value Required

LocalMetadataFile None Yes, if the metadatamechanism is set to LocalFile orLoadMetadataTable=0

Description

The full path of a local JSON file containing the schema definition that you want thedriver to use when connecting to MongoDB.

Mechanism (Authentication)

Key Name Default Value Required

AuthMechanism No Authentication(None)

No

www.simba.com 56

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 57: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

Description

This section describes the Mechanism option from the Simba MongoDB ODBCDriver DSN Setup dialog box. For information about the Mechanism optionfrom the Advanced Options dialog box, see Mechanism (Metadata) on page57.

The authentication mechanism to use, selected from the following:

l No Authentication (None): The driver does not authenticate the connection.l MongoDB User Name and Password (SCRAM-SHA-1): The driver authenticatesthe connection using your MongoDB user name and password.

l Kerberos (GSSAPI): The driver authenticates the connection using the Kerberosprotocol.

l LDAP (PLAIN): The driver authenticates the connection using the LDAPprotocol.

Mechanism (Metadata)

Key Name Default Value Required

LoadMetadataTable Database (1) No

Description

This section describes the Mechanism option from the Advanced Optionsdialog box. For information about the Mechanism option from the SimbaMongoDB ODBC Driver DSN Setup dialog box, see Mechanism(Authentication) on page 56.

This option specifies where the driver looks for the schema definition.

l Database (1): The driver loads the schema definition from the MongoDBdatabase.

l Local File (0): The driver loads the schema definition from the JSON filespecified in the Local File field or the LocalMetadataFile key.

Password

Key Name Default Value Required

PWD None Yes, if the authenticationmechanism is MongoDBUser Name andPassword or LDAP.

www.simba.com 57

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 58: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

Description

The password corresponding to the user name that you provided in the Username fieldor UID key.

PEM Key File

Key Name Default Value Required

sslPEMKeyFile None No

Description

The full path of the .pem file containing the certificate for verifying the client.

PEM Key Password

Key Name Default Value Required

sslPEMKeyPwd None No

Description

The password of the client certificate file that is specified in the PEM Key File field(sslPEMKeyFile).

Port

Key Name Default Value Required

Port 27017 Yes

Description

The number of the TCP port that the MongoDB server uses to listen for clientconnections.

Replica Set Name

Key Name Default Value Required

ReplicaSet None Yes, if connecting to areplica set.

www.simba.com 58

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 59: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

Description

The name of the replica set for the driver to access.

This option is only available when the Connect to Replica Set option or theEnableReplicaSet key is enabled.

Sampling Method

Key Name Default Value Required

SamplingStrategy Forward No

Description

This options specifies how the driver samples data when generating a temporaryschema definition.

l Forward:The driver samples data starting from the first record in the database,then samples the next record, and so on.

l Backwards: The driver samples data starting from the last record in thedatabase, then samples the preceding record, and so on.

Secondary Servers

Key Name Default Value Required

SecondaryServers None No

Description

A comma-separated list of the servers that you need to use when connecting to areplica set. You can indicate the TCP port that the server is using to listen for clientconnections by appending a colon (:) and the port number to the server name or IPaddress.

Server

Key Name Default Value Required

Server None Yes

Description

The host name or IP address of the MongoDB server.

www.simba.com 59

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 60: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

Service Name

Key Name Default Value Required

gssapiServiceName mongodb Yes, if the authenticationmechanism is Kerberos.

Description

The Kerberos service principal name of the MongoDB server.

Step Size

Key Name Default Value Required

SamplingStepSize 1 No

Description

The interval at which the driver samples records when scanning through the databaseto generate a temporary schema definition. For example, if you set this option to 2, thenthe driver samples every second record in the database.

String Column Size

Key Name Default Value Required

DefaultStringColumnLength 255 No

Description

The maximum number of characters that can be contained in STRING columns.

Timeout

Key Name Default Value Required

WriteConcernTimeout 0 No

Description

The maximum number of seconds that the driver waits for a secondary server toacknowledge a write operation before reporting that the operation has failed.

www.simba.com 60

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 61: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

When this option is set to 0, the driver does not time out. Instead, the driver waits untilall secondary servers acknowledge the write operation, and then reports that theoperation has succeeded.

This option is only applicable when the Write Concern option or theWriteConcern key is enabled.If you set the Write Concern option or the key to a value that is greater than 1,make sure that this option is not set to 0. This may cause the driver to waitindefinitely for replica set members to come online.

Username

Key Name Default Value Required

UID None Yes, if the authenticationmechanism is MongoDBUser Name andPassword or LDAP.

Description

The user name that you use to access the MongoDB database.

Write Concern

Key Name Default Value Required

WriteConcern 1 No

Description

The total number of primary and secondary servers that must acknowledge a writeoperation in order for the driver to report a successful write operation.

When this option is set to 0, the driver does not require write operations to beacknowledged.

www.simba.com 61

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 62: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

Be aware of the following:

l If you set this option to a value that is greater than 1, make sure to alsospecify an appropriate value for the Timeout setting or theWriteConcernTimeout key. Setting this option to a value greater than1 without specifying a timeout interval may cause the driver to waitindefinitely for replica set members to come online.

l The process for acknowledging a write operation typically takes fourtimes longer than an INSERT or UPDATE operation, but it is necessary iffault tolerance is important.

www.simba.com 62

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 63: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

Contact Us

If you have difficulty using the driver, please contact our Technical Support staff. Wewelcome your questions, comments, and feature requests.

Technical Support is available Monday to Friday from 8 a.m. to 6 p.m. Pacific Time.

To help us assist you, prior to contacting Technical Support please prepare adetailed summary of the client and server environment including operatingsystem version, patch level, and configuration.

You can contact Technical Support via:

l E-mail: [email protected] Web site: www.simba.coml Telephone: (604) 633-0008 Extension 3l Fax: (604) 633-0004

You can also follow us on Twitter @SimbaTech

www.simba.com 63

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 64: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

Third-Party Trademarks

Debian is a trademark or registered trademark of Software in the Public Interest, Inc. orits subsidiaries in Canada, United States and/or other countries.

Kerberos is a trademark of the Massachusetts Institute of Technology (MIT).

Linux is the registered trademark of Linus Torvalds in Canada, United States and/orother countries.

Mac, Mac OS, and OS X are trademarks or registered trademarks of Apple, Inc. or itssubsidiaries in Canada, United States and/or other countries.

Microsoft, MSDN, Windows, Windows Server, Windows Vista, and the Windows startbutton are trademarks or registered trademarks of Microsoft Corporation or itssubsidiaries in Canada, United States and/or other countries.

Red Hat, Red Hat Enterprise Linux, and CentOS are trademarks or registeredtrademarks of Red Hat, Inc. or its subsidiaries in Canada, United States and/or othercountries.

SUSE is a trademark or registered trademark of SUSE LLC or its subsidiaries inCanada, United States and/or other countries.

Ubuntu is a trademark or registered trademark of Canonical Ltd. or its subsidiaries inCanada, United States and/or other countries.

MongoDB and Mongo are trademarks or registered trademarks of MongoDB, Inc. or itssubsidiaries in Canada, the United States and/or other countries.

All other trademarks are trademarks of their respective owners.

www.simba.com 64

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 65: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

Third-Party Licenses

The licenses for the third-party libraries that are included in this product are listedbelow.

Cyrus SASL

Copyright (c) 1994-2012 Carnegie Mellon University. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, arepermitted provided that the following conditions are met:1. Redistributions of source code must retain the above copyright notice, this list of

conditions and the following disclaimer.2. Redistributions in binary form must reproduce the above copyright notice, this list

of conditions and the following disclaimer in the documentation and/or othermaterials provided with the distribution.

3. The name "Carnegie Mellon University" must not be used to endorse or promoteproducts derived from this software without prior written permission. Forpermission or any other legal details, please contactOffice of Technology TransferCarnegie Mellon University5000 Forbes AvenuePittsburgh, PA 15213-3890(412) 268-4387, fax: (412) [email protected]

4. Redistributions of any form whatsoever must retain the followingacknowledgment:"This product includes software developed by Computing Services at CarnegieMellon University (http://www.cmu.edu/computing/)."

CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITHREGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OFMERCHANTABILITY AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLONUNIVERSITY BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIALDAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OFUSE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR INCONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

dtoa

The author of this software is David M. Gay.

Copyright (c) 1991, 2000, 2001 by Lucent Technologies.

Permission to use, copy, modify, and distribute this software for any purpose withoutfee is hereby granted, provided that this entire notice is included in all copies of any

www.simba.com 65

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 66: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

software which is or includes a copy or modification of this software and in all copies ofthe supporting documentation for such software.

THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS ORIMPLIED WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR LUCENTMAKES ANY REPRESENTATION OR WARRANTY OF ANY KIND CONCERNINGTHE MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANYPARTICULAR PURPOSE.

Expat

Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd

Permission is hereby granted, free of charge, to any person obtaining a copy of thissoftware and associated documentation files (the "Software"), to deal in the Softwarewithout restriction, including without limitation the rights to use, copy, modify, merge,publish, distribute, sublicense, and/or sell copies of the Software, and to permitpersons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copiesor substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIESOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE ANDNOINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHTHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISINGFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OROTHER DEALINGS IN THE SOFTWARE.

ICU License - ICU 1.8.1 and later

COPYRIGHT AND PERMISSION NOTICE

Copyright (c) 1995-2014 International Business Machines Corporation and others

All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy of thissoftware and associated documentation files (the "Software"), to deal in the Softwarewithout restriction, including without limitation the rights to use, copy, modify, merge,publish, distribute, and/or sell copies of the Software, and to permit persons to whomthe Software is furnished to do so, provided that the above copyright notice(s) and thispermission notice appear in all copies of the Software and that both the abovecopyright notice(s) and this permission notice appear in supporting documentation.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIESOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE ANDNONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THECOPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE

www.simba.com 66

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 67: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES,OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA ORPROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHERTORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE ORPERFORMANCE OF THIS SOFTWARE.

Except as contained in this notice, the name of a copyright holder shall not be used inadvertising or otherwise to promote the sale, use or other dealings in this Softwarewithout prior written authorization of the copyright holder.

All trademarks and registered trademarks mentioned herein are the property of theirrespective owners.

OpenSSL

Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, arepermitted provided that the following conditions are met:1. Redistributions of source code must retain the above copyright notice, this list of

conditions and the following disclaimer.2. Redistributions in binary form must reproduce the above copyright notice, this list

of conditions and the following disclaimer in the documentation and/or othermaterials provided with the distribution.

3. All advertising materials mentioning features or use of this software must displaythe following acknowledgment:

"This product includes software developed by the OpenSSL Project for use in theOpenSSL Toolkit. (http://www.openssl.org/)"

4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used toendorse or promote products derived from this software without prior writtenpermission. For written permission, please contact [email protected].

5. Products derived from this software may not be called "OpenSSL" nor may"OpenSSL" appear in their names without prior written permission of theOpenSSL Project.

6. Redistributions of any form whatsoever must retain the followingacknowledgment:

"This product includes software developed by the OpenSSL Project for use in theOpenSSL Toolkit (http://www.openssl.org/)"

THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT "AS IS" AND ANYEXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR APARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSLPROJECT OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS

www.simba.com 67

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 68: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESSINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDINGNEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OFTHIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

This product includes cryptographic software written by Eric Young([email protected]). This product includes software written by Tim Hudson([email protected]).

Original SSLeay License

Copyright (C) 1995-1998 Eric Young ([email protected])

All rights reserved.

This package is an SSL implementation written by Eric Young ([email protected]).The implementation was written so as to conform with Netscapes SSL.

This library is free for commercial and non-commercial use as long as the followingconditions are aheared to. The following conditions apply to all code found in thisdistribution, be it the RC4, RSA, lhash, DES, etc., code; not just the SSL code. TheSSL documentation included with this distribution is covered by the same copyrightterms except that the holder is Tim Hudson ([email protected]).

Copyright remains Eric Young's, and as such any Copyright notices in the code are notto be removed. If this package is used in a product, Eric Young should be givenattribution as the author of the parts of the library used. This can be in the form of atextual message at program startup or in documentation (online or textual) providedwith the package.

Redistribution and use in source and binary forms, with or without modification, arepermitted provided that the following conditions are met:1. Redistributions of source code must retain the copyright notice, this list of

conditions and the following disclaimer.2. Redistributions in binary form must reproduce the above copyright notice, this list

of conditions and the following disclaimer in the documentation and/or othermaterials provided with the distribution.

3. All advertising materials mentioning features or use of this software must displaythe following acknowledgement:

"This product includes cryptographic software written by Eric Young([email protected])"

The word 'cryptographic' can be left out if the rouines from the library being usedare not cryptographic related :-).

4. If you include any Windows specific code (or a derivative thereof) from the appsdirectory (application code) you must include an acknowledgement:

"This product includes software written by Tim Hudson ([email protected])"

www.simba.com 68

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 69: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND ANY EXPRESSOR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIEDWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULARPURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR ORCONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUTNOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVERCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IFADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

The licence and distribution terms for any publically available version or derivative ofthis code cannot be changed. i.e. this code cannot simply be copied and put underanother distribution licence [including the GNU Public Licence.]

Stringencoders License

Copyright 2005, 2006, 2007

Nick Galbreath -- nickg [at] modp [dot] com

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, arepermitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list ofconditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright notice, this listof conditions and the following disclaimer in the documentation and/or othermaterials provided with the distribution.

Neither the name of the modp.com nor the names of its contributors may be usedto endorse or promote products derived from this software without specific priorwritten permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ANDCONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OFMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AREDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER ORCONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUTNOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVERCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)

www.simba.com 69

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 70: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IFADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

This is the standard "new" BSD license:

http://www.opensource.org/licenses/bsd-license.php

Apache License, Version 2.0

The following notice is included in compliance with the Apache License, Version 2.0and is applicable to all software licensed under the Apache License, Version 2.0.

Apache License

Version 2.0, January 2004

http://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION1. Definitions.

"License" shall mean the terms and conditions for use, reproduction, anddistribution as defined by Sections 1 through 9 of this document.

"Licensor" shall mean the copyright owner or entity authorized by the copyrightowner that is granting the License.

"Legal Entity" shall mean the union of the acting entity and all other entities thatcontrol, are controlled by, or are under common control with that entity. For thepurposes of this definition, "control" means (i) the power, direct or indirect, to causethe direction or management of such entity, whether by contract or otherwise, or (ii)ownership of fifty percent (50%) or more of the outstanding shares, or (iii)beneficial ownership of such entity.

"You" (or "Your") shall mean an individual or Legal Entity exercising permissionsgranted by this License.

"Source" form shall mean the preferred form for making modifications, includingbut not limited to software source code, documentation source, and configurationfiles.

"Object" form shall mean any form resulting from mechanical transformation ortranslation of a Source form, including but not limited to compiled object code,generated documentation, and conversions to other media types.

"Work" shall mean the work of authorship, whether in Source or Object form, madeavailable under the License, as indicated by a copyright notice that is included inor attached to the work (an example is provided in the Appendix below).

"Derivative Works" shall mean any work, whether in Source or Object form, that isbased on (or derived from) the Work and for which the editorial revisions,annotations, elaborations, or other modifications represent, as a whole, an originalwork of authorship. For the purposes of this License, Derivative Works shall not

www.simba.com 70

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 71: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

include works that remain separable from, or merely link (or bind by name) to theinterfaces of, the Work and Derivative Works thereof.

"Contribution" shall mean any work of authorship, including the original version ofthe Work and any modifications or additions to that Work or Derivative Worksthereof, that is intentionally submitted to Licensor for inclusion in the Work by thecopyright owner or by an individual or Legal Entity authorized to submit on behalfof the copyright owner. For the purposes of this definition, "submitted" means anyform of electronic, verbal, or written communication sent to the Licensor or itsrepresentatives, including but not limited to communication on electronic mailinglists, source code control systems, and issue tracking systems that are managedby, or on behalf of, the Licensor for the purpose of discussing and improving theWork, but excluding communication that is conspicuously marked or otherwisedesignated in writing by the copyright owner as "Not a Contribution."

"Contributor" shall mean Licensor and any individual or Legal Entity on behalf ofwhom a Contribution has been received by Licensor and subsequentlyincorporated within the Work.

2. Grant of Copyright License. Subject to the terms and conditions of this License,each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepareDerivative Works of, publicly display, publicly perform, sublicense, and distributethe Work and such Derivative Works in Source or Object form.

3. Grant of Patent License. Subject to the terms and conditions of this License, eachContributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent licenseto make, have made, use, offer to sell, sell, import, and otherwise transfer theWork, where such license applies only to those patent claims licensable by suchContributor that are necessarily infringed by their Contribution(s) alone or bycombination of their Contribution(s) with the Work to which such Contribution(s)was submitted. If You institute patent litigation against any entity (including across-claim or counterclaim in a lawsuit) alleging that the Work or a Contributionincorporated within the Work constitutes direct or contributory patentinfringement, then any patent licenses granted to You under this License for thatWork shall terminate as of the date such litigation is filed.

4. Redistribution. You may reproduce and distribute copies of the Work orDerivative Works thereof in any medium, with or without modifications, and inSource or Object form, provided that You meet the following conditions:

(a) You must give any other recipients of the Work or Derivative Works a copy ofthis License; and

(b) You must cause any modified files to carry prominent notices stating that Youchanged the files; and

(c) You must retain, in the Source form of any Derivative Works that Youdistribute, all copyright, patent, trademark, and attribution notices from theSource form of the Work, excluding those notices that do not pertain to any

www.simba.com 71

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 72: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

part of the Derivative Works; and

(d) If the Work includes a "NOTICE" text file as part of its distribution, then anyDerivative Works that You distribute must include a readable copy of theattribution notices contained within such NOTICE file, excluding those noticesthat do not pertain to any part of the Derivative Works, in at least one of thefollowing places: within a NOTICE text file distributed as part of the DerivativeWorks; within the Source form or documentation, if provided along with theDerivative Works; or, within a display generated by the Derivative Works, ifand wherever such third-party notices normally appear. The contents of theNOTICE file are for informational purposes only and do not modify theLicense. You may add Your own attribution notices within Derivative Worksthat You distribute, alongside or as an addendum to the NOTICE text from theWork, provided that such additional attribution notices cannot be construed asmodifying the License.

You may add Your own copyright statement to Your modifications and mayprovide additional or different license terms and conditions for use, reproduction,or distribution of Your modifications, or for any such Derivative Works as a whole,provided Your use, reproduction, and distribution of the Work otherwise complieswith the conditions stated in this License.

5. Submission of Contributions. Unless You explicitly state otherwise, anyContribution intentionally submitted for inclusion in the Work by You to theLicensor shall be under the terms and conditions of this License, without anyadditional terms or conditions. Notwithstanding the above, nothing herein shallsupersede or modify the terms of any separate license agreement you may haveexecuted with Licensor regarding such Contributions.

6. Trademarks. This License does not grant permission to use the trade names,trademarks, service marks, or product names of the Licensor, except as requiredfor reasonable and customary use in describing the origin of the Work andreproducing the content of the NOTICE file.

7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing,Licensor provides the Work (and each Contributor provides its Contributions) onan "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,either express or implied, including, without limitation, any warranties orconditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESSFOR A PARTICULAR PURPOSE. You are solely responsible for determiningthe appropriateness of using or redistributing the Work and assume any risksassociated with Your exercise of permissions under this License.

8. Limitation of Liability. In no event and under no legal theory, whether in tort(including negligence), contract, or otherwise, unless required by applicable law(such as deliberate and grossly negligent acts) or agreed to in writing, shall anyContributor be liable to You for damages, including any direct, indirect, special,incidental, or consequential damages of any character arising as a result of thisLicense or out of the use or inability to use the Work (including but not limited todamages for loss of goodwill, work stoppage, computer failure or malfunction, or

www.simba.com 72

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 73: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

any and all other commercial damages or losses), even if such Contributor hasbeen advised of the possibility of such damages.

9. Accepting Warranty or Additional Liability. While redistributing the Work orDerivative Works thereof, You may choose to offer, and charge a fee for,acceptance of support, warranty, indemnity, or other liability obligations and/orrights consistent with this License. However, in accepting such obligations, Youmay act only on Your own behalf and on Your sole responsibility, not on behalf ofany other Contributor, and only if You agree to indemnify, defend, and hold eachContributor harmless for any liability incurred by, or claims asserted against, suchContributor by reason of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following boilerplate notice,with the fields enclosed by brackets "[]" replaced with your own identifyinginformation. (Don't include the brackets!) The text should be enclosed in theappropriate comment syntax for the file format. We also recommend that a file orclass name and description of purpose be included on the same "printed page" asthe copyright notice for easier identification within third-party archives.

Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License"); you may notuse this file except in compliance with the License. You may obtain a copy ofthe License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributedunder the License is distributed on an "AS IS" BASIS, WITHOUTWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.

This product includes software that is licensed under the Apache License, Version 2.0(listed below):libbsonCopyright © 2013-2015 MongoDB, Inc.MongoDB C DriverCopyright © 2013-2015 MongoDB, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use thisfile except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed underthe License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR

www.simba.com 73

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide

Page 74: SimbaMongoDBODBCDriverwith SQLConnector … · 2016-10-18 · Features 37 Authentication 37 CatalogSupport 37 Double-Buffering 37 SQLConnector 38 DataTypes 38 SchemaDefinitions 42

CONDITIONS OF ANY KIND, either express or implied. See the License for thespecific language governing permissions and limitations under the License.

www.simba.com 74

Simba MongoDB ODBC Driver with SQLConnector Installation and Configuration Guide