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
How do I copy a table in sql?
What is sql performance tuning?
Is subquery faster than join?
Explain the difference between rename and alias?
In pl/sql, what is bulk binding, and when/how would it help performance?
Explain the difference between cursor declared in procedures and cursors declared in the package specification?
How to pronounce postgresql?
Can a commit statement be executed as part of a trigger?
Are ddl triggers fired for ddl statements within a pl/sql code executed using the dbms.sql package?
How do I run a query in pl sql developer?
What is indexes?
What is a clob in sql?
Does execute immediate commit?
What is recursive join in sql?
What is the maximum size of sqlite database?