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

Thread: how to write this procedure in pl/sql

  1. #1
    Join Date
    Jan 2007
    Posts
    1

    how to write this procedure in pl/sql

    I have a DML trigger on a table. whenever there is a change to the table, the old records will be written to another backup table created before. I want to implement this for many tables in the database. Basically, I want a procedure that takes table name as an input and creats a backup table and a trigger for the input table.
    How to write such procedure?
    thanks.

  2. #2
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,166
    Quote Originally Posted by z3k2
    I have a DML trigger on a table. whenever there is a change to the table, the old records will be written to another backup table created before. I want to implement this for many tables in the database. Basically, I want a procedure that takes table name as an input and creats a backup table and a trigger for the input table.
    How to write such procedure?
    thanks.
    You can not query the metarows that describe the old and new values. therefore you can not create dynamic triggers to log changes. However, using dba_tab_columns you can dynamically create static triggers that will update your history.

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