Pular para o conteúdo
  • Este tópico contém 2 respostas, 2 vozes e foi atualizado pela última vez 13 anos, 1 mês atrás por airoosp.
Visualizando 3 posts - 1 até 3 (de 3 do total)
  • Autor
    Posts
  • #105060
    airoosp
    Participante

      Boa noite,

      Durante a noite é executado através de uma tarefa agendada o dump do banco de dados (10g) em ambiente Windows. O detalhe é que nas últimas e execuções da tarefa, foi verificado no log do dump a mensagem:

      EXP-00008: ORACLE error 1555 encountered
      ORA-01555: snapshot too old: rollback segment number 9 with name “_SYSSMU9$” too small
      EXP-00000: Export terminated unsuccessfully

      Pesquisando na Internet, vi que uma solução seria aumentar a tablespace de undo, mas gostaria de saber a opinião dos colegas.

      Verificando o alert vi que a mensagem de erro aparecem em:

      .
      .
      .

      Fri Feb 01 10:45:35 E. South America Daylight Time 2013
      Thread 1 advanced to log sequence 4407 (LGWR switch)
      Current log# 4 seq# 4407 mem# 0: P:ORACLEPRODUCT10.2.0ORADATASGBDREDO04A.LOG
      Current log# 4 seq# 4407 mem# 1: L:ORADATASGBDREDO04B.LOG
      Fri Feb 01 17:32:33 E. South America Daylight Time 2013
      Thread 1 advanced to log sequence 4408 (LGWR switch)
      Current log# 5 seq# 4408 mem# 0: P:ORACLEPRODUCT10.2.0ORADATASGBDREDO05A.LOG
      Current log# 5 seq# 4408 mem# 1: L:ORADATASGBDREDO05B.LOG
      Fri Feb 01 23:26:22 E. South America Daylight Time 2013
      ORA-01555 caused by SQL statement below (SQL ID: 5nx3j95g0mzrs, Query Duration=0 sec, SCN: 0x0001.88a05247):
      Fri Feb 01 23:26:22 E. South America Daylight Time 2013
      SELECT JOB, OWNER, LOWNER, COWNER, NEXT_DATE, INTERVAL#, FLAG, WHAT, NLSENV, ENV, INSTANCE FROM SYS.EXU8JBQ ORDER BY OWNERID
      Sat Feb 02 05:06:32 E. South America Daylight Time 2013
      Thread 1 advanced to log sequence 4409 (LGWR switch)
      Current log# 2 seq# 4409 mem# 0: P:ORACLEPRODUCT10.2.0ORADATASGBDREDO02A.LOG
      Current log# 2 seq# 4409 mem# 1: L:ORADATASGBDREDO02B.LOG
      Sat Feb 02 06:11:26 E. South America Daylight Time 2013
      Thread 1 advanced to log sequence 4410 (LGWR switch)
      Current log# 3 seq# 4410 mem# 0: P:ORACLEPRODUCT10.2.0ORADATASGBDREDO03A.LOG
      Current log# 3 seq# 4410 mem# 1: L:ORADATASGBDREDO03B.LOG

      .
      .
      .

      Sun Feb 03 14:00:26 E. South America Daylight Time 2013
      Thread 1 advanced to log sequence 4413 (LGWR switch)
      Current log# 5 seq# 4413 mem# 0: P:ORACLEPRODUCT10.2.0ORADATASGBDREDO05A.LOG
      Current log# 5 seq# 4413 mem# 1: L:ORADATASGBDREDO05B.LOG
      Sun Feb 03 23:22:46 E. South America Daylight Time 2013
      ORA-01555 caused by SQL statement below (SQL ID: 5nx3j95g0mzrs, Query Duration=1 sec, SCN: 0x0001.88ca057e):
      Sun Feb 03 23:22:46 E. South America Daylight Time 2013
      SELECT JOB, OWNER, LOWNER, COWNER, NEXT_DATE, INTERVAL#, FLAG, WHAT, NLSENV, ENV, INSTANCE FROM SYS.EXU8JBQ ORDER BY OWNERID
      Mon Feb 04 05:08:53 E. South America Daylight Time 2013
      Thread 1 advanced to log sequence 4414 (LGWR switch)
      Current log# 2 seq# 4414 mem# 0: P:ORACLEPRODUCT10.2.0ORADATASGBDREDO02A.LOG
      Current log# 2 seq# 4414 mem# 1: L:ORADATASGBDREDO02B.LOG
      Mon Feb 04 06:45:34 E. South America Daylight Time 2013
      .
      .
      .

      Fazendo mais algumas pesquisas, executei as querys abaixo para obter mais informações.

      show parameter undo;

      undo_management string AUTO
      undo_retention integer 10800
      undo_tablespace string UNDOTBS1

      Executando a query “select max(maxquerylen) from v$undostat” o resultado apresentado foi 12054 que equivale há um pouco mais de 3 horas.

      Depois executei a query abaixo:

      select
      begin_time “Begin time”,
      end_time “End time”,
      undo_period_in_days “Undo period in days”,
      (rd*(ups*overhead)+overhead) “Bytes”
      from
      (
      select
      value rd
      from
      v$parameter
      where
      name = ‘undo_retention’
      ),
      (
      select
      (sum(undoblks)/sum(((end_time-begin_time)*96400))) ups
      from
      v$undostat
      ),
      (
      select
      value overhead
      from
      v$parameter
      where
      name = ‘db_block_size’
      ),
      (
      select
      to_char(min(begin_time), ‘YYYY-MM-DD:HH24:MI:SS’) begin_time,
      to_char(max(end_time), ‘YYYY-MM-DD:HH24:MI:SS’) end_time,
      (max(end_time)-min(begin_time)) undo_period_in_days
      from
      v$undostat
      );

      Os resultados foram:

      begin_time = 2013-01-31:15:53:26
      end_time = 2013-02-04:15:51:52
      undo period in days = 3,99891203703704
      bytes = 38530153,8991094

      E depois de executar esta query:

      select
      sum(waits)*100 / sum(gets) “Ratio”,
      sum(waits) “Waits”,
      sum(gets) “Gets”
      from
      v$rollstat;

      O resultado foi:

      Ratio = 0,00184632596431231
      Waits = 1400
      Gets = 75826264

      Se o RATIO foi menor que 1% esta bom, certo?

      A tablespace UNDOTBS1 tem 7050625024 bytes em 4 datafiles.

      Verificando os segmentos de rollback:

      select SEGMENT_NAME,status,max_extents
      from dba_rollback_segs
      where tablespace_name=’UNDOTBS1′

      Resultado: 55 segmentos sendo apenas 12 online.

      Se alguém tiver alguma dica sobre como identificar o que esta causando o problema agradeço.

      Obrigado.

      Airton

      #105064
      hudsona
      Participante

        Airton,

        Você precisa monitorar e executar essas queries no momento que você obtem o erro.

        Pelo o que você mostrou se a consulta mais demorada teve 3 horas e seu undo_retention esta menor que isso, então realmente ele não vai te dar garantia e você pode ter o erro.

        Se tiver espaço em disco aumenta o tablespace e o UNDO_RETENTION e monitora até quanto ele vai utilizar nesse período de tempo.

        Se não tiver tem que ver o que essa query esta fazendo e analisar com mais calma.

        #105074
        airoosp
        Participante

          Hudsona,

          Entendi o que você falou mas não consegui identificar qual processo estava executando a query.

          No horário de execução do backup, há poucos usuários conectados.

          Se você tiver mais alguma dica, agradeço.

          Airton

        Visualizando 3 posts - 1 até 3 (de 3 do total)
        • Você deve fazer login para responder a este tópico.