Re: On Select Trigger

  • From: Stefan Knecht <knecht.stefan@xxxxxxxxx>
  • To: ksmadduri@xxxxxxxxx
  • Date: Tue, 3 Aug 2010 14:24:02 +0200

You can also create a vpd policy on the table in question. Just don't alter
the select (don't return anything from the vpd table function)

Stefan


=========================

Stefan P Knecht
CEO & Founder
s@xxxxxxxx

10046 Consulting GmbH
Schwarzackerstrasse 29
CH-8304 Wallisellen
Switzerland

Phone +41-(0)8400-10046
Cell +41 (0) 79 571 36 27
info@xxxxxxxx
http://www.10046.ch

=========================


On Tue, Aug 3, 2010 at 2:19 PM, Kumar Madduri <ksmadduri@xxxxxxxxx> wrote:

> There is a requirement to call a package when a user selects from a table.
> Select * from emp should for example trigger and call the package emp_pkg.
> One way of doing it is like this I think
> /* Simple procedure to call the package */
>
> create or replace PROCEDURE MSK.MSK_PROC
> ( object_schema VARCHAR2
> , object_name VARCHAR2
> , policy_name VARCHAR2
> ) is
> PRAGMA AUTONOMOUS_TRANSACTION;
> begin
> FND_LOBS_ARCHIVER.DEARCHIVE_LOB(MY_PARAM);
> end MSK.MSK_PROC
> ;
>
> /* Calling the procedure using dbms_fga. This will fire whenver select *
> from msk_tab*/
>
> begin
> dbms_fga.add_policy
> ( object_schema=>'MSK'
> , object_name=>'MSK_TAB'
> , policy_name=>'MSK_POLICY'
> , audit_column => NULL,
> audit_condition => NULL
> , handler_schema => 'MSKL'
> , handler_module => MSK.MSK_PROC'
> );
> end;
> /
> Is there any better way of doing this?
>
> Oracle version : 11.1.0.7
>
>

Other related posts: