Re: SQL Batch Script from MSSQL to Oracle 8i

From: Frank <fbortel_at_nescape.net>
Date: Mon, 15 Dec 2003 22:04:13 +0100
Message-ID: <brl73j$80b$1_at_news1.tilbu1.nb.home.nl>


Jeff Lambert wrote:

> We have a Windows client application written in delphi that connects
> to Oracle 8i w/ ADO. We accumulate a lot of SQL statements in a loop
> and finally send the strings list to be executed.
>
> What I really need help with are the first three and the last three
> statements. How would I rewrite those under Oracle to make sure they
> have the same behaviour? BTW I know this isn't the best way to learn
> Oracle PLSQL but I am under time constraints, so no editorials please.
>
> Thanks in advance. Jeff.
>
> -- SQL batch script
>
> SET NOCOUNT ON
> SET XACT_ABORT ON --this is especially important
> BEGIN TRANSACTION INDX_ADD_ADMIN
>
> /* many stored procedure calls in a loop */
> /* ie Str := 'BEGIN INDX_DELSRC ('''+DOS_NAME+'''); END;'; */
>
> COMMIT TRANSACTION INDX_ADD_ADMIN
> SET XACT_ABORT OFF
> SET NOCOUNT OFF
Now, if you would at least supply what the SS2K statements do. I can only guess: set transaction_abort off? As in "I don't care that my transaction has errors, just go on"? Not possible.
Begin tran/end tran: should probably become a stored procedure with pragma autonomous_transaction
set nocount off (or on): don't bother - oracle will always be able to tell you how many rows were affected - you normally don't ask (in PL/SQL)

-- 
Regards, Frank van Bortel
Received on Mon Dec 15 2003 - 22:04:13 CET

Original text of this message