Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««123

Dynamic connections in SSIS Expand / Collapse
Author
Message
Posted Monday, November 5, 2012 10:15 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Yesterday @ 9:12 AM
Points: 3, Visits: 363
Ignore that comment Kenneth! Reason for no results was due to SQL Express not listing anything in sys.master_files so failing the query (and one of the engineers dropping ther other test machine I was using off the domain)! Will look into getting the dynamic part of this working now.

thanks again!
Adam
Post #1381193
Posted Monday, November 5, 2012 10:27 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Tuesday, August 19, 2014 5:13 PM
Points: 3,462, Visits: 1,797
adam_pearson (11/5/2012)
Hi Kenneth,
Thanks for the example however no joy with that either. Using either a table as the source or hard coding it into the FOREACH container doesn't appear to work. When it executes it runs without problems however only returns the results from the local machine. The servername changes to the ones in the list (using a message box) however when putting items into a table (using the @@servername for example) it's only the location machine being picked up.

I've tried setting the 'delayValidation' setting on and off but still no joy. Tried connecting to different servers but that hasn't helped either.

Any suggestions?

Thanks,
Adam


Just to confirm. You are using a FOR EACH loop, not a FOR loop. You have a variable mapped (under the variable mapping tab of the FOR EACH loop container) to store the output of the loop. You have an expression set up on the connection manager that you want to be changing and it uses the variable that you mapped in the FOR EACH loop. And last but not least is the code that you expect to have pointing to the new server inside the loop container?

If all that is true then see if you can walk through the setup on paper and post it to me. I would go ahead and use a Foreach Item Enumerator until you get it working since it has less moving parts to go wrong. Once we have that working then we can work on the next part.


Kenneth Fisher
I strive to live in a world where a chicken can cross the road without being questioned about its motives.
--------------------------------------------------------------------------------
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

Link to my Blog Post --> www.SQLStudies.com
Post #1381197
« Prev Topic | Next Topic »

Add to briefcase «««123

Permissions Expand / Collapse