Exporting ODBC System DSNs from a windows 2003 machine?

Zaffiro picture Zaffiro · Feb 4, 2011 · Viewed 50.8k times · Source

Is there a way to export all the ODBC System DSNs from a windows 2003 machine?

Answer

Garett picture Garett · Feb 4, 2011

System DSN information is stored under the HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI registry key. You could export that key to a .reg file and import on another machine.

UPDATE:

You can also do it programmatically. Here are a few examples:

http://www.codeproject.com/KB/database/DSNAdmin.aspx

http://support.microsoft.com/kb/110507

http://blogs.technet.com/b/heyscriptingguy/archive/2004/11/10/can-i-create-and-delete-a-dsn-using-a-script.aspx