Oracle Database Security Audit Audit

Source: Internet
Author: User
Tags system log oracle database

Oracle Audit is an afterthought, that is, after the database security problems, in order to locate, find the root cause of the problem, can be traced back through the audit. The Oracle audit consists of the following 3 sections:

trigger-based Auditing (trigger)

Auditing the SYS user-(SYS user audit)

Standard Auditing (Standard audit)

Trigger auditing

The following is an example of a trigger audit, where the value of the Sal field in the EMP table increases more than 1.1 times times, and the operation is recorded in the audit table Emp_sal_audit.

CREATE TRIGGER trg_a_idu_r_emp_sal after  
INSERT or DELETE or UPDATE of the SAL on EMP for each  
ROW  
BEGIN
IF (: New.sal >: Old.sal * 1.10)  
THEN INSERT into Emp_sal_audit VALUES (: Old.empno,  
: Old.sal  
,:  
new.sal, User
, sysdate);  
End IF;  
End;  
/

The audit of the SYS user

An audit of the SYS user is special because the SYS user has too much permissions and its audit information cannot be stored in the database, otherwise SYS can modify the audit information at will, so the SYS user audit log is written to the operating system log.

Here is an example:

1 Start the audit of the SYS user first

Sql> alter system Set Audit_sys_operations = true scope = SPFile;

The system has changed.

2 The SYS user inserts a data into the test table

Sql> Show user
user is "SYS"
      
sql> insert INTO test.t (object_id) values (1);  
      
1 lines have been created.  
      
sql> commit;  
      
Submit completed.

3 The following information can be seen in the operating system log:

Audit trail:length: ' 176 ' ACTION: [7] ' CONNECT ' DATABASE user:[1] '/' privilege: [6] ' SYSDBA ' CLIENT user:[12] ' Corp\xia Nzhu ' CLIENT terminal:[14] ' l-shc-00436132 ' status:[1] ' 0 ' dbid:[10] ' 1327298419 '.
Standard Audit

Depending on the object, the standard audit can be divided into the following 4 sections:

Audit session Audit object Audit Operation Audit authorization

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.