Pular para o conteúdo
Visualizando 11 posts - 1 até 11 (de 11 do total)
  • Autor
    Posts
  • #98606
    jsouza10
    Participante

      Olá pessoal sou novo na area de bando de dados e gostaria de ajuda.
      Nesta sexta dia 18 tentei subir um dump de 1.7gb em minha base de teste, porém minha estação de teste travou perdendo a comunicação com o database, agora estout tentando subir o console e não estou conseguindo ja tentei até mesmo “executar recuperação” mais e aparece esta mensagem abaixo:

      startup mount
      shutdown immediate
      shutdown immediate

      SQL*Plus: Release 11.1.0.7.0 – Production on Mon Mar 21 11:52:52 2011

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

      SQL> SQL> Connected.
      SQL> SQL> SQL> ORA-01109: database not open

      Database dismounted.
      ORACLE instance shut down.
      SQL> SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 – 64bit Production
      With the Partitioning, OLAP, Data Mining and Real Application Testing options
      startup mount

      SQL*Plus: Release 11.1.0.7.0 – Production on Mon Mar 21 11:52:58 2011

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

      SQL> SQL> Connected to an idle instance.
      SQL> SQL> ORACLE instance started.

      Total System Global Area 772472832 bytes
      Fixed Size 2163680 bytes
      Variable Size 612371488 bytes
      Database Buffers 155189248 bytes
      Redo Buffers 2748416 bytes
      Database mounted.
      SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 – 64bit Production
      With the Partitioning, OLAP, Data Mining and Real Application Testing options

      Recovery Manager: Release 11.1.0.7.0 – Production on Mon Mar 21 11:53:17 2011

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

      RMAN>
      connected to target database: SENIOR (DBID=4086617815, not open)
      using target database control file instead of recovery catalog

      RMAN>
      echo set on

      RMAN> run {
      2> set newname for datafile 1 to NEW;
      3> set newname for datafile 2 to NEW;
      4> set newname for datafile 3 to NEW;
      5> set newname for datafile 4 to NEW;
      6> set newname for datafile 5 to NEW;
      7> set newname for datafile 6 to NEW;
      8> restore database until time “to_date(‘2011-03-18 11:50:34’, ‘YYYY-MM-DD HH24:MI:SS’)”;
      9> switch datafile all;
      10> recover database until time “to_date(‘2011-03-18 11:50:34’, ‘YYYY-MM-DD HH24:MI:SS’)”;
      11> }
      executing command: SET NEWNAME

      executing command: SET NEWNAME

      executing command: SET NEWNAME

      executing command: SET NEWNAME

      executing command: SET NEWNAME

      executing command: SET NEWNAME

      Starting restore at 21-MAR-11
      allocated channel: ORA_DISK_1
      channel ORA_DISK_1: SID=152 device type=DISK

      channel ORA_DISK_1: restoring datafile 00001
      input datafile copy RECID=20 STAMP=746074824 file name=/home/oracle/app/oracle/flash_recovery_area/SENIOR/datafile/o1_mf_system_6qy03o77_.dbf
      destination for restore of datafile 00001: /home/oracle/app/oracle/oradata/SENIOR/datafile/o1_mf_system_%u_.dbf
      channel ORA_DISK_1: copied datafile copy of datafile 00001
      output file name=/home/oracle/app/oracle/oradata/SENIOR/datafile/o1_mf_system_6rgsm2cw_.dbf RECID=24 STAMP=746366048
      channel ORA_DISK_1: restoring datafile 00002
      input datafile copy RECID=19 STAMP=746074824 file name=/home/oracle/app/oracle/flash_recovery_area/SENIOR/datafile/o1_mf_sysaux_6qy04sro_.dbf
      destination for restore of datafile 00002: /home/oracle/app/oracle/oradata/SENIOR/datafile/o1_mf_sysaux_%u_.dbf
      channel ORA_DISK_1: copied datafile copy of datafile 00002
      output file name=/home/oracle/app/oracle/oradata/SENIOR/datafile/o1_mf_sysaux_6rgsnsn3_.dbf RECID=25 STAMP=746366086
      channel ORA_DISK_1: restoring datafile 00003
      input datafile copy RECID=18 STAMP=746074822 file name=/home/oracle/app/oracle/flash_recovery_area/SENIOR/datafile/o1_mf_undotbs1_6qy05w2q_.dbf
      destination for restore of datafile 00003: /home/oracle/app/oracle/oradata/SENIOR/datafile/o1_mf_undotbs1_%u_.dbf
      channel ORA_DISK_1: copied datafile copy of datafile 00003
      output file name=/home/oracle/app/oracle/oradata/SENIOR/datafile/o1_mf_undotbs1_6rgsowxd_.dbf RECID=26 STAMP=746366096
      channel ORA_DISK_1: restoring datafile 00004
      input datafile copy RECID=5 STAMP=745902018 file name=/home/oracle/app/oracle/flash_recovery_area/SENIOR/datafile/o1_mf_users_6qy065o0_.dbf
      destination for restore of datafile 00004: /home/oracle/app/oracle/oradata/SENIOR/datafile/o1_mf_users_%u_.dbf
      channel ORA_DISK_1: copied datafile copy of datafile 00004
      output file name=/home/oracle/app/oracle/oradata/SENIOR/datafile/o1_mf_users_6rgsp3th_.dbf RECID=27 STAMP=746366100
      Finished restore at 21-MAR-11

      datafile 1 switched to datafile copy
      input datafile copy RECID=28 STAMP=746366102 file name=/home/oracle/app/oracle/oradata/SENIOR/datafile/o1_mf_system_6rgsm2cw_.dbf
      datafile 2 switched to datafile copy
      input datafile copy RECID=29 STAMP=746366102 file name=/home/oracle/app/oracle/oradata/SENIOR/datafile/o1_mf_sysaux_6rgsnsn3_.dbf
      datafile 3 switched to datafile copy
      input datafile copy RECID=30 STAMP=746366102 file name=/home/oracle/app/oracle/oradata/SENIOR/datafile/o1_mf_undotbs1_6rgsowxd_.dbf
      datafile 4 switched to datafile copy
      input datafile copy RECID=31 STAMP=746366102 file name=/home/oracle/app/oracle/oradata/SENIOR/datafile/o1_mf_users_6rgsp3th_.dbf

      Starting recover at 21-MAR-11
      using channel ORA_DISK_1
      datafile 4 not processed because file is read-only
      channel ORA_DISK_1: starting incremental datafile backup set restore
      channel ORA_DISK_1: specifying datafile(s) to restore from backup set
      destination for restore of datafile 00001: /home/oracle/app/oracle/oradata/SENIOR/datafile/o1_mf_system_6rgsm2cw_.dbf
      destination for restore of datafile 00002: /home/oracle/app/oracle/oradata/SENIOR/datafile/o1_mf_sysaux_6rgsnsn3_.dbf
      destination for restore of datafile 00003: /home/oracle/app/oracle/oradata/SENIOR/datafile/o1_mf_undotbs1_6rgsowxd_.dbf
      channel ORA_DISK_1: reading from backup piece /home/oracle/app/oracle/flash_recovery_area/SENIOR/backupset/2011_03_18/o1_mf_nnnd1_TAG20110318T030027_6r5x7x9t_.bkp
      channel ORA_DISK_1: piece handle=/home/oracle/app/oracle/flash_recovery_area/SENIOR/backupset/2011_03_18/o1_mf_nnnd1_TAG20110318T030027_6r5x7x9t_.bkp tag=TAG20110318T030027
      channel ORA_DISK_1: restored backup piece 1
      channel ORA_DISK_1: restore complete, elapsed time: 00:00:07

      starting media recovery
      media recovery failed
      RMAN-00571: ===========================================================
      RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
      RMAN-00571: ===========================================================
      RMAN-03002: failure of recover command at 03/21/2011 11:55:15
      ORA-00283: recovery session canceled due to errors
      RMAN-11003: failure during parse/execution of SQL statement: alter database recover if needed
      start until time ‘MAR 18 2011 11:50:34’
      ORA-00283: recovery session canceled due to errors
      ORA-01610: recovery using the BACKUP CONTROLFILE option must be done

      RMAN> exit;

      Recovery Manager complete.

      Inicializando com RESETLOGS:
      SQL*Plus: Release 11.1.0.7.0 – Production on Mon Mar 21 12:03:13 2011

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

      SQL> Connected.
      SQL> SQL> ALTER DATABASE open RESETLOGS
      *
      ERROR at line 1:
      ORA-01152: file 1 was not restored from a sufficiently old backup
      ORA-01110: data file 1:
      ‘/home/oracle/app/oracle/oradata/SENIOR/datafile/o1_mf_system_6rgsm2cw_.dbf’

      Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 – 64bit Production
      With the Partitioning, OLAP, Data Mining and Real Application Testing options

      Este é log de “falha do banco de dados” do enterprise manager pagina inicial:
      O grupo redo log 1 está indisponível
      O banco de dados pode ser irrecuperável ou tornar-se irrecuperável CRITICAL OPEN 2011-03-18 16:49:22.0

      O grupo redo log 2 está indisponível
      O banco de dados pode ser irrecuperável ou tornar-se irrecuperável CRITICAL OPEN 2011-03-18 16:49:23.0

      O grupo redo log 3 está indisponível
      O banco de dados pode ser irrecuperável ou tornar-se irrecuperável CRITICAL OPEN 2011-03-21 11:25:50.0

      Arquivo de dados do sistema 1: ‘/home/oracle/app/oracle/oradata/SENIOR/datafile/o1_mf_system_6qw6opt2_.dbf’ precisa de recuperação de mídia
      O banco de dados não pode ser aberto CRITICAL OPEN 2011-03-21 11:25:51.0

      Arquivo de redo log /home/oracle/app/oracle/flash_recovery_area/SENIOR/onlinelog/o1_mf_1_6qw6rbtw_.log não encontrado
      O banco de dados pode ser irrecuperável ou tornar-se irrecuperável HIGH OPEN 2011-03-18 16:49:23.0

      Arquivo de redo log /home/oracle/app/oracle/oradata/SENIOR/onlinelog/o1_mf_1_6qw6r9qc_.log não encontrado
      O banco de dados pode ser irrecuperável ou tornar-se irrecuperável HIGH OPEN 2011-03-18 16:49:23.0

      Arquivo de redo log /home/oracle/app/oracle/flash_recovery_area/SENIOR/onlinelog/o1_mf_2_6qw6rdwd_.log não encontrado
      O banco de dados pode ser irrecuperável ou tornar-se irrecuperável HIGH OPEN 2011-03-18 16:49:23.0

      Arquivo de redo log /home/oracle/app/oracle/oradata/SENIOR/onlinelog/o1_mf_2_6qw6rcsv_.log não encontrado
      O banco de dados pode ser irrecuperável ou tornar-se irrecuperável HIGH OPEN 2011-03-18 16:49:23.0[b]

      Pessoal sou iniciante na area e gostaria muito que me ajudassem neste problema passei o fds tentando solucionar mais meu esforço foi em vão.

      Agradeço a ajuda de todos.[/b]

      #98607
      Peterson
      Participante

        Cara,

        Você tentou subir um dump da sua base de produção numa base de testes, é isso? Qual comando usou para fazer o import?

        Poderia tentar dropar os schemas e recriá-los.

        Vi que tentou fazer um restore pelo RMAN. Você fazia backp da base de testes pelo RMAN?

        #98612
        jsouza10
        Participante

          Boa tarde Peterson!

          1) Sim
          2) O dump estava ocorrendo normalmente pelo comando
          IMP usuario_SYSTEM/senha FROMUSER=prototipo TOUSER=homologa file=expdat.dmp IGNORE=Y LOG=homologa.log INDEXES=Y;

          3) Tentei dropar sim pelo comando:

          [oracle@localhost ~]$ emca -deconfig dbcontrol db -repos drop
          STARTED EMCA em 21/03/2011 14:31:07
          Assistente de Configuração do EM, Produção da Versão 11.1.0.7.0
          Copyright (c) 2003, 2005, Oracle. Todos os direitos reservados.

          Especifique as seguintes informações:
          SID do Banco de Dados: SENIOR
          Número da porta do listener: 1521
          Senha para o usuário SYS:
          Senha do usuário SYSMAN:

          Deseja continuar? [sim(Y)/não(N)]: Y
          21/03/2011 14:31:25 oracle.sysman.emcp.EMConfig perform
          INFO: Esta operação está sendo registrada em /home/oracle/app/oracle/cfgtoollogs/emca/emca_2011_03_21_14_31_07.log.
          21/03/2011 14:31:25 oracle.sysman.emcp.EMConfig perform
          SEVERE: Instância do banco de dados não disponível.
          Consulte o arquivo de log em /home/oracle/app/oracle/cfgtoollogs/emca/emca_2011_03_21_14_31_07.log para obter mais detalhes.
          Não foi possível concluir a configuração. Consulte o arquivo de log em /home/oracle/app/oracle/cfgtoollogs/emca/emca_2011_03_21_14_31_07.log para obter mais detalhes.

          [oracle@localhost ~]$ emca -config dbcontrol db -repos recreate
          Nota: Para recriar não esta sendo possivel pois não esta aceitando a senha que eu cadastrei para o user DBSNMP.

          4) Sim, o restaurador do RMAN esta ativo, e fiz uma cópia dos arquivos por precaução.

          Mesmo assim, fico aparecendo toda aquela mensagem de erro.

          #98615
          Peterson
          Participante

            Jsouza,

            Cara, o comando de dropar usuário que você postou está recriando o repositório do EM.

            Vamos aos fatos, você fez um export do banco de produção e tentou importar com o comando postado no banco de testes, ok?

            Durante o import você disse que sua estação travou.

            Faça o seguinte:

            • verifique se a instância está ativa:
              export ORACLE_SID=
              sqlplus “/as sysdba”

            Caso a instância esteja inativa, vai dar uma mensagem tipo connected to an idle instance. C
            Se aparecer isso digite startup

            uma vez aberta a instância, consulte as propriedades do usuário onde vc quer importar o dump.

            SELECT username, default_tablespace, temporary_tablespace
            FROM dba_usrers
            WHERE username=’HOMOLOGA’;

            Dá um regaço no usuário e cria ele denovo:

            DROP USER homologa CASCADE;
            CREATE USER homologa IDENTIFIED BY
            DEFAULT TABLESPACE
            TEMPORARY TABLESPACE ;

            e executa a instrução de import denovo.[/code]

            #98616
            jsouza10
            Participante

              Peterson, boa tarde!
              Então o real problema é que não estou conseguindo me conectar a instância, dessa forma eu nem consigo consultar dados de tabela, excluir usuário ou modificalo.

              [oracle@localhost ~]$ sqlplus /nolog

              SQL*Plus: Release 11.1.0.7.0 – Production on Mon Mar 21 15:59:08 2011

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

              SQL> connect sys as sysdba
              Enter password:
              Connected.
              SQL> startup
              ORA-01081: cannot start already-running ORACLE – shut it down first

              Se força a montagem ele ira dar um falso start para o usuário:

              SQL> startup mount force;
              ORACLE instance started.

              Total System Global Area 772472832 bytes
              Fixed Size 2163680 bytes
              Variable Size 612371488 bytes
              Database Buffers 155189248 bytes
              Redo Buffers 2748416 bytes
              Database mounted.

              SQL> select * from dba_users;
              select * from dba_users
              *
              ERROR at line 1:
              ORA-01219: database not open: queries allowed on fixed tables/views only

              Mesmo tentando trocar de usuário ira acontecer este problema, minha maior duvida é se eu fiz o backup do banco inteiro, provavelmente a instancia teria sido salva certo?
              Neste caso não consigo nem recuperar o banco.
              Como eu disse sou novo em adm Oracle, e não tenho experiência nestes tipos de casos.
              Estou agradecido pela ajuda que esta me dando.

              #98617
              Peterson
              Participante

                Cara, a primeira mensagem diz que o banco já está aberto.

                conecte-se ao banco, dê um shutdown immediate depois uns startup… só startup (sem parâmetros).

                aí consulte o estado da instância com a query:

                SELECT instance_name, status FROM v$instance;

                coloque aí o resultado da query.

                #98618
                jsouza10
                Participante

                  Segue conforme solicitado, mais note que solicita que start a instancia usando o resetlogs ou noresetlogs.
                  SQL> startup
                  ORACLE instance started.

                  Total System Global Area 772472832 bytes
                  Fixed Size 2163680 bytes
                  Variable Size 612371488 bytes
                  Database Buffers 155189248 bytes
                  Redo Buffers 2748416 bytes
                  Database mounted.
                  ORA-01589: must use RESETLOGS or NORESETLOGS option for database open

                  SQL> select instance_name, status from v$instance;

                  INSTANCE_NAME STATUS


                  senior MOUNTED

                  SQL>

                  #98624
                  jsouza10
                  Participante

                    Tentei “startar” dando resetlogs e apareceu o seguinte.

                    SQL> alter database open resetlogs;
                    alter database open resetlogs
                    *
                    ERROR at line 1:
                    ORA-01122: database file 1 failed verification check
                    ORA-01110: data file 1:
                    ‘/home/oracle/app/oracle/oradata/SENIOR/datafile/o1_mf_system_6rgsm2cw_.dbf’
                    ORA-01203: wrong incarnation of this file – wrong creation SCN

                    O arquivo do local esta correto e esta com permissões para leitura e gravação.

                    #98633
                    vieri
                    Participante

                      Você percebeu esse trecho do log do restore:

                      using channel ORA_DISK_1
                      datafile 4 not processed because file is read-only

                      😯

                      #98634
                      jsouza10
                      Participante

                        Bom dia!
                        Sim percebi dei permissão para leitura e gravação e ficou assim o log:

                        startup mount
                        shutdown immediate
                        shutdown immediate

                        SQL*Plus: Release 11.1.0.7.0 – Production on Tue Mar 22 11:48:54 2011

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

                        SQL> SQL> Connected.
                        SQL> SQL> SQL> ORA-01109: database not open

                        Database dismounted.
                        ORACLE instance shut down.
                        SQL> SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 – 64bit Production
                        With the Partitioning, OLAP, Data Mining and Real Application Testing options
                        startup mount

                        SQL*Plus: Release 11.1.0.7.0 – Production on Tue Mar 22 11:48:58 2011

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

                        SQL> SQL> Connected to an idle instance.
                        SQL> SQL> ORACLE instance started.

                        Total System Global Area 772472832 bytes
                        Fixed Size 2163680 bytes
                        Variable Size 612371488 bytes
                        Database Buffers 155189248 bytes
                        Redo Buffers 2748416 bytes
                        Database mounted.
                        SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 – 64bit Production
                        With the Partitioning, OLAP, Data Mining and Real Application Testing options

                        Recovery Manager: Release 11.1.0.7.0 – Production on Tue Mar 22 11:49:04 2011

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

                        RMAN>
                        connected to target database: SENIOR (DBID=4086617815, not open)
                        using target database control file instead of recovery catalog

                        RMAN>
                        echo set on

                        RMAN> run {
                        2> restore database until time “to_date(‘2011-03-15 06:00:58’, ‘YYYY-MM-DD HH24:MI:SS’)”;
                        3> recover database until time “to_date(‘2011-03-15 06:00:58’, ‘YYYY-MM-DD HH24:MI:SS’)”;
                        4> }
                        Starting restore at 22-MAR-11
                        allocated channel: ORA_DISK_1
                        channel ORA_DISK_1: SID=154 device type=DISK

                        RMAN-00571: ===========================================================
                        RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
                        RMAN-00571: ===========================================================
                        RMAN-03002: failure of restore command at 03/22/2011 11:49:07
                        RMAN-06026: some targets not found – aborting restore
                        RMAN-06023: no backup or copy of datafile 4 found to restore
                        RMAN-06023: no backup or copy of datafile 3 found to restore
                        RMAN-06023: no backup or copy of datafile 2 found to restore
                        RMAN-06023: no backup or copy of datafile 1 found to restore

                        RMAN> exit;

                        Recovery Manager complete.

                        #98642
                        jsouza10
                        Participante

                          Peterson,
                          Outro detalhe que é importante é que quando tento startar com resetlogs ocorre esse problema, se eu não consigo iniciar meu database como posso fazer para recriar o arquivo “que esta sendo dito que foi copiado”?

                          Como eu informei algumas vezes sou novo na area de Oracle e peço a vcs a ajuda, fico muito grato pela compreensão.

                          SQL*Plus: Release 11.1.0.7.0 – Production on Tue Mar 22 15:19:03 2011

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

                          SQL> Connected.
                          SQL> SQL> ALTER DATABASE open RESETLOGS
                          *
                          ERROR at line 1:
                          ORA-01122: database file 1 failed verification check
                          ORA-01110: data file 1:
                          ‘/home/oracle/app/oracle/oradata/SENIOR/datafile/o1_mf_system_6rgsm2cw_.dbf’
                          ORA-01203: wrong incarnation of this file – wrong creation SCN

                          Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 – 64bit Production
                          With the Partitioning, OLAP, Data Mining and Real Application Testing options

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