mongodbpowerbimongo-driver

Unable to Configure ODBC for MongoDB on Windows 11


I'm facing issues while trying to configure ODBC on Windows 11. I need to add the MongoDb driver (1.4.5 v) to the system DNS but it's pratically impossible to do it.

I have followed this tutorial in order to create the system DSN. What i've done so far:

1- Installed the MongoDB driver 1.4.5 ( both 32 and 64 bits) MongoDb driver msi file

2- Installed the (2.14.12)MongoDB BI Connector

[] (https://i.sstatic.net/82WLe93T.png)

3- Installed the "Visual C++ Redistributable for visual studio 2015" as the docs recommend enter image description here

4 - Tried to add the MongoDB driver to the system DNS 1/2 2/2

5- Added the appropriate connections (ip adress to the server and port), username and password and pressed "test connection"

At the 5th step, the whole ODBC freeze and I can't add the driver to the system DNS. I've done this with the 32 and 64 ODBC with MongoDB driver (for 32 and 64 bits respectively).

Additional steps I've taken:

Restarted my machine. Pinging the server to ensure it is live (it is). Here are my system specifications:

I'm not sure how to proceed from here. Has anyone faced a similar issue or can suggest a solution?


Solution

  • You missed one step. You downloaded and installed the MongoDB BI Connector but you did not create any service. The MongoDB BI Connector is a service which connects to your MongoDB and transforms the MonogDB BSON docuemnts into "SQL-like" data and then populates it to ODBC compliant data.

    See What is the MongoDB Connector for BI?

    You need to setup the mongosqld service, see https://www.mongodb.com/docs/bi-connector/current/reference/mongosqld/

    Here is a sample mongosqld configuration file:

    ## https://docs.mongodb.com/bi-connector/master/reference/mongosqld/#configuration-file
    
    net:
      bindIp: localhost
      port: 3317
      ssl:
        mode: disabled
    
    mongodb:
      net:
        uri: "mongodb://localhost:27017"
        ssl:
          enabled: false
        auth:
          username: admin
          password: secret
          source: admin
          mechanism: SCRAM-SHA-256
    
    security:
      enabled: true
      defaultMechanism: SCRAM-SHA-256
      defaultSource: admin
    
    systemLog:
      path: C:\MongoDB\log\mongosql.log 
      quiet: false
      verbosity: 1
      logAppend: true
    
    schema:
      refreshIntervalSecs: 0
      stored:
        mode: "auto"
        source: "mongosqld_data"
        name: "myDatabase" # the named schema to read/write to in stored-schema modes
      sample:
        size: 1000 # The amount of random documents we sample from each collection.
        namespaces: ["myDatabase.*"]
    
    processManagement:
      service:
        name: "mongosql"
        displayName: "MongoSQL Standalone"
        description: "MongoSQL accesses MongoDB - Standalone data with SQL"
    

    When the configuration file is created, you can create and start the service for example with

    mongosqld.exe install --config=c:\MongoDB\config\mongosqld.yml
    net start mongosql
    

    Then the ODBC DNS should work:

    enter image description here