diskgroup

Come spostare un controlfile da un diskgroup ad un altro

dbbox2>show parameter control NAME TYPE VALUE ———————————— ———– —————————— control_file_record_keep_time integer 7 control_files string +DBBOX_DATA_DG/dbbox/contr ol01.ctl, +DBOLD_FRA_DG/dbold /control02.ctl alter system set control_files=’+DBBOX_DATA_DG/dbbox/control01.ctl’,’ +DBBOX_FRA_DG/dbbox/control02.ctl’ scope=spfile sid=’*’; oracle11@vboxdb:dbbox1 # srvctl stop database -d dbbox -o immediate ASMCMD> cp +DBBOX_DATA_DG/dbbox/control01.ctl +DBBOX_FRA_DG/dbbox/control02.ctl copying +DBBOX_DATA_DG/dbbox/control01.ctl -> +DBBOX_FRA_DG/dbbox/control02.ctl ASMCMD> ls -lrt DBBOX_FRA_DG/dbbox/control02.ctl WARNING:option ‘r’ is deprecated for ‘ls’ please use ‘reverse’ Type Redund Striped Time Sys Name N control02.ctl => +DBBOX_FRA_DG/dbbox/CONTROLFILE/control02.ctl.713.881859415 oracle11@vboxdb:dbbox1 # srvctl start database -d dbbox oracle11@vboxdb:dbbox1 # sqlplus SQL*Plus: Release 11.2.0.3.0 Production on Mon Jun 8 16:58:12 2015 Copyright (c) 1982, 2011, Oracle. All rights reserved. Enter user-name: /as sysdba Connettersi a: Oracle Continua a leggere

Copiare Datafile da ASM ad un altro Diskgroup

SQL> select file_name from dba_data_files where tablespace_name=’TEST’; FILE_NAME —————————————————— +DATA/TEST/datafile/test_01.363.837018395 SQL> alter database datafile ‘+DATA/TEST/datafile/test_01.363.837018395’ offline; RMAN> copy datafile ‘+DATA/TEST/datafile/test_01.363.837018395’ to ‘+DATA_2’; RMAN>run { set newname for datafile ‘+DATA/TEST/datafile/test_01.363.837018395’ to ‘+DATA_2/TEST/datafile/test_01.264.837098131’ ; switch datafile all; } SQL> recover datafile ‘+DATA_2/TEST/datafile/test_01.264.837098131’; SQL> alter database datafile ‘+DATA_2/TEST/datafile/test_01.264.837098131′ online; SQL> select file_name from dba_data_files where tablespace_name=’TEST’; FILE_NAME —————————– +DATA_2/TEST/datafile/test_01.264.837098131 SQL> alter diskgroup data drop file ‘+DATA/TEST/datafile/test_01.363.837018395’;

Copiare datafile da ASM ad un altro diskgroup

SQL> select file_name from dba_data_files where tablespace_name=’TEST’; FILE_NAME —————————————————— +DATA/TEST/datafile/test_01.363.837018395 SQL> alter database datafile ‘+DATA/TEST/datafile/test_01.363.837018395’ offline; RMAN> copy datafile ‘+DATA/TEST/datafile/test_01.363.837018395’ to ‘+DATA_2’; RMAN>run { set newname for datafile ‘+DATA/TEST/datafile/test_01.363.837018395’ to ‘+DATA_2/TEST/datafile/test_01.264.837098131’ ; switch datafile all; } SQL> recover datafile ‘+DATA_2/TEST/datafile/test_01.264.837098131’; SQL> alter database datafile ‘+DATA_2/TEST/datafile/test_01.264.837098131′ online; SQL> select file_name from dba_data_files where tablespace_name=’TEST’; FILE_NAME —————————– +DATA_2/TEST/datafile/test_01.264.837098131 SQL> alter diskgroup data drop file ‘+DATA/TEST/datafile/test_01.363.837018395’;