--Oracle日誌文件管理與查看 select * from v$sql (#查看最近所做的操做) --select * fromv $sqlarea(#查看最近所做的操做) -- 1.查詢系統使用的是哪一組日誌文件: select * from v$log; -- 2.查詢正在使用的組所對應的日誌文件: select * from v$logfile; --3.強制日誌切換: alter system switch logfile; --4.查詢歷史日誌: select * from v$log_history; --5.查詢日誌的歸檔模式: elect dbid,name,created,log_mode from v$database; --6.查詢歸檔日誌的信息: select recid,stamp,thread#,sequence#,name from v$archived_log; --7.增長與刪除日誌文件組 alter database add logfile group 1 ('/home1/oracle/oradata/ora8i/log1a.log'),'/home2/oracle/oradata/ora8i/log1b.log') size 100M; alter database drop logfile group 1; --8.增長與刪除日誌成員 alter database add logfile member '/home1/oracle/oradata/ora8i/log1a.log' to group 1,'/home1/oracle/oradata/ora8i/log2a.log' to group 2; alter database drop logfile member '/home1/oracle/oradata/ora8i/log1a.log' ; --9.日誌文件移動 alter database rename file '/home1/oracle/oradata/ora8i/log1a.log' to '/home2/oracle/oradata/ora8i/log1a.log'; --10.清除日誌文件 alter database clear logfile '/home1/oracle/oradata/ora8i/log1a.log';