1、使用rman将数据文件迁移到asm磁盘组
run {
ALLOCATE CHANNEL ch1 DEVICE TYPE DISK;
BACKUP AS COPY TAG 'TESTORCL' INCREMENTAL LEVEL 0 DATABASE FORMAT "+DATADG/%d_%t_%u.dbf";
release channel ch1;
}
RMAN> run {
2> allocate channel ch1 device type disk;
3> backup as copy tag 'testorcl' incremental level 0 database format "+DATADG/%d_%t_%u.dbf";
4> release channel ch1;
5> }
using target database control file instead of recovery catalog
allocated channel: ch1
channel ch1: SID=13 device type=DISK
Starting backup at 07-SEP-21
channel ch1: starting datafile copy
input datafile file number=00003 name=/bak/oradata/orcl_1082564913_3s08d89h.dbf
output file name=+DATADG/orcl_1082652224_4c08fti0.dbf tag=TESTORCL RECID=14 STAMP=1082652334
channel ch1: datafile copy complete, elapsed time: 00:01:55
channel ch1: starting datafile copy
input datafile file number=00004 name=/bak/oradata/orcl_1082565018_3t08d8cq.dbf
output file name=+DATADG/orcl_1082652339_4d08ftlj.dbf tag=TESTORCL RECID=15 STAMP=1082652433
channel ch1: datafile copy complete, elapsed time: 00:01:35
channel ch1: starting datafile copy
input datafile file number=00005 name=/bak/oradata/orcl_1082565113_3u08d8fp.dbf
output file name=+DATADG/orcl_1082652434_4e08ftoi.dbf tag=TESTORCL RECID=16 STAMP=1082652531
channel ch1: datafile copy complete, elapsed time: 00:01:45
channel ch1: starting datafile copy
input datafile file number=00002 name=/bak/oradata/orcl_1082565218_3v08d8j2.dbf
output file name=+DATADG/orcl_1082652540_4f08ftrs.dbf tag=TESTORCL RECID=17 STAMP=1082652580
channel ch1: datafile copy complete, elapsed time: 00:00:45
channel ch1: starting datafile copy
input datafile file number=00001 name=/bak/oradata/orcl_1082565264_4008d8kg.dbf
output file name=+DATADG/orcl_1082652585_4g08ftt9.dbf tag=TESTORCL RECID=18 STAMP=1082652622
channel ch1: datafile copy complete, elapsed time: 00:00:45
Finished backup at 07-SEP-21
Starting Control File and SPFILE Autobackup at 07-SEP-21
piece handle=/u01/app/oracle/product/11.2.0/db/dbs/c-4138203756-20210907-02 comment=NONE
Finished Control File and SPFILE Autobackup at 07-SEP-21
released channel: ch1
RMAN>
2、数据库启动到nomount状态
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>