About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.
The message ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified. means the ODBC Driver Manager could not resolve the DSN or driver name in the application's connection string. On a 64-bit Windows server, Microsoft ties it to a mismatch of 32-bit and 64-bit: the application, the driver and the tool that created the DSN must all be the same width.
Read what the application is asking for, then read what is registered, before you create or change anything. Microsoft lists its checks in order, and they are about names, bit-width and the account that runs the application, after the server name, database name and driver are validated.
What the error means
Microsoft's "ODBC driver installation check" page states it plainly: "This error means that the ODBC Driver Manager couldn't resolve the DSN or driver name in the connection string." A Data Source Name (DSN) is a shortcut that holds the driver and server settings; a connection string can instead name the driver directly (a DSN-less connection). Microsoft's examples are driver={ODBC Driver 18 for SQL Server};server=sqlprod01;database=AdventureWorks;trusted_connection=yes for DSN-less, and dsn=userdsn1 or dsn=test;uid=<user name>;pwd=<password> for a DSN.
On 64-bit versions of Windows there are two copies of the ODBC Data Source Administrator, and each manages the drivers and System DSNs that match its own width. Microsoft says: "A 32-bit application can't load a 64-bit ODBC driver, and a 64-bit application can't load a 32-bit ODBC driver." Both are named odbcad32.exe, so "the folder path determines which one you open". Registry redirection stores them apart: 64-bit drivers and System DSNs under HKEY_LOCAL_MACHINE\SOFTWARE\ODBC, 32-bit ones under HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC, and User DSNs under HKEY_CURRENT_USER\Software\ODBC for both.
User DSNs behave differently. Microsoft's other page, about user DSNs in 64-bit Windows, says that "both the 32-bit and 64-bit ODBC Administrator tools (Odbcad32.exe) display all user data source names (DSNs), regardless of driver architecture", so a user DSN can appear in the tool and still fail for an application of the other width. Its example is a user DSN for the 32-bit driver "Microsoft Access Driver (*.mdb)", which has no 64-bit version: a 64-bit application is shown the DSN and gets the IM002 message when it connects.
Likely causes
| Cause | What you see | How to confirm |
|---|---|---|
| DSN name in the connection string matches no DSN | IM002 on connect | Compare the name against the DSN list in the matching ODBC Administrator |
| Driver width does not match the application | The DSN is listed but the connection fails | Check the Drivers tab in the copy of the tool that matches the application |
| System DSN made in the wrong copy of the tool | The DSN is missing in the application's view | Microsoft says a System DSN made in the 64-bit tool "isn't available to a 32-bit application" |
| User DSN in another account | Works when you sign in, fails as a service | Microsoft says a User DSN "isn't visible to a service that runs under a different account" |
| Driver name in a DSN-less string is wrong | IM002 with driver= in the string |
The name must match a driver under the ODBCINST.INI subkey; spelling and punctuation must match exactly |
| Driver registered but its DLL is missing | Entry exists, load fails | Microsoft: "A registry entry that references a missing or moved DLL is a common cause of load failures after an uninstall, an upgrade, or a manual file cleanup" |
Prove the cause before changing anything
All of these only read.
- Find the exact connection string or DSN name the application uses, from its own configuration. Microsoft's pages do not say how to read an application's bit-width, so get that from the application's vendor or its documentation.
- Open the ODBC Administrator that matches the application, from the Run box. For 64-bit applications:
C:\WINDOWS\SYSTEM32\ODBCAD32.EXE
For 32-bit applications:
C:\WINDOWS\SYSWOW64\ODBCAD32.EXE
- On the Drivers tab, check that a driver with the name in the connection string is listed. On the System DSN and User DSN tabs, check that the DSN name is listed.
- Read the registry for the three DSN locations Microsoft names. The first is the 64-bit System DSNs, the second the 32-bit System DSNs, the third the User DSNs of the account you are signed in as:
reg query "HKLM\SOFTWARE\ODBC\ODBC.INI"
reg query "HKLM\SOFTWARE\Wow6432Node\ODBC\ODBC.INI"
reg query "HKCU\Software\ODBC\ODBC.INI"
- For the drivers, run the same commands against the
ODBCINST.INIsubkey in each of those locations, which Microsoft says "lists all the drivers". Confirm that the driver path listed there points to a DLL that exists.
Example (illustrative): on app01 at contoso.com.au a 32-bit line-of-business service running as CONTOSO\svc-app reads the DSN PAYROLL. The administrator created PAYROLL as a System DSN from the Control Panel shortcut, which opens the 64-bit tool. The service logs the IM002 message. In the 32-bit tool (C:\WINDOWS\SYSWOW64\ODBCAD32.EXE) the System DSN tab is empty, and reg query "HKLM\SOFTWARE\Wow6432Node\ODBC\ODBC.INI" shows no PAYROLL, while the 64-bit key has it. That matches Microsoft's statement that a System DSN made in the 64-bit tool is not available to a 32-bit application.
Fix
Work through Microsoft's checks in order and stop at the one that fails. For a missing System DSN, the change is to create it in the copy of the tool that matches the application, with a driver of the same width installed.
Before you create it, save the DSN registry keys of the width you will change. For the 32-bit tool, export the 32-bit System DSN key to a new file name:
reg export "HKLM\SOFTWARE\Wow6432Node\ODBC\ODBC.INI" C:\Temp\odbcini-32-before.reg
For the 64-bit tool, export the 64-bit System DSN key instead:
reg export "HKLM\SOFTWARE\ODBC\ODBC.INI" C:\Temp\odbcini-64-before.reg
Create C:\Temp first if it does not exist, and do not reuse a file name from an earlier export. Do not add /y: Microsoft says it overwrites an existing file without prompting.
If the export reports that the key cannot be found, no System DSN of that width exists yet. There is then nothing to save and no file to import, and the way back is only to remove the DSN you add in the tool.
Risk: a System DSN is visible to every user and service on the server, which is why Microsoft says to use it for services and web applications. If a System DSN with the same name already exists in that tool, the new entry can clash with it, and every application that uses that name is affected. Check the DSN list first and use a name that is not taken.
In the ODBC Administrator that matches the application:
- Open the Drivers tab and confirm the driver is listed. If it is not listed, stop here: Microsoft's page says to reinstall the driver and then check the registry keys, and a driver reinstall is a separate change that needs its own plan.
- Create the DSN on the System DSN tab (Microsoft says a service or web application needs a System DSN, not a User DSN).
- Run a connection test. Microsoft says "A successful test confirms that the driver loads and that the server is reachable."
Microsoft's user DSN page suggests naming the DSNs so the width is visible, adding "_32" to 32-bit user DSNs and "_64" to 64-bit ones. Apply that to new DSNs only; renaming a DSN an application already uses would cause an IM002 of its own.
To undo it: open the same copy of the ODBC Administrator, select the DSN you added, and remove it. Microsoft's page says to use the 32-bit tool to configure or remove a DSN that uses a 32-bit driver. If the export reported a missing key, removing the DSN is the whole back-out; do not run the import. If the export succeeded and creating the DSN replaced an existing entry of the same name, run the import in an elevated Command Prompt for the saved file of that width. Microsoft's reg import page says only that it imports the file's contents into the registry, so check the DSN list afterwards, and remove any entry that was added after the export and that you do not want:
reg import C:\Temp\odbcini-32-before.reg
or for the 64-bit key:
reg import C:\Temp\odbcini-64-before.reg
Use the line that matches the file you exported. If you use the 64-bit tool on a DSN that uses a 32-bit driver, Microsoft says you receive "The specified DSN contains an architecture mismatch between the Driver and Application", and the answer is to use the 32-bit tool.
For a DSN-less connection string, no DSN is created and the change is to the application's own configuration. Before you change it, copy the application's configuration file or setting to a new name and write down the current driver= value. Microsoft notes that driver and DSN names are not case-sensitive but that spelling and punctuation must match.
Risk: the next step edits the application's configuration. A wrong driver name leaves the application unable to connect at all, and every user of that configuration is affected.
Change the driver= value so that it matches, exactly, a driver name listed on the Drivers tab of the matching tool.
To undo it: put the driver= value you wrote down back into the configuration, or copy the saved copy back. Do not overwrite the saved copy.
Confirm the fix
- Run the connection test in the matching tool again; it should succeed.
- Start the application or service under the account it runs as, not under your own, because a User DSN only exists for the account that created it.
- Check that the IM002 message is gone from the application's log. Microsoft says that if the driver loads and the connection still fails, "the problem is usually network, authentication, or encryption related rather than an installation problem", so a new, different error is a different fault.
What to watch afterwards
- A driver upgrade or uninstall. Microsoft names uninstalls, upgrades and manual cleanups as the way a registry entry ends up pointing at a missing DLL.
- Copying DSNs between servers. A System DSN exists in one width only, so move it with the tool of the same width.
- Non-Microsoft drivers. Microsoft says driver behaviour and installation logic "remain the responsibility of the vendor that produced the driver".
Read next
Related articles you may want next.
- TroubleshootingIIS web app gets "access denied" on a folder or share: grant the application pool identity, not EveryoneWhen a site on IIS cannot read or write a file, the account that needs permission is the application pool identity, IIS AppPool\<pool name>, or the server's computer account for a network share. Grant that account only the access it needs.Read article
- Troubleshooting"Error 1069: The service did not start due to a logon failure" after a password changeSQL Server error 1069 logon failure after a password change: read the event text, test the credentials with runas, then update the service's password.Read article
- TroubleshootingASP.NET Core Will Not Start on IIS: Diagnose 500.30 and 500.31Match the hosting-module error to runtime, deployment and startup evidence and select a scoped correction.Read article
Risks and limits
These commands have not been run or lab-tested.
Microsoft's pages do not give a Windows version range for the 32-bit and 64-bit behaviour, and they do not explain how to determine whether a given application is 32-bit or 64-bit. The reg query commands list entries; they do not show whether a driver DLL loads. Microsoft's pages describe SQL Server drivers in their examples and say that for non-Microsoft drivers Microsoft support is limited to checking registry keys and paths, creating a test DSN, and helping capture a Process Monitor trace.
Sources
- ODBC driver installation check — Microsoft Learn, page dated 2026-08-31, accessed 22 November 2026
- ODBC Administrator tool displays 32-bit and 64-bit user DSNs in 64-bit Windows — Microsoft Learn, page dated 2026-11-20, accessed 22 November 2026
- reg query — Microsoft Learn, page dated 2023-02-03, accessed 22 November 2026
- reg export — Microsoft Learn, page dated 2023-02-03, accessed 22 November 2026
- reg import — Microsoft Learn, page dated 2023-02-03, accessed 22 November 2026
This article was originally published on .