Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Query to see # log switches per hour

RE: Query to see # log switches per hour

From: Satar Naghshineh <Satar.Naghshineh_at_irvine.mellesgriot.com>
Date: Thu, 21 Dec 2000 13:20:07 -0800
Message-Id: <10717.125182@fatcity.com>


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<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

> -----Original Message-----
> From:	Boivin, Patrice J [SMTP:BoivinP_at_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

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3DUS-ASCII">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2650.12">
<TITLE>RE: Query to see # log switches per hour</TITLE>
</HEAD>
<BODY>

<P><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">Thanks for the =
contribution...</FONT>
</P>

<P><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">However, tail -40f =
/direct/path/to/alert&lt;sid&gt;.log&nbsp;&nbsp; in Unix would work as = well and will be updated in real time. To make it even more efficient, = you should create an alias.</FONT></P>

<P><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">Regards,</FONT>
<BR><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">Satar</FONT>
</P>
<BR>
<UL>
<P><FONT SIZE=3D1 FACE=3D"Arial">-----Original Message-----</FONT>
<BR><B><FONT SIZE=3D1 FACE=3D"Arial">From:&nbsp;&nbsp;</FONT></B> <FONT =
SIZE=3D1 FACE=3D"Arial">Boivin, Patrice J = [SMTP:BoivinP_at_mar.dfo-mpo.gc.ca]</FONT>
<BR><B><FONT SIZE=3D1 FACE=3D"Arial">Sent:&nbsp;&nbsp;</FONT></B> <FONT =
SIZE=3D1 FACE=3D"Arial">Thursday, December 21, 2000 8:48 PM</FONT>
<BR><B><FONT SIZE=3D1 =

FACE=3D"Arial">To:&nbsp;&nbsp;&nbsp;&nbsp;</FONT></B> <FONT SIZE=3D1 = FACE=3D"Arial">Multiple recipients of list ORACLE-L</FONT>
<BR><B><FONT SIZE=3D1 =

FACE=3D"Arial">Subject:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT>=
</B> <FONT SIZE=3D1 FACE=3D"Arial">Query to see # log switches per =
hour</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Fyi,</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">I adapted a query I found somewhere on =
the 'net, it used to give me ## for</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">number of switches when massive data =
loads were taking place.</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">This will show you how often log =
switches take place on your database.</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">select substr(time, 1, 5) day,</FONT>
<BR><FONT SIZE=3D2 =

FACE=3D"Arial">to_char(sum(decode(substr(time,10,2),'00',1,0)),'999') = &quot; 00 &quot;,</FONT>
<BR><FONT SIZE=3D2 =

FACE=3D"Arial">to_char(sum(decode(substr(time,10,2),'01',1,0)),'999') = &quot; 01 &quot;,</FONT>
<BR><FONT SIZE=3D2 =

FACE=3D"Arial">to_char(sum(decode(substr(time,10,2),'02',1,0)),'999') = &quot; 02 &quot;,</FONT>
<BR><FONT SIZE=3D2 =

FACE=3D"Arial">to_char(sum(decode(substr(time,10,2),'03',1,0)),'999') = &quot; 03 &quot;,</FONT>
<BR><FONT SIZE=3D2 =

FACE=3D"Arial">to_char(sum(decode(substr(time,10,2),'04',1,0)),'999') = &quot; 04 &quot;,</FONT>
<BR><FONT SIZE=3D2 =

FACE=3D"Arial">to_char(sum(decode(substr(time,10,2),'05',1,0)),'999') = &quot; 05 &quot;,</FONT>
<BR><FONT SIZE=3D2 =

FACE=3D"Arial">to_char(sum(decode(substr(time,10,2),'06',1,0)),'999') = &quot; 06 &quot;,</FONT>
<BR><FONT SIZE=3D2 =

FACE=3D"Arial">to_char(sum(decode(substr(time,10,2),'07',1,0)),'999') = &quot; 07 &quot;,</FONT>
<BR><FONT SIZE=3D2 =

FACE=3D"Arial">to_char(sum(decode(substr(time,10,2),'08',1,0)),'999') = &quot; 08 &quot;,</FONT>
<BR><FONT SIZE=3D2 =

FACE=3D"Arial">to_char(sum(decode(substr(time,10,2),'09',1,0)),'999') = &quot; 09 &quot;,</FONT>
<BR><FONT SIZE=3D2 =

FACE=3D"Arial">to_char(sum(decode(substr(time,10,2),'10',1,0)),'999') = &quot; 10 &quot;,</FONT>
<BR><FONT SIZE=3D2 =

FACE=3D"Arial">to_char(sum(decode(substr(time,10,2),'11',1,0)),'999') = &quot; 11 &quot;,</FONT>
<BR><FONT SIZE=3D2 =

FACE=3D"Arial">to_char(sum(decode(substr(time,10,2),'12',1,0)),'999') = &quot; 12 &quot;,</FONT>
<BR><FONT SIZE=3D2 =

FACE=3D"Arial">to_char(sum(decode(substr(time,10,2),'13',1,0)),'999') = &quot; 13 &quot;,</FONT>
<BR><FONT SIZE=3D2 =

FACE=3D"Arial">to_char(sum(decode(substr(time,10,2),'14',1,0)),'999') = &quot; 14 &quot;,</FONT>
<BR><FONT SIZE=3D2 =

FACE=3D"Arial">to_char(sum(decode(substr(time,10,2),'15',1,0)),'999') = &quot; 15 &quot;,</FONT>
<BR><FONT SIZE=3D2 =

FACE=3D"Arial">to_char(sum(decode(substr(time,10,2),'16',1,0)),'999') = &quot; 16 &quot;,</FONT>
<BR><FONT SIZE=3D2 =

FACE=3D"Arial">to_char(sum(decode(substr(time,10,2),'17',1,0)),'999') = &quot; 17 &quot;,</FONT>
<BR><FONT SIZE=3D2 =

FACE=3D"Arial">to_char(sum(decode(substr(time,10,2),'18',1,0)),'999') = &quot; 18 &quot;,</FONT>
<BR><FONT SIZE=3D2 =

FACE=3D"Arial">to_char(sum(decode(substr(time,10,2),'19',1,0)),'999') = &quot; 19 &quot;,</FONT>
<BR><FONT SIZE=3D2 =

FACE=3D"Arial">to_char(sum(decode(substr(time,10,2),'20',1,0)),'999') = &quot; 20 &quot;,</FONT>
<BR><FONT SIZE=3D2 =

FACE=3D"Arial">to_char(sum(decode(substr(time,10,2),'21',1,0)),'999') = &quot; 21 &quot;,</FONT>
<BR><FONT SIZE=3D2 =

FACE=3D"Arial">to_char(sum(decode(substr(time,10,2),'22',1,0)),'999') = &quot; 22 &quot;,</FONT>
<BR><FONT SIZE=3D2 =

FACE=3D"Arial">to_char(sum(decode(substr(time,10,2),'23',1,0)),'999') = &quot; 23 &quot; </FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">from v$log_history</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">group by substr(time,1,5)</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">/</FONT>
</P>
<BR>

<P><FONT SIZE=3D2 FACE=3D"Arial">Merry Holidays,</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Patrice Boivin</FONT>
Received on Thu Dec 21 2000 - 15:20:07 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US