ORACLEÉó¼Æ
1¡¢Ê²Ã´ÊÇÉó¼Æ
Éó¼Æ£¨Audit)ÓÃÓÚ¼àÊÓÓû§ËùÖ´ÐеÄÊý¾Ý¿â²Ù×÷£¬²¢ÇÒOracle»á½«Éó¼Æ¸ú×Ù½á¹û´æ·Åµ½OSÎļþ£¨Ä¬ÈÏλÖÃΪ$ORACLE_BASE/admin/$ORACLE_SID/adump/£©»òÊý¾Ý¿â£¨´æ´¢ÔÚsystem±í¿Õ¼äÖÐµÄ SYS.AUD$±íÖУ¬¿Éͨ¹ýÊÓͼdba_audit_trail²é¿´£©ÖС£Ä¬ÈÏÇé¿öÏÂÉó¼ÆÊÇûÓпªÆôµÄ¡£
²»¹ÜÄãÊÇ·ñ´ò¿ªÊý¾Ý¿âµÄÉó¼Æ¹¦ÄÜ£¬ÒÔÏÂÕâЩ²Ù×÷ϵͳ»áÇ¿ÖƼǼ£ºÓùÜÀíԱȨÏÞÁ¬½ÓInstance£»Æô¶¯Êý¾Ý¿â£»¹Ø±ÕÊý¾Ý¿â¡£
2¡¢ºÍÉó¼ÆÏà¹ØµÄÁ½¸öÖ÷Òª²ÎÊý
AUDIT_SYS_OPERATIONS
AUDIT_SYS_OPERATIONS enables or disables the auditing of operations issued by user SYS, and users connecting with SYSDBA or SYSOPER privileges. The audit records are written to the operating system's audit trail. The audit records will be written in XML format if the AUDIT_TRAIL initialization parameter is set to XML.
AUDIT_TRAIL
AUDIT_TRAIL enables or disables database auditing.
Values:
none
Disables database auditing.
os
Enables database auditing and directs all audit records to the operating system's audit trail.
db
Enables database auditing and directs all audit records to the database audit trail (the SYS.AUD$ table).
db,extended
Enables database auditing and directs all audit records to the database audit trail (the SYS.AUD$ table). In addition, populates the SQLBIND and SQLTEXT CLOB columns of the SYS.AUD$ table.
xml
Enables database auditing and writes all audit records to XML format OS files.
xml,extended
Enables database auditing and prints all columns of the audit trail, including SqlText and SqlBind values.
You can use the SQL statement AUDIT to set auditing options regardless of the setting of this parameter.
×¢£ºÕâÁ½¸ö²ÎÊýÊÇstatic²ÎÊý£¬ÐèÒªÖØÐÂÆô¶¯Êý¾Ý¿â²ÅÄÜÉúЧ¡£
3¡¢Éó¼Æ¼¶±ð
µ±¿ªÆôÉó¼Æ¹¦Äܺ󣬿ÉÔÚÈý¸ö¼¶±ð¶ÔÊý¾Ý¿â½øÐÐÉó¼Æ£ºStatement(Óï¾ä)¡¢Privilege£¨È¨ÏÞ£©¡¢object£¨¶ÔÏ󣩡£
Statement£º
°´Óï¾äÀ´Éó¼Æ£¬±ÈÈçaudit table »áÉó¼ÆÊý¾Ý¿âÖÐËùÓеÄcreate table,drop table,truncate tableÓï¾ä£¬alter session by cmy»áÉó¼ÆcmyÓû§ËùÓеÄÊý¾Ý¿âÁ¬½Ó¡£
Privilege£º
°´È¨ÏÞÀ´Éó¼Æ£¬µ±Óû§Ê¹ÓÃÁ˸ÃȨÏÞÔ
Ïà¹ØÎĵµ£º
oracle±í¿Õ¼ä²Ù×÷Ïê½â
1
2
3×÷Õߣº À´Ô´£º ¸üÐÂÈÕÆÚ£º2006-01-04
5
6
7½¨Á¢±í¿Õ¼ä
8
9CREATE TABLESPACE data01
10DATAFILE '/ora ......
ʹÓÃCursor:
--²âÊÔһϣ¬½ñÌì²ÅÉêÇëʹÓÃitpub.net µÄblog
declare
RoomID Room.RoomID%Type;
RoomName Room.RoomName%Type;
cursor crRoom is
select RoomID,RoomName
from Room;
begin
open crRoom;loop;
fetch crRoom into RoomID,RoomName;
exit when crRoom%notFound;
end loop;
close crRoom;
end;
& ......
1¡¢²éѯµÚ¼¸ÐеļǼ
select sal from emp where rownum=1; //²éѯµÃµ½µÚÒ»ÐмǼ
select sal from emp where rownum=5; //²»¿ÉÒÔ²éѯµ½µÚÎåÐмǼ£¬ÒòΪrownum ×ÜÊÇ´Ó1¿ªÊ¼²éѯµÄ£¬¹ÊÕâÖÖ·½Ê½²»¿ÉÒÔÖ±½ÓµÃµ½µÚ¼¸ÐеļǼ¡£ÈôÏëµÃµ½µÚÎåÐмǼ£¬Ó¦²ÉÓÃÈçÏ·½Ê½£º
select r,sal from (select rownum r,sal from emp) wher ......
v$database Êý¾Ý¿âÐÅÏ¢
v$datafile Êý¾ÝÎļþÐÅÏ¢
v$controlfile ¿ØÖÆÎļþÐÅÏ¢
v$logfile ÖØ×öÈÕÖ¾ÐÅÏ¢
v$instance Êý¾Ý¿âʵÀýÐÅÏ¢
v$log ÈÕÖ¾×éÐÅÏ¢
v$loghist ÈÕÖ¾ÀúÊ·ÐÅÏ¢
v$sga Êý¾Ý¿âSGAÐÅÏ¢
v$parameter ³õʼ»¯²ÎÊýÐÅÏ¢
v$process Êý¾Ý¿â·þÎñÆ÷½ø³ÌÐÅÏ¢
v$bgprocess Êý¾Ý¿âºǫ́½ø³ÌÐÅÏ¢
v$controlfil ......