Oracle 文件系统到ASM的迁移
[oracle@vm11g01 ~]$ rman target /
Recovery Manager: Release 11.2.0.1.0 - Production on Thu Oct 24 01:36:40 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database: WILSON (DBID=3949168870)
RMAN> sql 'alter tablespace users offline';
using target database control file instead of recovery catalog
sql statement: alter tablespace users offline
RMAN> backup as copy datafile 4 format '+DATA';
Starting backup at 24-OCT-13
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=32 device type=DISK
channel ORA_DISK_1: starting datafile copy
input datafile file number=00004 name=/data_sdb1/oradata/wilson/users01.dbf
output file name=+DATA/wilson/datafile/users.256.829618773 tag=TAG20131024T013930 RECID=2 STAMP=829618775
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07
Finished backup at 24-OCT-13
RMAN> switch datafile 4 to copy;
datafile 4 switched to datafile copy "+DATA/wilson/datafile/users.256.829618773"
RMAN> sql 'alter tablespace users online';
sql statement: alter tablespace users online
RMAN> report schema;
Report of database schema for database with db_unique_name WILSON
List of Permanent Datafiles =========================== File Size(MB) Tablespace RB segs Datafile Name ---- -------- -------------------- ------- ------------------------ 1 690 SYSTEM *** /data_sdb1/oradata/wilson/system01.dbf 2 580 SYSAUX *** /data_sdb1/oradata/wilson/sysaux01.dbf 3 95 UNDOTBS1 *** /data_sdb1/oradata/wilson/undotbs01.dbf 4 5 USERS *** +DATA/wilson/datafile/users.256.829618773 5 100 EXAMPLE *** /data_sdb1/oradata/wilson/example01.dbf List of Temporary Files ======================= File Size(MB) Tablespace Maxsize(MB) Tempfile Name ---- -------- -------------------- ----------- -------------------- 1 29 TEMP 32767 /data_sdb1/oradata/wilson/temp01.dbf
RMAN>