0

I am trying to design this in SSIS and could not find a way so far:

  • Loop through .sql files in a folder
  • Execute them and create tables from each resulting table (grab the name from the .sql file name) on a different SQL Server.

First part is rather easy but the second part (especially without knowing table sctructure before the design) is tricky.

BTW, servers are not linked.

Ilyes
  • 14,640
  • 4
  • 29
  • 55
  • _I am trying to design this in SSIS and could not find a way so far_ So you try, why don't you show us what did you try? – Ilyes Nov 19 '17 at 13:39
  • This is something that is just going to end up being done in pure C#/ADO.NET in a script task I imagine. SSIS doesn't have much inbuilt that will help (Except for the file looping) - So your question is basically "In C# or VB.NET given a file path of a SQL file how can I execute it on one SQL Server and create a table on a different one based on the file name and the results" – Martin Smith Nov 19 '17 at 13:46
  • 1
    https://stackoverflow.com/a/11360186/73226 – Martin Smith Nov 19 '17 at 13:52
  • @Bronzemoon Welcome to stackoverflow. It is recommended to read the [Tour Page](https://stackoverflow.com/tour) before asking your first question to learn more about asking questions, upvoting, answering and other things. and to get your first "Informed" badge – Hadi Nov 19 '17 at 18:18

0 Answers0