Thursday 22 March 2012

Connect to many server

Hello,

I asked this question before and being told to use configuration table to connect multiple server. Here is the question again

Problem: I need to connect around 50 different server and run the script (which creates a temp table and returned the result set which I need to insert or update to table)

I try to create configuration table added my servers there by when I am runing the package it is only running against one server only where is connection is created.

Here is SSIS Configuration table

ServerName, sqlserver1, \Package.Connectionsnstm0621dap.MSSQLCentral].Properties[ServerName], String

ServerName, sqlserver2, \Package.Connectionsnstm0621dap.MSSQLCentral].Properties[ServerName], String

ServerName, sqlserver3, \Package.Connectionsnstm0621dap.MSSQLCentral].Properties[ServerName], String

the package is only running againt the nstm0621dap server and not taking servername from config table.

Any help is appreciated.

Thanks

--

Farhan

Hi Farhan

Im doing almost similar thing.. well only with one server right now (im getting better with ssis as time goes by), but extract data from a lot of different tables with same schema.

I'll soon be facing the same scenario as you, my knowledge is very limited right now regarding the configuration table. I guess you're trying to connect to one server at a time and run the scripts you described.

Could the reason be that the SSIS Configuration table don't support multivalues?
The way I would do it would be to create a table on my mainserver, read it and use a foreach container and iterate through the different servers...

Maybe I don't understand your question

|||Well, the configurations just modify the appropriate property when the configurations are loaded. If the property is single-value (one server name), you can't insert multiple values into it - the last one wins.

To do what you want you need to use a loop, and modify the connection property for each iteration. See Books Online for more details of the ForEach loops.

No comments:

Post a Comment