Pular para o conteúdo
  • Este tópico contém 32 respostas, 6 vozes e foi atualizado pela última vez 16 anos, 4 meses atrás por Rodrigo Almeida.
Visualizando 15 posts - 1 até 15 (de 33 do total)
  • Autor
    Posts
  • #88108
    LoadingXp
    Participante

      Boa noite a todos.

      Estou tentando restaurar uma base de dados para ser utilizada como standby e estou com o problema abaixo:

      RMAN> run {
      allocate channel c1 device type disk;
      set until time "to_date('20-07-2009 09:32','DD-MM-YYYY HH24:MI')";
      restore database;
      release channel c1;
      }
      2> 3> 4> 5> 6>
      using target database control file instead of recovery catalog
      allocated channel: c1
      channel c1: sid=539 devtype=DISK

      executing command: SET until clause

      Starting restore at 22-JUL-09

      creating datafile fno=1 name=+DATADG/spintcp/system
      released channel: c1
      RMAN-00571: ===========================================================
      RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
      RMAN-00571: ===========================================================
      RMAN-03002: failure of restore command at 07/22/2009 18:22:31
      ORA-01180: can not create datafile 1
      ORA-01110: data file 1: '+DATADG/spintcp/system'

      Porque está acontecendo isso??

      Segue abaixo as configurações do meu RMAN:

      RMAN> show all;

      RMAN configuration parameters are:
      CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
      CONFIGURE BACKUP OPTIMIZATION OFF; # default
      CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
      CONFIGURE CONTROLFILE AUTOBACKUP ON;
      CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/oracle/bk/%F';
      CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET;
      CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
      CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
      CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT "/oracle/bk/%d_%U";
      CONFIGURE MAXSETSIZE TO UNLIMITED; # default
      CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
      CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
      CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
      CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/oracle/app/oracle/product/10.2.0/dbs/snapcf_SPINTCP.f'; # default

      Obrigado.

      #88114
      David Siqueira
      Participante

        Brother, o seu ambiente destino esta preparado para receber o backup, digo em termos de estrutura?…
        Precisa ver se os caminhos e locais de arquivos estão corretos nas duas bases, do contrário ele pode tentar criar um arquivo em um local não pré existente e consequentemente gerar erros.

        Abraço.

        #88115
        David Siqueira
        Participante

          Veja como foi resolvido isso :

          http://www.orafaq.com/forum/t/86696/2/

          Abraços

          #88117
          ramasine
          Participante

            Bom dia,

            • O RESTORE que está realizando é para a mesma máquina ou remoto?
            • Se for remoto, existe a mesma estrutura de diretórios em embas as máquinas?
            • Verifique as permissões no diretório dos datafiles, se estão indênticas ao banco de dados que se quer restaurar!

            Aqui segue mais um link com um problema semelhante e a sua resolução!

            http://dbaforums.org/oracle/index.php?s … &pid=31841 mode=threaded&start=#entry31841

            Abs
            Marcelo Ramasine

            #88122
            LoadingXp
            Participante

              O ambiente é +ASM e está tudo preparado esse ambiente é standby manual, e eu recupero através do RMAN, com archives gerados de produção.

              [size=2][oracle@spinsinajb1 ~]$ rman target /

              Recovery Manager: Release 10.2.0.3.0 - Production on Thu Jul 23 08:54:14 2009

              Copyright (c) 1982, 2005, Oracle. All rights reserved.

              connected to target database: SPINTCP (DBID=1040278867, not open)

              RMAN> restore database;

              Starting restore at 23-JUL-09
              using target database control file instead of recovery catalog
              allocated channel: ORA_DISK_1
              channel ORA_DISK_1: sid=529 devtype=DISK

              skipping datafile 1; already restored to file +DATADG/spintcp/system
              skipping datafile 2; already restored to file +DATADG/spintcp/undo1
              skipping datafile 3; already restored to file +DATADG/spintcp/sysaux
              skipping datafile 4; already restored to file +DATADG/spintcp/undo2
              skipping datafile 5; already restored to file +DATADG/spintcp/mt4
              skipping datafile 6; already restored to file +DATADG/spintcp/hist
              skipping datafile 7; already restored to file +DATADG/spintcp/tools
              skipping datafile 8; already restored to file +DATADG/spintcp/tsdar
              skipping datafile 9; already restored to file +DATADG/spintcp/tsdbo
              skipping datafile 10; already restored to file +DATADG/spintcp/tsdcc
              skipping datafile 11; already restored to file +DATADG/spintcp/tsdcf
              skipping datafile 12; already restored to file +DATADG/spintcp/tsdct
              skipping datafile 13; already restored to file +DATADG/spintcp/tsdcv
              skipping datafile 14; already restored to file +DATADG/spintcp/tsdhb
              skipping datafile 15; already restored to file +DATADG/spintcp/tsdsc
              skipping datafile 16; already restored to file +DATADG/spintcp/tsdsw
              skipping datafile 17; already restored to file +DATADG/spintcp/tshac
              skipping datafile 18; already restored to file +DATADG/spintcp/tsiar
              skipping datafile 19; already restored to file +DATADG/spintcp/tsibo
              skipping datafile 20; already restored to file +DATADG/spintcp/tsicc
              skipping datafile 21; already restored to file +DATADG/spintcp/tsicf
              skipping datafile 22; already restored to file +DATADG/spintcp/tsict
              skipping datafile 23; already restored to file +DATADG/spintcp/tsicv
              skipping datafile 24; already restored to file +DATADG/spintcp/tsisc
              skipping datafile 25; already restored to file +DATADG/spintcp/tsisw
              skipping datafile 26; already restored to file +DATADG/spintcp/users
              skipping datafile 27; already restored to file +DATADG/spintcp/hstock
              skipping datafile 28; already restored to file +DATADG/spintcp/tsdomf
              skipping datafile 29; already restored to file +DATADG/spintcp/tshaci
              skipping datafile 30; already restored to file +DATADG/spintcp/tsiomf
              skipping datafile 31; already restored to file +DATADG/spintcp/minicom
              skipping datafile 32; already restored to file +DATADG/spintcp/tscedro
              skipping datafile 33; already restored to file +DATADG/spintcp/tsdhbha
              skipping datafile 34; already restored to file +DATADG/spintcp/tsihbha
              skipping datafile 35; already restored to file +DATADG/spintcp/user_data
              skipping datafile 36; already restored to file +DATADG/spintcp/minicom_001
              skipping datafile 37; already restored to file +DATADG/spintcp/sisfin
              skipping datafile 49; already restored to file +DATADG/spintcp/tsims.db
              skipping datafile 50; already restored to file +DATADG/spintcp/tsdms.db
              skipping datafile 51; already restored to file +DATADG/spintcp/tsdsc2
              skipping datafile 52; already restored to file +DATADG/spintcp/tsdbo2
              skipping datafile 53; already restored to file +DATADG/spintcp/tsdcc2
              skipping datafile 54; already restored to file +DATADG/spintcp/minicom_001_2
              skipping datafile 56; already restored to file +DATADG/spintcp/tsdms.db_2
              skipping datafile 57; already restored to file +DATADG/spintcp/tsibo_2
              skipping datafile 58; already restored to file +DATADG/spintcp/sisfin_2
              skipping datafile 60; already restored to file +DATADG/spintcp/tsdcf_2
              skipping datafile 61; already restored to file +DATADG/spintcp/tsiar_2
              skipping datafile 62; already restored to file +DATADG/spintcp/tsicc_2
              skipping datafile 63; already restored to file +DATADG/spintcp/tsaudits
              restore not done; all files readonly, offline, or already restored
              Finished restore at 23-JUL-09
              [/size]

              [size=9]
              RMAN> recover database;

              Starting recover at 23-JUL-09
              using channel ORA_DISK_1

              starting media recovery

              unable to find archive log
              archive log thread=1 sequence=182057
              RMAN-00571: ===========================================================
              RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
              RMAN-00571: ===========================================================
              RMAN-03002: failure of recover command at 07/23/2009 09:03:32
              RMAN-06054: media recovery requesting unknown log: thread 1 seq 182057 lowscn 10 245436450191

              RMAN>[/size]

              #88124
              David Siqueira
              Participante

                Cara acho que antes de você mandar o restore, seria bom fazer um crosscheck depois um Validate pra ver até onde esse backup é e pode ser utilizado, porque pela mensagem de erro me parece que ele perdeu ou não encontrou um archive necessário pra recuperação completa.

                Ats.

                #88142
                LoadingXp
                Participante

                  Mudou o erro, segue abaixo:

                  RMAN> recover database until time "to_date('20-07-2009 22:00','DD-MM-YYYY HH24:MI')";

                  Starting recover at 23-JUL-09
                  using channel ORA_DISK_1

                  starting media recovery

                  unable to find archive log
                  archive log thread=1 sequence=182057
                  Oracle Error:
                  ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
                  ORA-01194: file 1 needs more recovery to be consistent
                  ORA-01110: data file 1: '+DATADG/spintcp/system'

                  RMAN-00571: ===========================================================
                  RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
                  RMAN-00571: ===========================================================
                  RMAN-03002: failure of recover command at 07/23/2009 14:28:53
                  RMAN-06054: media recovery requesting unknown log: thread 1 seq 182057 lowscn 10245436450191

                  Obrigado a todos.

                  #88143
                  David Siqueira
                  Participante

                    Parceiro pelo erro mostrado esta faltando archive, ele precisa de mais essa sequencia deste thread para poder abrir seu banco de dados de maneira integra e segura, e pra completar é justamente o archive que ira validar o datafile da Tablespace SYSTEM.

                    Sugiro que localize essa sequencia que ele esta pedindo, e refaça o processo, se não houver essa sequencia vai ficar bem complicado.

                    Abraço.

                    #88144
                    LoadingXp
                    Participante

                      Drbs uma pergunta:

                      Eu estou fazendo um backup full com o RMAN do meu ambiente com o comando abaixo:

                      rman target /
                      crosscheck backup;
                      delete noprompt expired backup;
                      backup as compressed backupset database;
                      backup current controlfile for standby;
                      exit;

                      Esse backup não é full??? Por que ele estaria me pedindo um log adicional?

                      Obrigado.

                      #88146
                      David Siqueira
                      Participante

                        Faltou você mandar os archives também parceiro, assim quando ele for fazer os passos do restore database e recover database não faltara nenhuma informação, tente assim :

                        run {
                        allocate channel t1 type disk format '/u03/backup/BKP_AVULSO_ONLINE_%d_%t_%s.rman';
                        allocate channel t2 type disk format '/u03/backup/BKP_AVULSO_ONLINE_%d_%t_%s.rman';
                        allocate channel t3 type disk format '/u03/backup/BKP_AVULSO_ONLINE_%d_%t_%s.rman';
                        allocate channel t4 type disk format '/u03/backup/BKP_AVULSO_ONLINE_%d_%t_%s.rman';
                        allocate channel t5 type disk format '/u03/backup/BKP_AVULSO_ONLINE_%d_%t_%s.rman';
                        allocate channel t6 type disk format '/u03/backup/BKP_AVULSO_ONLINE_%d_%t_%s.rman';
                        allocate channel t7 type disk format '/u03/backup/BKP_AVULSO_ONLINE_%d_%t_%s.rman';
                        backup duration 05:00 minimize time incremental level 0 database include current controlfile
                        spfile
                        tag 'BKP_AVULSO_ONLINE';
                        sql 'alter system archive log current';
                        backup archivelog all tag 'BKP_AVULSO_ARCHIVES';
                        release channel t1;
                        release channel t2;
                        release channel t3;
                        release channel t4;
                        release channel t5;
                        release channel t6;
                        release channel t7;
                        }

                        Abraços

                        #88152
                        Rodrigo Almeida
                        Participante

                          Na verdade tu está fazendo um HOT BACKUP! Que não é CONSISTENTE!!

                          Quando for realizar o backup FULL, faça o backup dos archives. Igual ao script que o David passo!!!

                          Só não entendi uma coisa, o stand-by com RMAN não é muito nesse modo, pois depois tem que abrir em standby a outra base, ou tu quer apenas fazer o backup e rsotre dele???

                          Abraços,

                          Rodrigo Almeida

                          #88156
                          LoadingXp
                          Participante

                            Essa base de dados é um Standby manual, esse banco de dados vai estar sempre MOUNT.

                            Só recebendo os archives e aplicando-os.

                            O backup script de backup anterior estava:

                            rman target /
                            crosscheck backup;
                            delete noprompt expired backup;
                            backup database;
                            backup current controlfile for standby;
                            exit;

                            e eu mudei para

                            rman target /
                            crosscheck backup;
                            delete noprompt expired backup;
                            backup as compressed backupset database;
                            backup current controlfile for standby;
                            exit;

                            Ta ai o meu erro, certo?

                            #88157
                            Rodrigo Almeida
                            Participante

                              Teoricamente não.

                              Pq tu apenas mandou fazer o backup da base comprimido. Ou seja, compactado para ganhar mais espaço em disco.

                              Mas no momento do restore para permanecer em mount, ele não está conseguindo igualar os SCNs, aplica os archives no seu standby que pode resolver o problema.

                              Ou faça o backup junto com os archives e veja se abre o standby.

                              Uma mandeira simples de fazer o standby com o RMAN seria usar o DUPLICATE DATABASE TO STANDBY…

                              Mas é outro assunto…

                              Tente ver se isso resolve.

                              Abraços,

                              Rodrigo Almeida

                              #88158
                              David Siqueira
                              Participante

                                Hum!!!…
                                Você tem um serviço de DG então ai no seu ambiente…porque se ele fica sempre em mount , acredito que seja porque deva estar aplicando os archives que são enviados automaticamente do seu ambiente principal para esse ambiente em Stand-By correto?

                                Abraço

                                #88163
                                LoadingXp
                                Participante

                                  Entendi.

                                  Foi falha minha não ter explicado, mas vou passar meu ambietne

                                  Meu ambiente de produção é ASM e RAC, esse ambiente não pode ter indisponibilidade alguma, nem para backup…

                                  Eu tenho outra maquina que fica em outro local e esse arquivo é jogado via internet.

                                  Como o backup com o script “backup database”, dava um total de 120GB para jogar isso via internet é um parto… (rs)

                                  Ai eu quis ativar a compressão do backup, meu então o script de “backup database” para “backup as compressed backupset database;”

                                  Como nos tivemos uma falha de rede que durou 5 dias no site backup, eu vou ter que reconstruir esse ambiente para receber diariamente esses archives e aplicar nesse banco, tudo em modo “Mount”.

                                  O que eu fiz:

                                  Realizei o backup com o script:

                                  rman target /
                                  crosscheck backup;
                                  delete noprompt expired backup;
                                  backup as compressed backupset database;
                                  backup current controlfile for standby;
                                  exit;

                                  E agora quero fazer o restore para ativar esse ambiente novamente, só que eu não consigo.

                                  RMAN> recover database until time “to_date(’20-07-2009 22:00′,’DD-MM-YYYY HH24:MI’)”;

                                  [size=2]Starting recover at 23-JUL-09
                                  using channel ORA_DISK_1

                                  starting media recovery

                                  unable to find archive log
                                  archive log thread=1 sequence=182057
                                  Oracle Error:
                                  ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
                                  ORA-01194: file 1 needs more recovery to be consistent
                                  ORA-01110: data file 1: ‘+DATADG/spintcp/system’

                                  RMAN-00571: ===========================================================
                                  RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
                                  RMAN-00571: ===========================================================
                                  RMAN-03002: failure of recover command at 07/23/2009 14:28:53
                                  RMAN-06054: media recovery requesting unknown log: thread 1 seq 182057 lowscn 10245436450191[/size]

                                  [size=2]SQL> select * from v$log_history where sequence#=182057;

                                   RECID      STAMP    THREAD#  SEQUENCE# FIRST_CHANGE# FIRST_TIM NEXT_CHANGE# RESETLOGS_CHANGE# RESETLOGS
                                  

                                  358153  688011128          2     182057    1.0240E+13 28-MAY-09   1.0240E+13                 1 22-MAY-07
                                  372985  692748039          1     182057    1.0245E+13 20-JUL-09   1.0245E+13                 1 22-MAY-07[/size]
                                  
                                Visualizando 15 posts - 1 até 15 (de 33 do total)
                                • Você deve fazer login para responder a este tópico.