Database Security Products (MOSC)

MOSC Banner

Auditing procedure ORA-01031

edited Mar 16, 2012 4:22AM in Database Security Products (MOSC) 2 commentsAnswered ✓
Hi

I would need to create a stored procedure in order to enable day by day audit on db users, I created the following procedure in SYSTEM user:

CREATE OR REPLACE PROCEDURE SYSTEM.ACTIVATE_AUDIT AS
 stmt_audit varchar2(100);
BEGIN

 for c1 in (select d.username from user_view.v_dba_users d where d.account_status='OPEN' and substr(d.profile,1,4) not in ( 'TECH','ADMI','HIDS','ESM_') )
 LOOP
  stmt_audit := 'audit all by ' || c1.username || ' by access whenever successful';
  execute immediate stmt_audit;
 END LOOP;
END ACTIVATE_AUDIT;
/

but when I run it gives

ORA-01031: insufficient privileges

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