0

I have a table in Oracle with some columns that needs to be audited.For every new insert into a table/for every update of the Table, I need to put an entry in audit table for each column inserted/Updated/Deleted.For every update ,suppose I update 1st 2nd column ,then it will create two record in audit with its old value and new value. But I need to do it without using a trigger, is there any other way to do it? Could anyone please help me with this.

Many thanks in advance.

Anji007
  • 99
  • 1
  • 12
  • Have a look at [this](https://stackoverflow.com/questions/19030949/alternate-solution-for-oracle-triggers-for-audit-trail) if the trigger is not an option. – Jacob May 14 '18 at 11:54

2 Answers2

0

Using trigger-based auditing is the best solution for this. Not sure, why you are trying to do without a trigger.

  • But I was instructed to do this without trigger. It would be a big help if anyone can provide me a solution which doesn't involve triggers. – Anji007 May 15 '18 at 05:58
  • Doing this without a trigger is not a good solution if you are trying to do that in the database level. But if you are trying to do that application level, You can add code after add, edit and delete function to add data to the audit table. – Iynga Iyngaran Iyathurai May 15 '18 at 06:05
  • Please ask your instructor and let us know, why they want to do it without the trigger. So we can think of a solution based on that. – Iynga Iyngaran Iyathurai May 15 '18 at 06:07
  • I wanted to do it in application level(Oracle APEX) itself. Even I thought of writing separate procedure for this on behalf of trigger and wanted to call the procedure in page level after every save/addrow/delete/edit. But am not sure there is any audit functionality or any other way to do it in APEX. Hope this is clear. – Anji007 May 15 '18 at 06:17
0

I think you can use the DBMS_FGA for your requirements. But there will be no Old and new Values.

You can have a record for every column if you make several FGAs in the same table, one for each columns of interest

regards Altin

altink
  • 237
  • 1
  • 10