Oracle日志文件相信常用Oracle数据库的朋友都比较熟悉了,下面将为您介绍的是查询Oracle日志文件的几种方法,供您参考学习。数据库
1.查询系统使用的是哪一组日志文件:
select * from v$log;oracle
2.查询正在使用的组所对应的日志文件:
select * from v$logfile;学习
3.强制日志切换:
alter system switch logfile;日志
4.查询历史日志:
select * from v$log_history;ci
5.查询日志的归档模式:
select dbid,name,created,log_mode from v$database;it
6.查询归档日志的信息:
select recid,stamp,thread#,sequence#,name from v$archived_log;thread
7.增长与删除日志文件组
alter database add logfile group 1 ('/home1/oracle/oradata/ora8i/log1a.log'),'/home2/oracle/oradata/ora8i/log1b.log') size 100M;file
alter database drop logfile group 1;select
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';该命令用于不能用删除组及组成员命令删除日志时使用