Procedimento para mover datafiles em ASM
ID Tablespace Datafile
40 TESTE_D +DG2/teste/datafile/teste_d.303.955634563
39 TESTE_D +DG2/teste/datafile/teste_d.309.955600967
41 TESTE_D +DG2/teste/datafile/teste_d.312.955612387
rman target /
copy datafile 40 TO '+DG4/teste/datafile/teste_d303';
copy datafile 39 TO '+DG4/teste/datafile/teste_d309';
copy datafile 41 TO '+DG4/teste/datafile/teste_d312';
SQL 'ALTER DATABASE datafile 40 offline';
SQL 'ALTER DATABASE datafile 39 offline';
SQL 'ALTER DATABASE datafile 41 offline';
run{
allocate channel ch1 device TYPE disk;
SET newname FOR datafile 40 TO '+DG4/teste/datafile/teste_d303';
switch datafile ALL;
}
run{
allocate channel ch1 device TYPE disk;
SET newname FOR datafile 39 TO '+DG4/teste/datafile/teste_d309';
switch datafile ALL;
}
run{
allocate channel ch1 device TYPE disk;
SET newname FOR datafile 41 TO '+DG4/teste/datafile/teste_d312';
switch datafile ALL;
}
run {
allocate channel C1 device type disk;
recover datafile 40;
recover datafile 39;
recover datafile 41;
}
SQL 'ALTER DATABASE datafile 40 online';
SQL 'ALTER DATABASE datafile 39 online';
SQL 'ALTER DATABASE datafile 41 online';
Apos abra o Banco e Apague os datafiles antigos.
