views:

28

answers:

2

I am trying to create a script such that I am given an array of server names and from these names I would like to create a system dsn on each of those respective machines.

I know that you can use SQLConfigDataSource() to create a dsn on your local machine, but it does not seem to give any parameters for creating the dsn on a separate machine.

Are there any functions that can achieve this result?

A: 

You can definitely do it, worst case you could just write the registry entries manually. To do that download Process Monitor, set it up to monitor registry changes and then create the DSN locally and you'll see what settings you need to change.

Here's an article discussing that approach also (from a script perspective, but should be easy to do in C#).

ho1
+1  A: 

I would recommend using ps-exec for a task like this.

unclepaul84
thanks, it worked perfectly
Mad Gibberish