0

I need to replicate the ODBC drivers from one environment to another located on other server, the one that has the drivers I want to backup is running Windows Server 2012 Datacenter and the other Windows Server 2016 Standard (in case it matters). The problem is I don't figure a way out to backup/restore lots of ODBC drivers that the projects hosted on these servers need to work properly.

Are the drivers listed on the tabs System DSN, User DSN and File DSN stored physically on any directory of the server?

ODBC Data Source Administrator

What would the best practice to replicate/backup all the drivers listed from one server to the other so that I do not need to recreate them manually?

I would appreciate if there were a way of automating it by means of PowerShell script or something alike.

Vladimir
  • 33
  • 1
  • 1
  • 5
  • A quick google search for `powershell dsn` reveals [Add-OdbcDsn](https://docs.microsoft.com/en-us/powershell/module/wdac/add-odbcdsn?view=win10-ps) and [Get-OdbcDsn](https://technet.microsoft.com/de-de/library/hh771015(v=wps.630).aspx). I assume you already tried them? – Gerald Schneider Nov 08 '18 at 17:56
  • I didn't figure a way of making a backup of the ODBC drivers. I would like to know it they are stored somewhere on the server disk and how to deal with replicating them. I work with databases, I'm not a shell programmer. – Vladimir Nov 08 '18 at 18:01

1 Answers1

4

Export the DSN into a file:

Get-OdbcDsn |Export-Clixml dsn.xml

Import it again

Import-Clixml dsn.xml |Add-OdbcDsn
Gerald Schneider
  • 19,757
  • 8
  • 52
  • 79