V$ARCHIVE_GAP ORA-01220

Category: DataGuard 4 years ago

Buenos días, estoy tratando de ver los gabs que existen en mi base de datos, pero al ejecutar el query me manda el siguiente error. Alguien sabe como corregirlo.

SQL> SELECT THREAD#, LOW_SEQUENCE#, HIGH_SEQUENCE# FROM V$ARCHIVE_GAP;
ERROR at line 1:ORA-01220: file based sort illegal before database is open

Gracias

Like it on Facebook, +1 on Google, Tweet it or share this topic on other bookmarking websites.
  • Re: V$ARCHIVE_GAP ORA-01220

    by » 4 years ago


    Al parecer es un bug de oracle, pero puedes ejecutar el siguiente query para realizar la misma acción.

     
    select USERENV('Instance'), high.thread#, low.lsq, high.hsq
    from
      (select a.thread#, rcvsq, min(a.sequence#)-1 hsq
       from v$archived_log a,
            (select lh.thread#, lh.resetlogs_change#, max(lh.sequence#) rcvsq
               from v$log_history lh, v$database_incarnation di
              where lh.resetlogs_time = di.resetlogs_time
                and lh.resetlogs_change# = di.resetlogs_change#
                and di.status = 'CURRENT'
                and lh.thread# is not null
                and lh.resetlogs_change# is not null
                and lh.resetlogs_time is not null
             group by lh.thread#, lh.resetlogs_change#
            ) b
       where a.thread# = b.thread#
         and a.resetlogs_change# = b.resetlogs_change#
         and a.sequence# > rcvsq
       group by a.thread#, rcvsq) high,
     (select srl_lsq.thread#, nvl(lh_lsq.lsq, srl_lsq.lsq) lsq
       from
         (select thread#, min(sequence#)+1 lsq
          from
            v$log_history lh, x$kccfe fe, v$database_incarnation di
          where to_number(fe.fecps) <= lh.next_change#
            and to_number(fe.fecps) >= lh.first_change#
            and fe.fedup!=0 and bitand(fe.festa, 12) = 12
            and di.resetlogs_time = lh.resetlogs_time
            and lh.resetlogs_change# = di.resetlogs_change#
            and di.status = 'CURRENT'
          group by thread#) lh_lsq,
         (select thread#, max(sequence#)+1 lsq
          from
            v$log_history
          where (select min( to_number(fe.fecps))
                 from x$kccfe fe
                 where fe.fedup!=0 and bitand(fe.festa, 12) = 12)
          >= next_change#
          group by thread#) srl_lsq
       where srl_lsq.thread# = lh_lsq.thread#(+)
      ) low
     where low.thread# = high.thread#
     and lsq < = hsq
     and hsq > rcvsq;

    Si esto te funciona, entonces si es debido al bug.

     


    DBASupport Team


  • Re: V$ARCHIVE_GAP ORA-01220

    by » 4 years ago


    Si parece ser el bug que mencionas, ya me regreso el resultado. Este bug donde se puede ver.


  • Re: V$ARCHIVE_GAP ORA-01220

    by » 4 years ago


    Ese se puede ver en el sitio de soporte de oracle, pero para eso debes contar con una cuenta.

    BUG 18411339

     

     


    DBASupport Team


You do not have permissions to reply to this topic.
Powered by CjForum