This article assumes the database is open and in ARCHIVELOG mode:
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination +DATA1/orasun/
Oldest online log sequence 5
Next log sequence to archive 7
Current log sequence 7
1、Identify the ASM data files to move
SQL> select file_name from dba_data_files;
2、Identify the ASM diskgroup to which the database file will be moved to
SQL> select name from v$asm_diskgroup;
3、Take the ASM data file to be moved OFFLINE
SQL> alter database datafile '+DATA1/orasun/datafile/users.259.729795273' offline;
4、Copy the ASM database file from the source diskgroup to target diskgroup
$ rman target /
RMAN> copy datafile '+DATA1/orasun/datafile/users.259.729795273' to '+FILE_DATA';
5、Rename the ASM database file to point to the new location
SQL> alter database rename file'+DATA1/orasun/datafile/users.259.729795273' to '+FILE_DATA/ORASUN/DATAFILE/USERS.256.729898219';
6、Use RMAN to rename the ASM database file copy
RMAN> switch datafile '+FILE_DATA/ORASUN/DATAFILE/USERS.256.729898219' to copy;
7、Recovery the new ASM database file
SQL> recover datafile '+FILE_DATA/ORASUN/DATAFILE/USERS.256.729898219';
8、Bring the new ASM database file ONLINE
SQL> alter database datafile '+FILE_DATA/ORASUN/DATAFILE/USERS.256.729898219' online;
9、Verify the new ASM data file location
SQL> select file_name from dba_data_files;
10、Delete the old ASM database file from its original location
SQL> alter diskgroup data1 drop file '+DATA1/orasun/datafile/users.259.729795273';
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/17012874/viewspace-694563/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/17012874/viewspace-694563/