Connecting with SQL to MongoDB
Build a MongoDB SQL Query
To learn how to build a MongoDB SQL query, see Query with MongoSQL Statements.
Troubleshooting & Log Files
ODBC Logs
On the machine where your SQL Interface ODBC driver is installed,
you can find the ODBC Logs in <user>/Documents/Mongodb/Atlas SQL ODBC/<version>/logs/mongo_odbc
.
SQL Trace Logs
For additional insights into your queries and connections, you can enable the SQL Trace log through the ODBC Administrator.
The SQL Trace log may provide additional information related to issues with your queries and potentially with your connection as well, because on connection a query may be issued to present db namespaces.
Note
After you retrieve the log, be sure to disable SQL Trace, as it is resource intensive.
JDBC logs
The JDBC Log file, jprotocolserver.log
, is stored in different locations
depending on your BI Tool. If you are using Tableau, the JDBC Log file is
stored in Documents > My Tableau Repository > Logs. For tools other than Tableau,
please search for the jprotocolserver.log
.
Tool and user configurations can impact the placement and collection of these logs. The above information is based on default settings.
MongoDB SQL Error Codes
You can find a list of MongoDB SQL error codes in the MongoDB SQL Error Codes documentation.