![]() Therefore, only “FOR LOOP” was used to pass the directory path and File Spec, i.e. It cannot return to a root directory to cycle over a separate folder with a different File Spec (Rupay ID *). Suppose we use a simple File Spec (silver id *) to repeat source files within both directories, we can only loop source files inside that one folder. So, we like to loop two directories but still only consider “silver id” and “RUPAY ID” naming multiple source files for the ETL process because we would not want to take the rest of the quasi-file types. ![]() Let’s say we have two source folders, one for “silver id” and the other for “RUPAY ID,” with many data source files coupled with “silver id” and “RUPAY ID” source files inside each directory. Sometimes, writing a query to give out all the instances may be usual, but I like to save the values to have specific control over the task. Throughout this example, let the connection strings in a SQL database, but then we could store them in a flat file or anywhere else that SSIS can connect to. Use the power of SSIS expressions as the only answer! Add an expression to the inner Execute SQL Task(s) Connection manager to change the connection string with the content of a variable generated by the For Loop container on each iteration. The rest is simple: inside the ForEachLoop container, place the Execute SQL task(s) with the SQL statements that must run in all target instances. ![]() The content of the object variable and iterate through each connection string using a ForEachLoop container.ģ. Load all target DBs’ connection strings into an SSIS object type variable within a package.Ģ. We wish to run the same SQL statement(s) in several database servers/instances using SSIS.ġ. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |