https://vbmotorworld.com/66hkaqhb6eh Neste artigo irei explicar como mover/copiar um datafile que está num diskgroup para outro diskgroup do ASM 10g.
No meu exemplo estou com um Oracle RAC 10g, porem pode ser uma base single sem problemas.
get link SQL> select name from v$datafile; NAME ---------------------------------------------------------- +DGARCH/racrafa/datafile/system.295.768771961 +DGARCH/racrafa/datafile/undotbs1.322.768771993 +DGARCH/racrafa/datafile/sysaux.323.768772011 +DGARCH/racrafa/datafile/undotbs2.327.768772027 +DGARCH/racrafa/datafile/users.314.768772045
see Vendo que por um equivoco coloquei os datafiles no diskgroup DGARCH e o correto deveria ser DGDADOS.
Assim primeiramente devemos colocar o database em modo mount.
Buy Valium 1000 SQL> SHUTDOWN IMMEDIATE SQL> STARTUP MOUNT
go to site Em ambiente RAC que é o meu caso, irei parar o database immediatamente e em seguida iniciar em modo mount.
here $ srvctl stop database -d racrafa -o immediate $ srvctl start database -d racrafa -o mount
https://traffordhistory.org/lookingback/mip9qf6piz0 Feito o procedimento de iniciar o database em modo mount, devo me conectar no RMAN.
follow $ rman target / Recovery Manager: Release 10.2.0.5.0 - Production on Tue Dec 6 10:59:38 2011 Copyright (c) 1982, 2007, Oracle. All rights reserved. connected to target database: RACRAFA (DBID=2793334314, not open)
https://semnul.com/creative-mathematics/?p=a3tvckcz E iniciar o procedimento de copia dos datafiles para onde que devem estar corretamente:
Buy Quality Valium RMAN> copy datafile '+DGARCH/racrafa/datafile/system.295.768771961' to '+DGDADOS/racrafa/datafile/system01.dbf'; Starting backup at 06-DEC-11 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=144 instance=racrafa1 devtype=DISK channel ORA_DISK_1: starting datafile copy input datafile fno=00001 name=+DGARCH/racrafa/datafile/system.295.768771961 output filename=+DGDADOS/racrafa/datafile/system01.dbf tag=TAG20111206T110405 recid=1 stamp=769172705 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:01:05 Finished backup at 06-DEC-11 RMAN> copy datafile '+DGARCH/racrafa/datafile/undotbs1.322.768771993' to '+DGDADOS/racrafa/datafile/undotbs101.dbf'; Starting backup at 06-DEC-11 using channel ORA_DISK_1 channel ORA_DISK_1: starting datafile copy input datafile fno=00002 name=+DGARCH/racrafa/datafile/undotbs1.322.768771993 output filename=+DGDADOS/racrafa/datafile/undotbs101.dbf tag=TAG20111206T110527 recid=2 stamp=769172789 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:01:05 Finished backup at 06-DEC-11 RMAN>copy datafile '+DGARCH/racrafa/datafile/sysaux.323.768772011' to '+DGDADOS/racrafa/datafile/sysaux01.dbf'; Starting backup at 06-DEC-11 using channel ORA_DISK_1 channel ORA_DISK_1: starting datafile copy input datafile fno=00003 name=+DGARCH/racrafa/datafile/sysaux.323.768772011 output filename=+DGDADOS/racrafa/datafile/sysaux01.dbf tag=TAG20111206T110633 recid=3 stamp=769172828 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:35 Finished backup at 06-DEC-11 RMAN>copy datafile '+DGARCH/racrafa/datafile/undotbs2.327.768772027' to '+DGDADOS/racrafa/datafile/undotbs201.dbf'; Starting backup at 06-DEC-11 using channel ORA_DISK_1 channel ORA_DISK_1: starting datafile copy input datafile fno=00004 name=+DGARCH/racrafa/datafile/undotbs2.327.768772027 output filename=+DGDADOS/racrafa/datafile/undotbs201.dbf tag=TAG20111206T110709 recid=4 stamp=769172859 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:35 Finished backup at 06-DEC-11 RMAN>copy datafile '+DGARCH/racrafa/datafile/users.314.768772045' to '+DGDADOS/racrafa/datafile/users01.dbf'; Starting backup at 06-DEC-11 using channel ORA_DISK_1 channel ORA_DISK_1: starting datafile copy input datafile fno=00005 name=+DGARCH/racrafa/datafile/users.314.768772045 output filename=+DGDADOS/racrafa/datafile/users01.dbf tag=TAG20111206T110746 recid=5 stamp=769172867 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03 Finished backup at 06-DEC-11
go site Deve ser percebido que aproveitei e renomeei os arquivos de users.314.768772045 para users01.dbf
https://everitte.org/jsbyf4jm Feito isso, aproveito o banco em modo mounted e devo renomear os datafiles no dicionario de dados.
click sqlplus / as sysdba SQL> alter database rename file '+DGARCH/racrafa/datafile/system.295.768771961' to '+DGDADOS/racrafa/datafile/system01.dbf'; Database altered. SQL> alter database rename file '+DGARCH/racrafa/datafile/undotbs1.322.768771993' to '+DGDADOS/racrafa/datafile/undotbs101.dbf'; Database altered. SQL> alter database rename file '+DGARCH/racrafa/datafile/sysaux.323.768772011' to '+DGDADOS/racrafa/datafile/sysaux01.dbf'; Database altered. SQL> alter database rename file '+DGARCH/racrafa/datafile/undotbs2.327.768772027' to '+DGDADOS/racrafa/datafile/undotbs201.dbf'; Database altered. SQL> alter database rename file '+DGARCH/racrafa/datafile/users.314.768772045' to '+DGDADOS/racrafa/datafile/users01.dbf'; Database altered.
https://luisfernandocastro.com/8z6lm6dfe Assim com tudo ok agora podemos abrir o banco sem problemas:
https://boxfanexpo.com/z3a5xq4pfl SQL> SHUTDOWN IMMEDIATE SQL> STARTUP
here Em ambiente RAC que é o meu caso, irei parar o database immediatamente e em seguida iniciar em modo mount.
watch $ srvctl stop database -d racrafa -o immediate $ srvctl start database -d racrafa
Buy Diazepam 5Mg E agora posso conferir os datafiles
https://trevabrandonscharf.com/ix6snznne SQL> select name from v$datafile; NAME ------------------------------------------- +DGDADOS/racrafa/datafile/system01.dbf +DGDADOS/racrafa/datafile/undotbs101.dbf +DGDADOS/racrafa/datafile/sysaux01.dbf +DGDADOS/racrafa/datafile/undotbs201.dbf +DGDADOS/racrafa/datafile/users01.dbf
Autor: Rafael Stoever
Cheap Valium Canada https://boxfanexpo.com/8yyq9afi Bacharel em Sistema de Informação pela Uniasselvi, atualmente cursando Gerenciamento de Projetos em TI pela Pós Graduação Uniasselvi. Atuo como Analista de suporte https://marcosgerente.com.br/s96ncro a banco de dados – DBA pela Lumina Serviços em TI residente de Blumenau/ SC, follow OPN Certified Specialist, Certificado OCP 10g/11g/12c, OCE RAC10g e Linux 10g. Conhecimentos em Microsoft SqlSever, Mysql e programação web (php,asp).