Movendo datafiles dentro do próprio ASM 10g

watch 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.

https://thegreathighway.com/flbsi2xpuz3 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

https://www.jacobysaustin.com/2024/05/15pzxjiqb13 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 Safely Online SQL> SHUTDOWN IMMEDIATE SQL> STARTUP MOUNT

go to link Em ambiente RAC que é o meu caso, irei parar o database immediatamente e em seguida iniciar em modo mount.

https://pkuatm.org/2024/05/13/74lytvdbg $ srvctl stop database -d racrafa -o immediate $ srvctl start database -d racrafa -o mount

source url Feito o procedimento de iniciar o database em modo mount, devo me conectar no RMAN.

https://aaerj.org.br/2024/05/13/l736wl9hu8 $ 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://aguasamazonicas.org/edz9cjl E iniciar o procedimento de copia dos datafiles para onde que devem estar corretamente:

follow site 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

https://discovershareinspire.com/2024/05/jnozccq47j3 Deve ser percebido que aproveitei e renomeei os arquivos de users.314.768772045 para users01.dbf

enter site Feito isso, aproveito o banco em modo mounted e devo renomear os datafiles no dicionario de dados.

https://dentaris-sa.com/2024/05/13/sfq9xifx 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.

see url Assim com tudo ok agora podemos abrir o banco sem problemas:

Cheap Valium Buy SQL> SHUTDOWN IMMEDIATE SQL> STARTUP

https://thegreathighway.com/baw9s45m8p6 Em ambiente RAC que é o meu caso, irei parar o database immediatamente e em seguida iniciar em modo mount.

https://someawesomeminecraft.com/2024/05/13/ckoieob $ srvctl stop database -d racrafa -o immediate $ srvctl start database -d racrafa

https://www.jacobysaustin.com/2024/05/nedm7fnql E agora posso conferir os datafiles

go to link 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

%name Movendo datafiles dentro do próprio ASM 10g

Autor: Rafael Stoever

https://emduk.org/gibuko0

Cheap Alprazolam go site 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 source link a banco de dados – DBA pela Lumina Serviços em TI residente de Blumenau/ SC, see OPN Certified Specialist, Certificado OCP 10g/11g/12c, OCE RAC10g e Linux 10g. Conhecimentos em Microsoft SqlSever, Mysql e programação web (php,asp).