Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Execute Immediate command

Re: Execute Immediate command

From: Sybrand Bakker <gooiditweg_at_sybrandb.nospam.demon.nl>
Date: Tue, 09 Dec 2003 21:35:38 +0100
Message-ID: <79cctvk6vqje4lcuhfan8vlv0pi87jchvq@4ax.com>

Comments embedded

On 9 Dec 2003 05:45:35 -0800, christophelr_at_battelle.org (Roger Christophel) wrote:

>I have recently written several scripts to modify a database, and
>because the customer's DBA will actually be running the scripts I
>wrote a short script that calls all the other scripts.
>
>One of the modification scripts uses the EXECUTE IMMEDIATE command and
>was in the middle of the calling script. I believe the script with
>the EXECUTE IMMEDIATE caused other commands in the calling script and
>the next script to be executed pre-maturely,
Absolute nonsense, execute immediate calls the SQL-engine directly, nothing more, nothing less. It allows you to do DDL and dynamic sql, which isn't possible in PL/SQL

which in turned caused
>things to really mess up.

Yet more nonsense

 When I moved the script with the EXECUTE
>IMMEDIATE command to the bottom of the list so that it was called
>last, everything ran as expected.

So your code is faulty and NOT execute immediate.

>
>I have two questions, first is my assumption correct in that the
>EXECUTE IMMEDIATE command can cause this kind of problem and second
>what does one do to keep it from happening?
>
>Thanks,
>Roger

EXECUTE IMMEDIATE can't cause this problem and one should either write correct code or post the code to be corrected

--
Sybrand Bakker, Senior Oracle DBA
Received on Tue Dec 09 2003 - 14:35:38 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US