oracle 10g开启审计

来源:互联网 发布:优化新闻源的排名 编辑:程序博客网 时间:2024/06/02 07:29

SQL> create user shiyuebi identified by oracle;

SQL> create user shiyueerp identified by oracle;
SQL> grant connect,resource to shiyuebi;
SQL> grant connect,resource to shiyueerp;
SQL> conn shiyuebi/oracle
SQL> create table ctc (ID int,name varchar2(10));
SQL> insert into ctc values(1,’zhangsan’);
SQL> grant select on ctc to shiyueerp;
SQL> conn sys/oracle as sysdba
SQL> alter system set audit_file_dest=’/u02/shiyueau’ scope=spfile;
SQL> alter system set audit_trail=db,extended scope=spfile;
SQL> shutdown immediate
SQL> startup
SQL> audit select on shiyuebi.ctc by access;
SQL> conn shiyueerp/oracle
SQL> select * from shiyuebi.ctc;
SQL> select name from shiyuebi.ctc where id=1;
SQL> conn sys/oracle as sysdba
SQL> desc dba_audit_trail;
SQL> select username,sql_text from dba_audit_trail;
0 0
原创粉丝点击