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

Why do we use joins in sql?

970


How can I speed up sql query?

962


Which tcp/ip port does sql server run on? How can it be changed? : Sql dba

1002


What is offset in sql query?

1112


How do I find duplicates in a single column in sql?

1020


What is the use of stored procedures?

1051


What is multiple columns?

1065


What is data abstraction in sql?

1030


What is the function that is used to transfer a pl/sql table log to a database table?

1020


What does closing a cursor do?

1320


How can you select unique records from a table?

1075


What is data modelling in sql?

1017


How does postgresql compare to oracle/db2/ms sql server/informix?

1034


How do I upgrade sql?

998


How do I remove duplicates in two columns?

1065