- Este tópico contém 16 respostas, 5 vozes e foi atualizado pela última vez 16 anos, 4 meses atrás por
ramasine.
-
AutorPosts
-
6 de agosto de 2009 às 6:04 pm #88640
jspaulonci
ParticipanteBom 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 1496862Esse 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
–
6 de agosto de 2009 às 6:51 pm #88642ramasine
ParticipanteJoão, espero que possa ajudar!
Typical scenarios in which you may receive an ORA-00214 include:
- 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). -
You have moved one or more copies of the control file to a
different location while the database was up and running. -
You accidentally overwrote one of the copies of the control file
with an old copy. -
The database or the system crashed while the mirrored copies of
the control file were being updated, causing them to be out of sync. -
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:- 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.
6 de agosto de 2009 às 7:15 pm #88643Marcos Braga
ParticipanteOi 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).
- shutdown immediate
- cp controlfile01.ctl controlfile03.ctl
- edit pfileSID.ora
- control_files=’/path/controlfile01.ctl’,’/path/controlfile02.ctl’,’/path/controlfile03.ctl’
- end edit pfileSID.ora
- sqlplus / as sysdba
- create spfile from pfile=’pfileSID.ora’;
- startup
Como disse, ainda não achei a possibilidade de multiplexar com o banco online. Espero que consiga e compartilhe conosco esse feito.
[]s
Braga6 de agosto de 2009 às 7:49 pm #88644ramasine
ParticipanteTa aí João, deve te ajudar bastante!
Dá uma olhada no link abaixo:
http://www.dbforums.com/oracle/1627348- … c-asm.html
6 de agosto de 2009 às 7:58 pm #88645jspaulonci
ParticipanteEntaum 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
6 de agosto de 2009 às 8:12 pm #88646ramasine
ParticipanteJoão, tens acesso ao Metalink?
Da uma olhada na note 345180.1 !!
Se não tiver posto o conteúdo aqui pra vc!
6 de agosto de 2009 às 8:28 pm #88647jspaulonci
ParticipanteObrigado Ramasine, vou verificar no metalink
6 de agosto de 2009 às 8:35 pm #88649ramasine
Participante😉
6 de agosto de 2009 às 8:46 pm #88650Rodrigo Almeida
ParticipanteJoã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) StartupO que acha?
Abraços,
6 de agosto de 2009 às 8:48 pm #88651vieri
ParticipanteJoã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.
6 de agosto de 2009 às 8:56 pm #88654jspaulonci
ParticipanteBoa 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
6 de agosto de 2009 às 9:00 pm #88656Marcos 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
Braga6 de agosto de 2009 às 9:01 pm #88657Rodrigo Almeida
ParticipanteJoã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,
6 de agosto de 2009 às 9:06 pm #88661vieri
ParticipanteRealmente…
[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 rmaliasMas pelo RMAN eu consigo isso nao é Rodrigo ?
6 de agosto de 2009 às 9:14 pm #88662Rodrigo Almeida
ParticipanteConsegue 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 remapASMCMD> 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,
- You have restored the control file from backup, but forgot
-
AutorPosts
- Você deve fazer login para responder a este tópico.