1

What's the best way to do a mass update of an SQL Server ODBC system DSN (change the server name)? Group policy? A Login script? Something else? It's an Active Directory domain (windows 2003) with mostly Windows XP clients, but there are some Windows 2000 and Vista clients. All clients need to be updated. Example(s) please.

Thanks

Zoredache
  • 128,755
  • 40
  • 271
  • 413
Booji Boy
  • 295
  • 2
  • 5
  • 11

1 Answers1

3

I don't have any examples, but this should get you started. System DSN data is stored in both the registry and an ini file.

// registry location
HKLM\SOFTWARE\ODBC\ODBC.INI

// filesystem location
%WINDIR%\ODBC.INI

On my Vista x64 machine, the server name value is stored in the registry only and should be easy enough to change with a simple login script. Specifically, the value is stored here:

HKLM\SOFTWARE\ADBC\ODBC.INI\MyDSNname
Server = sqlhost.mydomain.com (REG_SZ)

Ryan Bolger
  • 16,472
  • 3
  • 40
  • 59