Re: using system event triggers

Imagine, mistakely you do bad the trigger, or the condition changes for some 
reason, and you can start your database neither to change the trigger, this 
really really will be not funny.
killing your database based on a bug, could create future block problems.

I agree with Thomas, find another way
Restricting access (there are several way to do this), you coud do a logon 
trigger, if the condition you want don't work there is no logons, except as 
sysdba.

Other idea in windows you could for example if there is a condition true, 
schedule a task through java to shutdown the database in 30 seconds using at 
command line. This is more near to what you want and less dangeros to your 
database.

  ----- Original Message ----- 
  From: Mercadante, Thomas F 
  To: 'oracle-l@xxxxxxxxxxxxx' 
  Sent: Friday, February 27, 2004 9:24 AM
  Subject: RE: using system event triggers


  Josh,

  This is a very bad idea.  Even if you *could* do it, how in the world would 
you be able to fix it?  If you cant start the database, then it's basically 
hosed.

  Just what are you trying to accomplish?

  Tom Mercadante 
  Oracle Certified Professional 

    -----Original Message-----
    From: Josh Collier [mailto:Josh.Collier@xxxxxxxxxxxx]
    Sent: Thursday, February 26, 2004 7:42 PM
    To: 'oracle-l@xxxxxxxxxxxxx'
    Subject: using system event triggers


    Is there a way to use a system event trigger to prevent completion of 
database open if a criteria isn't met

    some psuedo code to elaborate:

    CREATE OR REPLACE TRIGGER sys.post_dup_check

    AFTER

    STARTUP

    ON DATABASE

    DECLARE

    db_name VARCHAR2 (50);



    BEGIN 

    db_name := ora_database_name;

    IF db_name  ! = ' whatever .WORLD' 

    then don't open



    END IF; 

    END;

    /

Other related posts: