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 the difference between functions, procedures, and packages in pl/sql?
what is “go” in t-sql? : Transact sql
Is there any restriction on the use of union in embedded sql?
What is meant by truncate in sql?
What is inner join in sql?
Can a foreign key have a different name?
How do you add a column to a table?
What does count (*) mean in sql?
Describe different types of general function used in sql?
What is column?
Why plvtab is considered as the easiest way to access the pl/sql table?
What is dynamic sql in pl sql?
What is sql rowcount?
What is the use of <> sql?
What is autocommit sql?