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

how to execute batch of scripts by one DTS or SSIS Expand / Collapse
Author
Message
Posted Wednesday, October 10, 2012 4:13 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, July 23, 2013 10:41 PM
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
Post #1370816
Posted Wednesday, October 10, 2012 4:27 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 9:31 AM
Points: 5,242, Visits: 9,497
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
Post #1370823
Posted Wednesday, October 10, 2012 4:42 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Monday, July 28, 2014 1:27 AM
Points: 57, Visits: 189
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 !!
Post #1370830
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse