There was a question on MSDN forum to Run same query on Mulitple Servers.
We can do this by using one Connection Manager and passing the Connection String through Expressions
Below are the steps I followed to achieve this
1. Store Connection String for various connection in a table
2. Declare two Varibles like
3.Use Expression of Source Connection Manager to provide Connection String
4. Use Execute Sql Task to get connections in a Varible of type Objects from the table
5. Use For Each Loop to Iterate on that variable
6. Use Script component to cast the value of CurrConnection to String
public void Main()
{
// TODO: Add your code here
Dts.TaskResult = (int)ScriptResults.Success;
String con;
con = (string) Dts.Variables["CurrConnection"].Value;
Dts.Variables["CurrConnection"].Value = con;
}
7. Use any task inside the for loop with Connection Manager and it will use different server for each loop.
Subscribe to:
Post Comments (Atom)
Google Dataset Search
Google's Vision statement is “ to provide access to the world's information in one click. ” Google’s mission Statement is “ ...
-
Q1. WHAT is SQL Server Reporting Services(SSRS)? SQL Server Reporting Services is a server-based reporting platform that you can use to cre...
-
Many times I have been asked by SSIS programmers that they face difficulties when they need to select some specified columns and rows or the...
-
This is a reference answer to a post on MSDN forum but is very useful Question: While copying and renaming a file to a dynamic location...
Thanks but not enough information... Can you elaborate on the step by step process. For example why you are using a script task and not an execute task via expressions in the connection manager thanks
ReplyDelete