oracle数据库 开启审计功能,oracle数据库审计功能

eg:

[root@oracle-one ~]# su - oracle

[oracle@oracle-one ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Fri Aug 16 02:43:02 2013

Copyright (c) 1982, 2009, Oracle. All rights reserved.

Connected to an idle instance.

SQL> startup

ORACLE instance started.

Total System Global Area 405020672 bytes

Fixed Size 2213816 bytes

Variable Size 251660360 bytes

Database Buffers 146800640 bytes

Redo Buffers 4345856 bytes

Database mounted.

Database opened.

SQL> select sysdate from dual;

SYSDATE

---------

16-AUG-13

SQL> col name for a60

SQL> select file#,name from v$datafile;

FILE# NAME

---------- ------------------------------------------------------------

1 /opt/app/oracle/RHYS/system01.dbf

2 /opt/app/oracle/RHYS/sysaux01.dbf

3 /opt/app/oracle/RHYS/undotbs01.dbf

4 /opt/app/oracle/RHYS/users01.dbf

5 /opt/app/oracle/RHYS/test.dbf

SQL> create tablespace arch_tbs datafile '/opt/app/oracle/RHYS/arch_tbs01.dbf' size 500M;

Tablespace created.

SQL> set pagesize 2000

SQL> select to_char(dbms_metadata.get_ddl('TABLE','AUD$')) FROM DUAL;

TO_CHAR(DBMS_METADATA.GET_DDL('TABLE','AUD$'))

--------------------------------------------------------------------------------

CREATE TABLE "SYS"."AUD$"

( "SESSIONID" NUMBER NOT NULL ENABLE,

"ENTRYID" NUMBER NOT NULL ENABLE,

"STATEMENT" NUMBER NOT NULL ENABLE,

"TIMESTAMP#" DATE,

"USERID" VARCHAR2(30),

"USERHOST" VARCHAR2(128),

"TERMINAL" VARCHAR2(255),

"ACTION#" NUMBER NOT NULL ENABLE,

"RETURNCODE" NUMBER NOT NULL ENABLE,

"OBJ$CREATOR" VARCHAR2(30),

"OBJ$NAME" VARCHAR2(128),

"AUTH$PRIVILEGES" VARCHAR2(16),

"AUTH$GRANTEE" VARCHAR2(30),

"NEW$OWNER" VARCHAR2(30),

"NEW$NAME" VARCHAR2(128),

"SES$ACTIONS" VARCHAR2(19),

"SES$TID" NUMBER,

"LOGOFF$LREAD" NUMBER,

"LOGOFF$PREAD" NUMBER,

"LOGOFF$LWRITE" NUMBER,

"LOGOFF$DEAD" NUMBER,

"LOGOFF$TIME" DATE,

"COMMENT$TEXT" VARCHAR2(4000),

"CLIENTID" VARCHAR2(64),

"SPARE1" VARCHAR2(255),

"SPARE2" NUMBER,

"OBJ$LABEL" RAW(255),

"SES$LABEL" RAW(255),

"PRIV$USED" NUMBER,

"SESSIONCPU" NUMBER,

"NTIMESTAMP#" TIMESTAMP (6),

"PROXY$SID" NUMBER,

"USER$GUID" VARCHAR2(32),

"INSTANCE#" NUMBER,

"PROCESS#" VARCHAR2(16),

"XID" RAW(8),

"AUDITID" VARCHAR2(64),

"SCN" NUMBER,

"DBID" NUMBER,

"SQLBIND" CLOB,

"SQLTEXT" CLOB,

"OBJ$EDITION" VARCHAR2(30)

) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING

STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645

PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DE

FAULT CELL_FLASH_CACHE DEFAULT)

TABLESPACE "SYSTEM"

LOB ("SQLBIND") STORE AS BASICFILE (

TABLESPACE "SYSTEM" ENABLE STORAGE IN ROW CHUNK 8192 RETENTION

NOCACHE LOGGING

STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645

PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DE

FAULT CELL_FLASH_CACHE DEFAULT))

LOB ("SQLTEXT") STORE AS BASICFILE (

TABLESPACE "SYSTEM" ENABLE STORAGE IN ROW CHUNK 8192 RETENTION

NOCACHE LOGGING

STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645

PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DE

FAULT CELL_FLASH_CACHE DEFAULT))

SQL>

SQL> CREATE TABLE sys.AUD$_ARCH

2 ( SESSIONID NUMBER NOT NULL ENABLE,

3 ENTRYID NUMBER NOT NULL ENABLE,

4 STATEMENT NUMBER NOT NULL ENABLE,

5 TIMESTAMP# DATE,

6 USERID VARCHAR2(30),

7 USERHOST VARCHAR2(128),

8 TERMINAL VARCHAR2(255),

9 ACTION# NUMBER NOT NULL ENABLE,

10 RETURNCODE NUMBER NOT NULL ENABLE,

11 OBJ$CREATOR VARCHAR2(30),

12 OBJ$NAME VARCHAR2(128),

13 AUTH$PRIVILEGES VARCHAR2(16),

14 AUTH$GRANTEE VARCHAR2(30),

15 NEW$OWNER VARCHAR2(30),

16 NEW$NAME VARCHAR2(128),

SES$ACTIONS VARCHAR2(19),

17 18 SES$TID NUMBER,

19 LOGOFF$LREAD NUMBER,

20 LOGOFF$PREAD NUMBER,

21 LOGOFF$LWRITE NUMBER,

22 LOGOFF$DEAD NUMBER,

23 LOGOFF$TIME DATE,

24 COMMENT$TEXT VARCHAR2(4000),

25 CLIENTID VARCHAR2(64),

26 SPARE1 VARCHAR2(255),

27 SPARE2 NUMBER,

28 OBJ$LABEL RAW(255),

29 SES$LABEL RAW(255),

30 PRIV$USED NUMBER,

31 SESSIONCPU NUMBER,

32 NTIMESTAMP# TIMESTAMP (6),

33 PROXY$SID NUMBER,

34 USER$GUID VARCHAR2(32),

35 INSTANCE# NUMBER,

36 PROCESS# VARCHAR2(16),

37 XID RAW(8),

38 AUDITID VARCHAR2(64),

39 SCN NUMBER,

40 DBID NUMBER,

41 SQLBIND CLOB,

42 SQLTEXT CLOB,

43 OBJ$EDITION VARCHAR2(30)

44 )

45 tablespace arch_tbs

46 nologging;

Table created.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值