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

Home -> Community -> Usenet -> c.d.o.misc -> Re: If EXISTS before insert clause

Re: If EXISTS before insert clause

From: Sybrand Bakker <sybrandb_at_hccnet.nl>
Date: Mon, 07 Feb 2005 17:20:59 +0100
Message-ID: <3u4f011rn6tb23nepn3vna907k1rm478q0@4ax.com>


On 7 Feb 2005 07:31:51 -0800, "JPike" <jpike_at_welcom.com> wrote:

>Is DROP the same situation? What do you mean by having it in an
>anonymous block?
>
>Basically someone wrote this script file. THe purpose is to migrate a
>database from the 1.0 version of our product to the 2.0 version. The
>script gets run and updates the db. Some changes need to take place no
>matter what (like the ALTERs you are referring to), but some only get
>executed if they have parts of the product installed (those inside the
>IFs).
>
>I am new to dealind with Oracle so if I am going about this the wrong
>way please let me know. I just need to be able to have a .sql script
>that someone can just type in a run.
>
>jim

anonymous block --> any pl/sql that is not part of a procedure, or a function or a package.

Is not stored in the database, so DBAs don't exercise any control over that. Actually, *any* DDL, in *any* *regularly* called procedure/function etc, should make a DBA feel unconfortable. Someone might just apply something to the database, making some parts unfunctional, or mucking the whole thing up. I'm currently reviewing such a situation, and I don't feel happy about a client program creating a 10G temporary tablespace on the fly, and dropping it in the same procedure, knowing it may run every week or even more often.

Your case is somewhat different. This is a one time operation. Let's hope the person(s) designing that script knew what they were doing, and there is no problem.

However, DDL as part of your daily routine, in a fashion, you can't control it, should make everyone shudder. (And in my case: report my concerns to customer, stating I can't maintain it in this fashion)

--
Sybrand Bakker, Senior Oracle DBA
Received on Mon Feb 07 2005 - 10:20:59 CST

Original text of this message

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