Re: dba_hist_log and log switch history

From: patrickb <boulayp_at_free.fr>
Date: Tue, 21 Apr 2009 00:13:09 -0700 (PDT)
Message-ID: <f1d0cd72-2595-4366-8eee-67bffe25b6d1_at_q9g2000yqc.googlegroups.com>



On Apr 19, 8:25 pm, "stevedhow..._at_gmail.com" <stevedhow..._at_gmail.com> wrote:
> On Apr 19, 10:54 am, patrick boulay <boul..._at_free.fr> wrote:
>
> > stevedhow..._at_gmail.com wrote:
> > > On Apr 19, 8:14 am, patrick boulay <boul..._at_free.fr> wrote:
> > >> yes, you are right , but I need to use dba_hist
> > >> _log and dba_hist_snapshot ...
>
> > > Why? v$log_history gives you exactly what you are looking for.
>
> > because I want to use data from AWR , not control files , and as there
> > is a DBA_HIST_LOG table ...I would like to use it ;o)
>
> Ahh, "like" is different than "need" :) Just do a natural join, and
> you should be good to go...
>
> select begin_interval_time,status,group#,thread#,sequence
> from dba_hist_log
> natural join dba_hist_snapshot;
>
> HTH,
>
> Steve

actually I have ended with this
I gives me the same results as Toad does

select Count(1),

       to_char(FIRST_TIME,'YYYYMMDDHH24') from
(

    select distinct
DBID,INSTANCE_NUMBER,GROUP#,THREAD#,SEQUENCE#,FIRST_TIME     from dba_hist_log
)
group by to_char(FIRST_TIME,'YYYYMMDDHH24') order by to_char(FIRST_TIME,'YYYYMMDDHH24') / Received on Tue Apr 21 2009 - 02:13:09 CDT

Original text of this message