Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How do I copy a table in sql?

983


What is sql performance tuning?

916


Is subquery faster than join?

1010


Explain the difference between rename and alias?

1010


In pl/sql, what is bulk binding, and when/how would it help performance?

993


Explain the difference between cursor declared in procedures and cursors declared in the package specification?

1151


How to pronounce postgresql?

1055


Can a commit statement be executed as part of a trigger?

1048


Are ddl triggers fired for ddl statements within a pl/sql code executed using the dbms.sql package?

1087


How do I run a query in pl sql developer?

993


What is indexes?

1056


What is a clob in sql?

1015


Does execute immediate commit?

1216


What is recursive join in sql?

1004


What is the maximum size of sqlite database?

1102