Modify ODBC System DSNs with scripts
Hi All;
I work in Windows 7 and have set System DSNs for our SQL servers. We have several of them each corresponding to a different environment ( dev vs uat vs production ) and I have to constantly switch from one environment to another for debugging and/or testing.
I was wondering if there was a way to modify the settings (only need to change the SQL Server name) via a command line, script or powershell without having to open the ODBC control panel all the time?
kaedee
August 16th, 2012 4:21pm
You should be able to modify this setting in the registry as memory serves. Once you've added the ODBC connection, have a search through for the target server name and you should quickly find the string you need to modify.
Free Windows Admin Tool Kit Click here and download it now
August 16th, 2012 8:45pm
Here is what I did;
* opened regedit
* found the key i needed to change
* exported the key as a .reg file
* made the changes I needed to the .reg file
now I am able to apply the changes to the database name simply by opening/executing the .reg files
thanks
August 17th, 2012 4:30pm


