how to execute batch of scripts by one DTS or SSIS

  • I need to know how to execute batch of scripts stored in some folder one by one through DTS or SSIS or is there is one script which execute all bunch from folder and if error occours then STOP at that POINT and SHOW ERROR WITH THAT PERTICULAR SCRIPT NAME

  • Use a Foreach Loop Container in SSIS. Your requirements are quite vague, so please try that and post again if there's anything in particular that you don't understand.

    John

  • I assume you have a bunch of .sql files in a folder that you want to execute. What you can do is use a foreach loop container in SSIS and get the name of file in a variable.

    Then inside foreach loop, place an execute sql task with SQLSourcetype as FileConnection. Configure the Connectionstring property of Connection manager of this Fileconnection to read value from variable being used in foreach loop container.

    If any of the script fails, package will fail.

    Hope this helps !!

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply