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

Thread: Who inserts data in snapshot log

  1. #1
    Join Date
    Aug 2000
    Location
    Shanghai
    Posts
    433

    Who inserts data in snapshot log

    The Book tells:


    Snapshot Log Creation

    If you create a snapshot log, Oracle does the following:

    A table MLOG$_master_table is created. The table stores the ROWID and timestamp of rows inserted, updated and deleted in the master table.

    Oracle creates an AFTER ROW trigger on the master table to insert the ROWIDs and timestamps of inserted, updated, and deleted rows into the master snapshot log. The trigger is named TLOG$_master_table_name. Oracle8 does not have a trigger. The code that was contained in the trigger in Oracle7 is contained in the Oracle8 kernel. If we create a snapshot log on the EMP table using the CREATE SNAPSHOT LOG command, the following trigger is created automatically by Oracle.

    CREATE OR REPLACE TRIGGER "SCOTT"."TLOG$_EMP"
    AFTER INSERT OR UPDATE OR DELETE
    ON "SCOTT"."EMP"
    REFERENCING OLD AS OLD
    FOR EACH ROW
    DECLARE
    dmltype CHAR;
    BEGIN
    IF INSERTING
    THEN
    dmltype := 'I';
    ELSIF UPDATING
    THEN
    dmltype := 'U';
    ELSIF DELETING
    THEN
    dmltype := 'D';
    END IF;

    INSERT INTO "SCOTT"."MLOG$_EMP" (m_row$$,dmltype$$)
    VALUES (ld.ROWID, dmltype);
    END;

    But I can not found any triggers for this table ?
    Anyway the snapshot log works very fine and I can see the data is recorded in it if I change the data in master table .
    So who is inserting data in snapshot log ?


    I am using oracle9i , maybe 9i did something special in this case ?
    1. www.dbasupport.com
    2. www.dbforums.com
    3. www.itpub.net
    4. www.csdn.net
    5. www.umlchina.com
    6. www.tek-tips.com
    7. www.cnforyou.com
    8. fm365.federal.com.cn
    9. www.programmersheaven.com
    10.http://msdn.microsoft.com/library/default.asp
    ligang1000@hotmail.com

  2. #2
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    The trigger is "internalized" -- you can't see it.
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

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