Message-Id: <10717.125182@fatcity.com> From: Satar Naghshineh Date: Thu, 21 Dec 2000 13:20:07 -0800 Subject: RE: Query to see # log switches per hour This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C06B93.CE912C80 Content-Type: text/plain Thanks for the contribution... However, tail -40f /direct/path/to/alert.log in Unix would work as well and will be updated in real time. To make it even more efficient, you should create an alias. Regards, Satar > -----Original Message----- > From: Boivin, Patrice J [SMTP:BoivinP@mar.dfo-mpo.gc.ca] > Sent: Thursday, December 21, 2000 8:48 PM > To: Multiple recipients of list ORACLE-L > Subject: Query to see # log switches per hour > > Fyi, > > I adapted a query I found somewhere on the 'net, it used to give me ## for > number of switches when massive data loads were taking place. > > This will show you how often log switches take place on your database. > > select substr(time, 1, 5) day, > to_char(sum(decode(substr(time,10,2),'00',1,0)),'999') " 00 ", > to_char(sum(decode(substr(time,10,2),'01',1,0)),'999') " 01 ", > to_char(sum(decode(substr(time,10,2),'02',1,0)),'999') " 02 ", > to_char(sum(decode(substr(time,10,2),'03',1,0)),'999') " 03 ", > to_char(sum(decode(substr(time,10,2),'04',1,0)),'999') " 04 ", > to_char(sum(decode(substr(time,10,2),'05',1,0)),'999') " 05 ", > to_char(sum(decode(substr(time,10,2),'06',1,0)),'999') " 06 ", > to_char(sum(decode(substr(time,10,2),'07',1,0)),'999') " 07 ", > to_char(sum(decode(substr(time,10,2),'08',1,0)),'999') " 08 ", > to_char(sum(decode(substr(time,10,2),'09',1,0)),'999') " 09 ", > to_char(sum(decode(substr(time,10,2),'10',1,0)),'999') " 10 ", > to_char(sum(decode(substr(time,10,2),'11',1,0)),'999') " 11 ", > to_char(sum(decode(substr(time,10,2),'12',1,0)),'999') " 12 ", > to_char(sum(decode(substr(time,10,2),'13',1,0)),'999') " 13 ", > to_char(sum(decode(substr(time,10,2),'14',1,0)),'999') " 14 ", > to_char(sum(decode(substr(time,10,2),'15',1,0)),'999') " 15 ", > to_char(sum(decode(substr(time,10,2),'16',1,0)),'999') " 16 ", > to_char(sum(decode(substr(time,10,2),'17',1,0)),'999') " 17 ", > to_char(sum(decode(substr(time,10,2),'18',1,0)),'999') " 18 ", > to_char(sum(decode(substr(time,10,2),'19',1,0)),'999') " 19 ", > to_char(sum(decode(substr(time,10,2),'20',1,0)),'999') " 20 ", > to_char(sum(decode(substr(time,10,2),'21',1,0)),'999') " 21 ", > to_char(sum(decode(substr(time,10,2),'22',1,0)),'999') " 22 ", > to_char(sum(decode(substr(time,10,2),'23',1,0)),'999') " 23 " > from v$log_history > group by substr(time,1,5) > / > > > Merry Holidays, > Patrice Boivin > Systems Analyst (Oracle Certified DBA) > > ------_=_NextPart_001_01C06B93.CE912C80 Content-Type: text/html Content-Transfer-Encoding: quoted-printable RE: Query to see # log switches per hour

Thanks for the = contribution...

However, tail -40f = /direct/path/to/alert<sid>.log   in Unix would work as = well and will be updated in real time. To make it even more efficient, = you should create an alias.

Regards,
Satar