How to maintain the history of code changes of pl/sql?
Answer Posted / kuldeep
CREATE TABLE SOURCE_HIST
AS SELECT SYSDATE CHANGE_DATE, USER_SOURCE.*
FROM USER_SOURCE WHERE 1=2;
CREATE OR REPLACE TRIGGER trig_change_hist
AFTER CREATE ON SCHEMA
BEGIN
INSERT INTO SOURCE_HIST -- History table
SELECT SYSDATE, user_source.*
FROM USER_SOURCE
WHERE NAME = ORA_DICT_OBJ_NAME; --
EXCEPTION
WHEN OTHERS
THEN
raise_application_error (-20000, SQLERRM);
END;
/
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is db journal file?
Does pl/sql support create command?
How do you determine the current isolation level? : Transact sql
What is the use of primary key?
Why do we need databases?
When can we use the where clause and the having clause?
What is right join sql?
Name three sql operations that perform a sort.
What is rtm stands for?
Does truncate require commit?
What are %type and %rowtype for?
What is a unique key?
How does cross join work?
Are stored procedures faster than dynamic sql?
Why do we use cursors?