DSN import export

User avatar
sal21
PlatinumLounger
Posts: 4355
Joined: 26 Apr 2010, 17:36

DSN import export

Post by sal21 »

Possible to export and import all listof DSN, from PC1 to PC2?
Tks

User avatar
HansV
Administrator
Posts: 78474
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: DSN import export

Post by HansV »

There are three types of DSNs:

1) Machine DSNs. These are stored in the registry, in the key HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI. You can export this key to a .reg file, and import it on another computer using Regedit.exe.
2) User DSNs. These are stored in the registry, in the key HKEY_CURRENT_USER\Software\ODBC\ODBC.INI. You can export this key to a .reg file, and import it on another computer using Regedit.exe.
3) File DSNs. These are files with extension .dsn. They could be stored anywhere, but the default location is C:\Users\<username>\Documents\My Data Sources. You can simply copy and paste these files.
Best wishes,
Hans