|
From: Tomas R. <to...@mv...> - 2002-08-03 03:09:13
|
Hi Kevin, > If you have ever tried to process sql scripts that a dba created for running > under ISQL. You may have run into the problem with multiple GO statements in > a long SQL query. > > Attached is support for GO statements in SQL queries. Not sure if anyone > would find this useful other that myself and people in SQL Server shops. I > have run into this difficulty multiple times in my days of nerdism. > > Basically it splits the sql to be executed on GO statements and executes the > resulting statements one at a time. > > I have not commited this change as I am not sure it is such a good idea. We > may want to subclass the sqltask rather than bolt on this functionality. Actually, this was exactly what the first version of my Sql task did... Problem is, it's terribly inneficient for long batches of sql statements (as is commonly the case with entire DB scripts generated by SQL EE). Unfortunately, there seems to be no other way if you want to run those kinds of scripts (for example, CREATE PROCEDURE statements won't work otherwise). So, what I had in mind was to keep both the statement-by-statement and batched executions models for SqlTask, and add a boolean "batch" attribute to the task to switch between the two. This would be a fairly easy to do change, since I already have the code to do both things in the project's CVS. What do you guys thing? -- Tomas Restrepo to...@mv... |