Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: RedoLogs switching
Try this...
REM Log switches
set lin 132
col 00 format a3
col 01 format a3
col 02 format a3
col 03 format a3
col 04 format a3
col 05 format a3
col 06 format a3
col 07 format a3
col 08 format a3
col 09 format a3
col 10 format a3
col 11 format a3
col 12 format a3
col 13 format a3
col 14 format a3
col 15 format a3
col 16 format a3
col 17 format a3
col 18 format a3
col 19 format a3
col 20 format a3
col 21 format a3
col 22 format a3
col 23 format a3
select substr(to_char(first_time,'YYYY-MM-DD'),1,10) " ",
decode(sum(decode(substr(to_char(first_time,'HH24'),1,2),'00',1,0)),0,'-',su m(decode(substr(to_char(first_time,'HH24'),1,2),'00',1,0))) "00",
decode(sum(decode(substr(to_char(first_time,'HH24'),1,2),'01',1,0)),0,'-',su m(decode(substr(to_char(first_time,'HH24'),1,2),'01',1,0))) "01",
decode(sum(decode(substr(to_char(first_time,'HH24'),1,2),'02',1,0)),0,'-',su m(decode(substr(to_char(first_time,'HH24'),1,2),'02',1,0))) "02",
decode(sum(decode(substr(to_char(first_time,'HH24'),1,2),'03',1,0)),0,'-',su m(decode(substr(to_char(first_time,'HH24'),1,2),'03',1,0))) "03",
decode(sum(decode(substr(to_char(first_time,'HH24'),1,2),'04',1,0)),0,'-',su m(decode(substr(to_char(first_time,'HH24'),1,2),'04',1,0))) "04",
decode(sum(decode(substr(to_char(first_time,'HH24'),1,2),'05',1,0)),0,'-',su m(decode(substr(to_char(first_time,'HH24'),1,2),'05',1,0))) "05",
decode(sum(decode(substr(to_char(first_time,'HH24'),1,2),'06',1,0)),0,'-',su m(decode(substr(to_char(first_time,'HH24'),1,2),'06',1,0))) "06",
decode(sum(decode(substr(to_char(first_time,'HH24'),1,2),'07',1,0)),0,'-',su m(decode(substr(to_char(first_time,'HH24'),1,2),'07',1,0))) "07",
decode(sum(decode(substr(to_char(first_time,'HH24'),1,2),'08',1,0)),0,'-',su m(decode(substr(to_char(first_time,'HH24'),1,2),'08',1,0))) "08",
decode(sum(decode(substr(to_char(first_time,'HH24'),1,2),'09',1,0)),0,'-',su m(decode(substr(to_char(first_time,'HH24'),1,2),'09',1,0))) "09",
decode(sum(decode(substr(to_char(first_time,'HH24'),1,2),'10',1,0)),0,'-',su m(decode(substr(to_char(first_time,'HH24'),1,2),'10',1,0))) "10",
decode(sum(decode(substr(to_char(first_time,'HH24'),1,2),'11',1,0)),0,'-',su m(decode(substr(to_char(first_time,'HH24'),1,2),'11',1,0))) "11",
decode(sum(decode(substr(to_char(first_time,'HH24'),1,2),'12',1,0)),0,'-',su m(decode(substr(to_char(first_time,'HH24'),1,2),'12',1,0))) "12",
decode(sum(decode(substr(to_char(first_time,'HH24'),1,2),'13',1,0)),0,'-',su m(decode(substr(to_char(first_time,'HH24'),1,2),'13',1,0))) "13",
decode(sum(decode(substr(to_char(first_time,'HH24'),1,2),'14',1,0)),0,'-',su m(decode(substr(to_char(first_time,'HH24'),1,2),'14',1,0))) "14",
decode(sum(decode(substr(to_char(first_time,'HH24'),1,2),'15',1,0)),0,'-',su m(decode(substr(to_char(first_time,'HH24'),1,2),'15',1,0))) "15",
decode(sum(decode(substr(to_char(first_time,'HH24'),1,2),'16',1,0)),0,'-',su m(decode(substr(to_char(first_time,'HH24'),1,2),'16',1,0))) "16",
decode(sum(decode(substr(to_char(first_time,'HH24'),1,2),'17',1,0)),0,'-',su m(decode(substr(to_char(first_time,'HH24'),1,2),'17',1,0))) "17",
decode(sum(decode(substr(to_char(first_time,'HH24'),1,2),'18',1,0)),0,'-',su m(decode(substr(to_char(first_time,'HH24'),1,2),'18',1,0))) "18",
decode(sum(decode(substr(to_char(first_time,'HH24'),1,2),'19',1,0)),0,'-',su m(decode(substr(to_char(first_time,'HH24'),1,2),'19',1,0))) "19",
decode(sum(decode(substr(to_char(first_time,'HH24'),1,2),'20',1,0)),0,'-',su m(decode(substr(to_char(first_time,'HH24'),1,2),'20',1,0))) "20",
decode(sum(decode(substr(to_char(first_time,'HH24'),1,2),'21',1,0)),0,'-',su m(decode(substr(to_char(first_time,'HH24'),1,2),'21',1,0))) "21",
decode(sum(decode(substr(to_char(first_time,'HH24'),1,2),'22',1,0)),0,'-',su m(decode(substr(to_char(first_time,'HH24'),1,2),'22',1,0))) "22",
decode(sum(decode(substr(to_char(first_time,'HH24'),1,2),'23',1,0)),0,'-',su
m(decode(substr(to_char(first_time,'HH24'),1,2),'23',1,0))) "23" from sys.v_$log_history group by substr(to_char(first_time,'YYYY-MM-DD'),1,10);
Steve Orr
-----Original Message-----
Sent: Friday, August 24, 2001 10:31 AM
To: Multiple recipients of list ORACLE-L
I think there is a table like v$loghistory that has the information about latest log switches. Not sure about the correct name, but you can search dba_objects for object_name like '%LOG_HIST%' you'll probably find it
G
--- Jairo Villalobos <jvilla_at_ccss.sa.cr> wrote:
> Hi,
>
> How to Know when switching RedoLogs occur?
> Oracle 8.0.6.2 TRUE 64 5.0
>
> Thank's...
> javs
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Orr, Steve INET: sorr_at_rightnow.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Fri Aug 24 2001 - 10:55:36 CDT
![]() |
![]() |