cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

ODBC driver-System.Data.Odbc.OdbcException: 'ERROR [IM002] [Microsoft][ODBC Driver Manager] Data sou

Karthik_2
Visitor

Hi there,

I’m working on a POC to connect a C# application to query tables from Unity Catalog using the ODBC connector. Currently, I’m testing this locally using Visual Studio. I followed the steps in the ODBC documentation, but I’m encountering the following error:

Exception thrown: 'System.Data.Odbc.OdbcException' in System.Data.Odbc.dll
An unhandled exception of type 'System.Data.Odbc.OdbcException' occurred in System.Data.Odbc.dll
ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified.

Could you please guide me on how to resolve this issue? Additionally, once this is resolved, would it be feasible to implement the same functionality in a .NET web application hosted in Azure?

Thank you for your help!

1 REPLY 1

Walter_C
Databricks Employee
Databricks Employee

The error message you encountered, "ERROR [ODBC Driver Manager] Data source name not found and no default driver specified," typically indicates that the ODBC driver manager cannot find the specified data source name (DSN) or that no default driver is specified.

Here are some steps to troubleshoot and resolve this issue:

  1. Verify DSN Configuration:

    • Ensure that the DSN you are trying to use is correctly configured in the ODBC Data Source Administrator.
    • Check if the DSN is defined as a User DSN or System DSN. If your application runs under a different user account, it might not have access to User DSNs. In such cases, define the DSN as a System DSN.
  2. Check Driver Installation:

    • Confirm that the ODBC driver required for your data source is installed on your system. If not, download and install the appropriate driver.
  3. Match Bitness:

    • Ensure that the bitness (32-bit or 64-bit) of your application matches the bitness of the ODBC driver. For example, if your application is 64-bit, you need to use the 64-bit ODBC driver and configure the DSN in the 64-bit ODBC Data Source Administrator.
  4. Connection String:

    • If you are using a connection string, ensure that it is correctly formatted and includes all necessary parameters. For example: "Driver={ODBC Driver};Server=server_address;Database=database_name;Uid=username;Pwd=password;"
  5. Permissions:

    • Verify that the user account running the application has the necessary permissions to access the DSN and the underlying database.
  6. Test Connection:

    • Use the ODBC Data Source Administrator to test the connection. This can help identify if the issue is with the DSN configuration or the application.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group