DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: shutdown trigger

Hybrid View

  1. #1
    Join Date
    Mar 2002
    Posts
    303

    Question

    Hi all,
    by abort shutdown, will the shutdown trigger fire???

    Thank's all

  2. #2
    Join Date
    Jul 2000
    Location
    Amsterdam
    Posts
    234

    Unhappy

    According to Metalink it doesn't


    Tycho

    ====================

    The following example demonstrates how database event triggers can be used
    to create and maintain an uptime log for the database.

    CREATE TABLE up_time (action_date DATE, action VARCHAR2(20));

    CREATE OR REPLACE TRIGGER db_start AFTER STARTUP ON DATABASE
    BEGIN
    insert into system.up_time values(sysdate,'STARTUP');
    END;
    /

    CREATE OR REPLACE TRIGGER db_stop BEFORE SHUTDOWN ON DATABASE
    BEGIN
    insert into system.up_time values(sysdate,'SHUTDOWN');
    END;
    /

    After creating these triggers, do the following:

    SHUTDOWN IMMEDIATE
    STARTUP
    SHUTDOWN ABORT
    STARTUP

    The results are shown in the following up_time table:

    ACTION_DATE ACTION
    ------------------ --------------------
    27-AUG-98 12:22:40 SHUTDOWN
    27-AUG-98 12:25:09 STARTUP
    27-AUG-98 12:27:52 STARTUP

    Notice that the SHUTDOWN ABORT is missing. Because of the nature of the
    SHUTDOWN ABORT, the trigger does not fire.


  3. #3
    Join Date
    Mar 2002
    Posts
    303
    Thank's

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width