oracle语句

1.oracle出现“数据酷块损坏”后,根据文件号和块号查询对象的语句:

select * from dba_extents t where t.FILE_ID=文件号 and 块号 between t.BLOCK_ID and t.BLOCK_ID+t.BLOCKS-1;

2.查询每天日志switch数量的语句:

SELECT To_Char(First_Time, 'yyyy-mm-dd') Day1, COUNT(*)
  FROM V$log_History
 WHERE First_Time >= To_Date('2012-11-01', 'yyyy-mm-dd')
 GROUP BY To_Char(First_Time, 'yyyy-mm-dd');

 

你可能感兴趣的:(oracle语句)