Database Administration (MOSC)

MOSC Banner

audit sql statement/DDL from procedure

edited Dec 30, 2015 10:01AM in Database Administration (MOSC) 7 commentsAnswered

Oracle version: 11.2.0.4

OS: Linux; 5.0

I need to audit when the following Procedure and SQL / DDL runs everyday. How would set up an audit for this purpose only?

1. Procedure: PRODCL.PBC_DATA_LOAD

2. -- Build indexes (staging)

    EXECUTE IMMEDIATE 'alter session set skip_unusable_indexes=true';

   EXECUTE IMMEDIATE 'alter index X_DT_LOAD_TXNNUM   rebuild compute statistics nologging';

   EXECUTE IMMEDIATE 'alter index X_DT_LOAD_DUP     rebuild compute statistics nologging';

   EXECUTE IMMEDIATE 'alter index X_DT_LOAD_TRANID  rebuild compute statistics nologging';

   EXECUTE IMMEDIATE 'alter index X_DT_LOAD_SPID   rebuild compute statistics nologging';

  

3. DBMS_STATS.GATHER_TABLE_STATS(user,'STAGE_DATA_LD'

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center