SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


how to execute batch of scripts by one DTS or SSIS


how to execute batch of scripts by one DTS or SSIS

Author
Message
himanshuk
himanshuk
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 Visits: 20
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
John Mitchell-245523
John Mitchell-245523
SSChampion
SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)

Group: General Forum Members
Points: 14081 Visits: 15950
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
Ravi Chhabria
Ravi Chhabria
SSC-Enthusiastic
SSC-Enthusiastic (124 reputation)SSC-Enthusiastic (124 reputation)SSC-Enthusiastic (124 reputation)SSC-Enthusiastic (124 reputation)SSC-Enthusiastic (124 reputation)SSC-Enthusiastic (124 reputation)SSC-Enthusiastic (124 reputation)SSC-Enthusiastic (124 reputation)

Group: General Forum Members
Points: 124 Visits: 219
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 !!
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search