Monday, June 28, 2010

Dictionary views and Auditing enabling

When you don't remember view name and only the key word:
---------------------------------------------------------

SELECT view_name
FROM dba_views
WHERE view_name LIKE 'DBA%AUDIT%'
ORDER BY view_name;

COLUMN username FORMAT A10
COLUMN owner FORMAT A10
COLUMN obj_name FORMAT A10
COLUMN extended_timestamp FORMAT A35

Enabling/Disabling auditing:
---------------------------------


Step 1:

COLUMN username FORMAT A10
COLUMN owner FORMAT A10
COLUMN obj_name FORMAT A10
COLUMN extended_timestamp FORMAT A35

Auditing is disabled by default, but can enabled by setting the AUDIT_TRAIL static parameter, which has the following allowed values.

AUDIT_TRAIL = { none | os | db | db,extended | xml | xml,extended }

ALTER SYSTEM SET audit_trail=db SCOPE=SPFILE; =>To enable auditing and direct audit records to the database audit trai

ALTER SYSTEM SET audit_trail=None SCOPE=SPFILE;

Step 2:Shut down the Database since AUDIT_TRAIL is the static parameter.

SQL>shutdown immediate

Step 3: Again start the Database for changes to take effect.

SQL>startup.

No comments:

Post a Comment