1.2.1. 表空间、数据文件迁移-从ASM到文件系统
RMAN> backup as copy datafile 5 format'/u01/oracle/10g/oradata/gt10g/gtlions01.dbf';
Starting backup at 25-FEB-13
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
input datafile fno=00005 name=+DATA01/gt10g/datafile/gtlions.258.808326729
outputfilename=/u01/oracle/10g/oradata/gt10g/gtlions01.dbf tag=TAG20130225T152239recid=121 stamp=808327359
channel ORA_DISK_1: datafile copy complete,elapsed time: 00:00:01
Finished backup at 25-FEB-13
RMAN> backup as copy datafile 6 format'/u01/oracle/10g/oradata/gt10g/gtlions02.dbf';
Starting backup at 25-FEB-13
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
input datafile fno=00006name=+DATA01/gt10g/datafile/gtlions.265.808326737
outputfilename=/u01/oracle/10g/oradata/gt10g/gtlions02.dbf tag=TAG20130225T152247recid=122 stamp=808327367
channel ORA_DISK_1: datafile copy complete,elapsed time: 00:00:01
Finished backup at 25-FEB-13
RMAN> switch datafile 5 to copy;
datafile 5 switched to datafile copy"/u01/oracle/10g/oradata/gt10g/gtlions01.dbf"
RMAN> switch datafile 6 to copy;
datafile 6 switched to datafile copy"/u01/oracle/10g/oradata/gt10g/gtlions02.dbf"
RMAN> sql 'alter tablespace gtlions online';
sql statement: alter tablespace gtlions online
RMAN> report schema;
Report of database schema
List of Permanent Datafiles
===========================
File Size(MB) Tablespace RB segs Datafile Name
---- -------- -------------------- -------------------------------
1 440 SYSTEM *** /u01/oracle/10g/oradata/gt10g/system01.dbf
2 25 UNDOTBS1 *** /u01/oracle/10g/oradata/gt10g/undotbs1.dbf
3 250 SYSAUX *** /u01/oracle/10g/oradata/gt10g/sysaux01.dbf
4 5 USERS *** /u01/oracle/10g/oradata/gt10g/users01.dbf
5 10 GTLIONS *** /u01/oracle/10g/oradata/gt10g/gtlions01.dbf
6 10 GTLIONS *** /u01/oracle/10g/oradata/gt10g/gtlions02.dbf
List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
---- -------- -------------------- -------------------------------
1 100 TEMP 100 /u01/oracle/10g/oradata/gt10g/temp01.dbf
4 100 GTLIONSTEMP 100 /u01/oracle/10g/oradata/gt10g/gtlionstemp01.dbf
SQL> Select ts#,Name From v$tablespace WhereName='GTLIONS'
2 Union All
3 Select file#,Name From v$datafile Wherets#=7;
TS# NAME
--- --------------------------------------------------
7 GTLIONS
5/u01/oracle/10g/oradata/gt10g/gtlions01.dbf
6/u01/oracle/10g/oradata/gt10g/gtlions02.dbf
-The End-