Database
Masuk ke sqlplus
[applmgr@orasvr01 ~]$ sqlplus '/as sysdba'
Lihat parameter audit_trail
SQL> show parameter audit;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
audit_trail string NONE
Mengaktifkan audit trail
SQL> alter system set audit_trail=DB scope=spfile ;
SQL> show parameter audit
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
audit_trail string DB
Audit Failed Logon Attempts:
SQL> audit session whenever not successful ; --user yang gagal login
SQL> audit session; --connect to database
SQL> audit user; -- Create, alter, and drop user
SQL> AUDIT CREATE ANY TABLE, DROP ANY TABLE BY scott BY ACCESS;
Audit Table
SQL> AUDIT INSERT , UPDATE , DELETE ON scott.emp BY ACCESS;
B. Move tablespace audit ke new tablespace
Create tablespace
CREATE TABLESPACE AUDIT_TBS DATAFILE
'+ORADATA/bdgnaprd/datafile/audittbs01.dbf' SIZE 500M AUTOEXTEND ON NEXT 10M MAXSIZE 8G
LOGGING
ONLINE
PERMANENT
EXTENT MANAGEMENT LOCAL AUTOALLOCATE
BLOCKSIZE 8K
SEGMENT SPACE MANAGEMENT AUTO
FLASHBACK ON;
Run the DBMS_AUDIT_MGMT.SET_AUDIT_TRAIL_LOCATION
BEGIN
DBMS_AUDIT_MGMT.SET_AUDIT_TRAIL_LOCATION(
AUDIT_TRAIL_TYPE => DBMS_AUDIT_MGMT.AUDIT_TRAIL_AUD_STD,
AUDIT_TRAIL_LOCATION_VALUE => 'AUDIT_TBS ');
END;
C. Restart aplikasi dan database
Stop
[applmgr@orasvr01 ~]$ srvctl stop database -d PROD
Start
[applmgr@orasvr01 ~]$ srvctl start database -d PROD
No comments:
Post a Comment