Pular para o conteúdo
Visualizando 15 posts - 1 até 15 (de 17 do total)
  • Autor
    Posts
  • #88640
    jspaulonci
    Participante

      Bom dia pessoal, estou tentando multiplexar o meu controlfile em ambiente RAC com ASM, e não estou conseguindo.

      1º – Pelo que eu vi na internet, uma das maneiras de fazer essa multiplexação é:

      – fazer um backup do controlfile pelo RMAN
      backup current controlfile (fiz este comando tanto com o banco aberto e montado)

      – Alterar o parametro control_file do init com scope=spfile adicionando o controlfile control02.ctl.aux com os antigos controlfiles

      – fazer restore do controlfile para o novo caminho
      restore controlfile to ‘+DADOS/dbdrep1/controlfile/control02.ctl.aux’ ;

      – shutar o banco

      Até aqui maravilhoso,
      Quando starto com mount aparece o erro
      SQL> alter database mount;
      alter database mount
      *
      ERROR at line 1:
      ORA-00214: control file ‘+DADOS/dbdrep1/controlfile/control01.ctl’ version
      1496875 inconsistent with file ‘+DADOS/dbdrep1/controlfile/control02.ctl.aux’
      version 1496862

      Esse erro quer dizer que os controlfiles não estão com a mesma versão, até aí beleza, entendo.

      A pergunta é….se eu fiz um backup do controlfile, com o banco montado ou aberto, e depois faço um restore do mesmo controfile , porque dá erro de versão de controlfile ?

      Qual besteira estou fazendo ?
      Existe outra maneira de realizar essa multiplexação ?

      Obrigado

      João Paulo Spaulonci

      #88642
      ramasine
      Participante

        João, espero que possa ajudar!

        Typical scenarios in which you may receive an ORA-00214 include:

        1. You have restored the control file from backup, but forgot
          to copy it onto all of the mirrored copies of the control file
          as listed in the “CONTROL_FILES” parameter in the “init.ora&
          quot; file
          for this instance (or config.ora in an ifile configuration).
        2. You have moved one or more copies of the control file to a
          different location while the database was up and running.

        3. You accidentally overwrote one of the copies of the control file
          with an old copy.

        4. The database or the system crashed while the mirrored copies of
          the control file were being updated, causing them to be out of sync.

        5. You are restoring a database backup that was improperly taken
          with the database up and running (“fuzzy” backup).

        fix:

        The solution consists in opening the database with a single good copy
        of the control file and then shutting the database down and copying
        that version of the control file onto the other mirrored copies.
        That will cause the next startup to succeed. The steps to be followed
        are:

        1. If the database is still up, do a shutdown abort now.
      • Edit the init.ora file for this instance (or config.ora in an ifile
        configuration).

        Find the CONTROL_FILES parameter and modify it to include 
        just ONE copy of the control file that you have reasons to 
        believe is up-to-date.  For example, if you only have two 
        mirrored copies X and Y of the control file: 
        
                CONTROL_FILES = (X, Y) 
        
        and you know you have accidentally overwritten X with an old 
        copy, make 
        
                CONTROL_FILES = (Y) 
        
        If you are not sure about it, choose any one of the control file 
        copies and remove or comment out all the other copies from the 
        CONTROL_FILES parameter. 
        

      • Start up the database in restricted mode.
        STARTUP RESTRICT 
        
        If the database comes up fine, move on to Step 4. 
        
        If instead you get ORA-1122, ORA-1110, and ORA-1207, go back to 
        Step 2 and make the CONTROL_FILES parameter point to another one 
        of the mirrored copies.  If you have already tried each and 
        every one of the mirrored copies unsuccessfully, you must create 
        a new control file for the database.  See the Solution Reference 
        to PR entry 1012929.6 ("How to Recreate the Control File"). 
        
        If you get ORA-1113 and ORA-1110 pointing to one of the datafiles, 
        it means the copy of the control file you picked is good, but 
        the referenced datafile must be recovered before the database can be 
        opened.  Try issuing a RECOVER DATABASE command and applying the 
        logs you are prompted for.  You may have to resort to the online 
        logs to complete media recovery.  For further details, see the 
        Solution Reference to PR entry 1012943.6 on ORA-1113.  Once the 
        datafile is recovered, issue an ALTER DATABASE OPEN. 
        
      • Shut the database down (normal or immediate).
      • Make all copies of the control file consistent.

        Copy the good mirrored copy of the control file that you just used 
        to bring the database up onto all other copies, as originally listed 
        in the CONTROL_FILES parameter of your init.ora file (or config.ora 
        in an ifile configuration). 
        

      • Restore the CONTROL_FILES parameter to its original value.
        Edit the init.ora file for this instance (or config.ora in an ifile 
        configuration) to make the CONTROL_FILES parameter include 
        all mirrored copies of the control file again. 
        
      • Start up the database.

      #88643
      Marcos Braga
      Participante

        Oi João Paulo,

        Ainda não efetuei uma multiplexação de controlfile com o banco online. Também não sei se é possível.

        Toda vez que precisei adicionar ou excluir um controlfile efetuava o seguinte procedimento (levando em consideração que tenho 2 controlfiles).

        1. shutdown immediate
        2. cp controlfile01.ctl controlfile03.ctl
        3. edit pfileSID.ora
        4. control_files=’/path/controlfile01.ctl’,’/path/controlfile02.ctl’,’/path/controlfile03.ctl’
        5. end edit pfileSID.ora
        6. sqlplus / as sysdba
        7. create spfile from pfile=’pfileSID.ora’;
        8. startup

        Como disse, ainda não achei a possibilidade de multiplexar com o banco online. Espero que consiga e compartilhe conosco esse feito.

        []s
        Braga

        #88644
        ramasine
        Participante

          Ta aí João, deve te ajudar bastante!

          Dá uma olhada no link abaixo:

          http://www.dbforums.com/oracle/1627348- … c-asm.html

          #88645
          jspaulonci
          Participante

            Entaum moçada….. primeiramente muito obrigado pela atenção.
            O procedimento normal seria alterar o spfile no init com spifle ou pfile , shuta o banco , copia o controlfile para outro caminho e starta o banco, com o banco online não é possível fazer essa manutenção. A questão é, eu uso ASM, achei que fazendo uma cópia pelo asmcmd resolveria, mas no ASMCMD não existe o comando “cp”, e por isso não estou conseguindo, não consigo entender , se eu faço uma cópia com a base montada ele considera o controlfile inconsistente.

            Ramasine, muito obrigado pelo link, mas no final ele acabou dando do mesmo jeito.

            Obrigado pessoal, se tiveram alguma outra idéia será bem vinda.

            Spaulonci

            #88646
            ramasine
            Participante

              João, tens acesso ao Metalink?

              Da uma olhada na note 345180.1 !!

              Se não tiver posto o conteúdo aqui pra vc!

              #88647
              jspaulonci
              Participante

                Obrigado Ramasine, vou verificar no metalink

                #88649
                ramasine
                Participante

                  😉

                  #88650
                  Rodrigo Almeida
                  Participante

                    João,

                    Não é mais fácil seguir os passos abaixo:

                    1) Mudar o SPFILE com os novos caminhos do CF.
                    2) Shutdown no banco
                    3) Cópia fisica para os diretorios novos (ASM use o ASMCMD)
                    4) Startup

                    O que acha?

                    Abraços,

                    #88651
                    vieri
                    Participante

                      João,

                      o procedimento deve ser feito com a base
                      off-line! E o conteúdo dos arquivos de controle devem ser idênticos
                      um simples copy é mais confiável.

                      att.

                      #88654
                      jspaulonci
                      Participante

                        Boa tarde Moçada…..deu certo

                        Utilizando o note que o RAMASINE mandou, aliás, eu tinha cometido um erro, minha base estava montada, por isso eu não conseguia, a base precisa estar em nomount, aí funcionou.

                        Quanto a idéia do Vieri e do Rodrigo, digo o seguinte, estou usando 10.2.0.3.0 com Solaris, no asmcmd não encontrei o comando cp , derepente no 11g já tenha o comando cp, mas concerteza Vieri, sua idéia é melhor.

                        Obrigado novamente .

                        Spaulonci

                        #88656
                        Marcos Braga
                        Participante

                          [quote=”jspaulonci”:3g8nwk2s]Quanto a idéia do Vieri e do Rodrigo, digo o seguinte, estou usando 10.2.0.3.0 com Solaris, no asmcmd não encontrei o comando cp , derepente no 11g já tenha o comando cp, mas concerteza Vieri, sua idéia é melhor.
                          [/quote]

                          Oi João Paulo,

                          Só para esclarecer, o comando “cp” é para copiar arquivos, encontrado em ambientes POSIX (geralmente linux, unix…). No windows é “copy”; desculpe se deixei entender que era um comando do RMAN ou SQL ou ASMCMD.

                          []s
                          Braga

                          #88657
                          Rodrigo Almeida
                          Participante

                            João!

                            Realmente no Oracle 10g não tem CP no ASMCMD, só no 11g colocaram o CP. Que droga heimmm…!!!

                            Mas mando bem! Segue o jogo.

                            Abraços,

                            #88661
                            vieri
                            Participante

                              Realmente…

                              [oracle@depdata01 raw]$ asmcmd
                              ASMCMD> help
                              asmcmd [-p] [command]

                                  The environment variables ORACLE_HOME and ORACLE_SID determine the
                                  instance to which the program connects, and ASMCMD establishes a
                                  bequeath connection to it, in the same manner as a SQLPLUS / AS
                                  SYSDBA.  The user must be a member of the SYSDBA group.
                              
                                  Specifying the -p option allows the current directory to be displayed
                                  in the command prompt, like so:
                              
                                  ASMCMD [+DATAFILE/ORCL/CONTROLFILE] >
                              
                                  [command] specifies one of the following commands, along with its
                                  parameters.
                              
                                  Type "help [command]" to get help on a specific ASMCMD command.
                              
                                  commands:
                                  --------
                                  cd
                                  du
                                  find
                                  help
                                  ls
                                  lsct
                                  lsdg
                                  mkalias
                                  mkdir
                                  pwd
                                  rm
                                  rmalias
                              

                              Mas pelo RMAN eu consigo isso nao é Rodrigo ?

                              #88662
                              Rodrigo Almeida
                              Participante

                                Consegue sim Vieri!!! 3 comandinhossss…

                                No asmcmd do 11g já implementaram o CP, veja:


                                ASMCMD> help
                                asmcmd [-v] [-a ] [-p] [command]

                                    The environment variables ORACLE_HOME and ORACLE_SID determine the
                                    instance to which the program connects, and ASMCMD establishes a
                                    bequeath connection to it, in the same manner as a SQLPLUS / AS
                                    SYSDBA.  The user must be a member of the SYSDBA group.
                                
                                    Specifying the -v option prints the asmcmd version number and
                                    exits immediately.
                                
                                    Specify the -a option to choose the type of connection. There are
                                    only two possibilities: connecting as "sysasm" or as "sysdba".
                                    The default value if this option is unspecified is "sysasm".
                                
                                    Specifying the -p option allows the current directory to be displayed
                                    in the command prompt, like so:
                                
                                    ASMCMD [+DATAFILE/ORCL/CONTROLFILE] >
                                
                                    [command] specifies one of the following commands, along with its
                                    parameters.
                                
                                    Type "help [command]" to get help on a specific ASMCMD command.
                                
                                    commands:
                                    --------
                                    help
                                
                                    cd
                                    cp
                                    du
                                    find
                                    ls
                                    lsct
                                    lsdg
                                    mkalias
                                    mkdir
                                    pwd
                                    rm
                                    rmalias
                                
                                    md_backup
                                    md_restore
                                
                                    lsdsk
                                    remap
                                

                                ASMCMD> help cp
                                cp [-ifr]

                                    Copy one or more source ASM file(s) to a destination.
                                    If the source is a single file, then desination can be a the target
                                    directory or a filename, otherwise it has to be a directory.
                                    The destination is of the form target/connect_identifier, where
                                    connect_identifier is of the form HOSTNAME, HOSTNAME.SID or
                                    HOSTNAME.[PORT.]SID where the port is optional.
                                

                                Abraços,

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