![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
-----Original Message----- If you are rebuilding DTS packages as you go and adding tasks then executing them then I would seriously ask myself is DTS the tool to use. You can create a package that has a server connection and an ExecuteSQL task. The connection would be where the ExecuteSQL task executes and the ExecuteSQL task would be what executes, in your case 1+ stored procs. You can dynamically change all of these settings i.e Servername, databasename, SQL Statement(Stored Proc) Have a look at the site Global Variables and SQL statements in DTS (http://www.sqldts.com/default.aspx?205) -- Allan Mitchell (Microsoft SQL Server MVP) MCSE,MCDBA www.SQLDTS.com I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org . |
#3
| |||
| |||
|
|
-----Original Message----- Hi Allan, I am trying to run several tasks in parallel and I thought DTS’s tasks are the ideal implementation. Your example seems to support it, sSQLStatement = "SELECT TOP 1 FROM dbo.employee WHERE hire_date > '" & _ DTSGlobalVariables("HireDate").Value & "'" ' Get reference to the DataPump Task Set oPkg = DTSGlobalVariables.Parent FOR I = 1, 4 Set oDataPump = oPkg.Tasks ("DTSTask_DTSDataPumpTask_1").CustomTask ' Assign SQL Statement to Source of DataPump oDataPump.SourceSQLStatement = sSQLStatement ‘ Can I execute here?? ' Clean Up Set oDataPump = Nothing Set oPkg = Nothing 'Udpdate dbo.employee .... Update dbo.employee ... NEXT Is this will excute in threads? Ahmed. -----Original Message----- If you are rebuilding DTS packages as you go and adding tasks then executing them then I would seriously ask myself is DTS the tool to use. You can create a package that has a server connection and an ExecuteSQL task. The connection would be where the ExecuteSQL task executes and the ExecuteSQL task would be what executes, in your case 1+ stored procs. You can dynamically change all of these settings i.e Servername, databasename, SQL Statement(Stored Proc) Have a look at the site Global Variables and SQL statements in DTS (http://www.sqldts.com/default.aspx?205) -- Allan Mitchell (Microsoft SQL Server MVP) MCSE,MCDBA www.SQLDTS.com I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org . . |
![]() |
| Thread Tools | |
| Display Modes | |
| |