ODBC: trouble removing system DSN

I have a colleague who has two DSNs with the same name - one's a user DSN and the other, a system one. He removed the user DSN but can't remove the system DSN in ODBCad32

Anybody encountered this before?


Solution 1:

I've seen this where a trailing period (.) was inserted at some point in the registry key backing the DSN, and it wouldn't edit or delete. Is it an Oracle DSN? If not, what driver is it using?

First test if you can add or remove another DSN, or if the whole panel has become useless.

Check which panel you're using. There's sometimes 2 copies of the panel in C:\Windows\SysWOW64\odbcad32.exe (surprisingly, 32-bit) and C:\Windows\system32\odbcad32.exe (surprisingly, 64-bit). Try both.

Next, try looking for the entry under HKLM/Software/ODBC. You may be able to edit or strip the entry there.

User DSNs show up in both panels, but only the bitness-matching Admin can delete or edit one.

Solution 2:

Sounds like it may be a permissions issue. System DSNs are per-computer irrespective of who logs on, so you will need administrative access to the machine in order to remove or change it.

If you already have administrative access you will need to check the security on the key and take ownership if necessary.

Solution 3:

I've just found a problem with the Jet drivers that might possibly apply to other ODBC drivers: If you create or modify a System DSN, and there is a User DSN with the same name, then the System DSN registry settings are incomplete - I gather they go into the User DSN config, instead.

The System DSN appears to work, because (at least the Jet) drivers look for both System DSN registry entries (under HKLM) and the User DSN entries (under HKCU). If you delete the User DSN, you get left with an incomplete System DSN - and your ODBC driver might not be robust enough to handle that.

FWIW, Dan Konigsbach