Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread Script sequence
Sun, Dec 28 2008 10:57 AMPermanent Link

"Fons Neelen"
Hi Tim,

If multiple users would send a SQL script to the server, these scripts would
be dealt with in sequence? To be more clear, the entire script needs to be
fully executed before the next script will run?

Thanks in advance.

Best regards,
Fons Neelen
Mon, Dec 29 2008 3:46 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Fons,

<< If multiple users would send a SQL script to the server, these scripts
would be dealt with in sequence? To be more clear, the entire script needs
to be fully executed before the next script will run? >>

No, they are executed concurrently, and are not atomic.  If you want the
actions of the script to be atomic, then you need to use a START
TRANSACTION..COMMIT/ROLLBACK block in the script.

--
Tim Young
Elevate Software
www.elevatesoft.com

Tue, Dec 30 2008 5:42 PMPermanent Link

"Fons Neelen"
Thanks Tim for the additional info about not being atomic. In scripts I
always use TRANSACTION..COMMIT/ROLLBACK.

And it is good to know that they are executed concurrently - that way a very
big and therefore (possibly) slow to execute script will not halt other
scripts.

Best regards,
Fons
Fri, Jan 2 2009 1:30 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Fons,

<< And it is good to know that they are executed concurrently - that way a
very big and therefore (possibly) slow to execute script will not halt other
scripts. >>

Well, there is a caveat that if you're using a transaction for all scripts,
then they will wait on one another if the transactions are all on the same
table(s) in the same database(s).

--
Tim Young
Elevate Software
www.elevatesoft.com

Fri, Jan 2 2009 2:49 PMPermanent Link

"Fons Neelen"
Hi Tim,

> Well, there is a caveat that if you're using a transaction for all
> scripts, then they will wait on one another if the transactions are all on
> the same table(s) in the same database(s).

Using transactions it must be because the table is locked - thanks for
pointing this out. Although totally understandable, one might overlook this,
so thanks. But I am more than happy that scripts run concurrently, so that -
even when always using transactions - scripts on different tables do not
wait on each other. Assuming that script would only run in sequence, this is
still way better than was expected.

Best regards,
Fons
Image