Oracle使用RMAN將普通資料檔案轉成ASM

abstractcyj發表於2018-03-27
1. 資料庫啟動至mount
   SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount

2. RMAN備份資料檔案
RMAN> backup as copy database format '+data';  
Starting backup at 27-MAR-18
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=6 device type=DISK
channel ORA_DISK_1: starting datafile copy
input datafile file number=00001 name=/u01/app/oracle/oradata/test/system01.dbf

3. switch datafile 
RMAN> switch database to copy;

datafile 1 switched to datafile copy "+DATA/test/datafile/system.276.971869559"
datafile 2 switched to datafile copy "+DATA/test/datafile/sysaux.277.971869589"
datafile 3 switched to datafile copy "+DATA/test/datafile/undotbs1.278.971869615"
datafile 4 switched to datafile copy "+DATA/test/datafile/users.280.971869621"

4. alter database open
SQL> alter database open;


Database altered.

5. 驗證
SQL> select file_name from dba_data_files;

FILE_NAME
--------------------------------------------------------------------------------
+DATA/test/datafile/users.280.971869621
+DATA/test/datafile/undotbs1.278.971869615
+DATA/test/datafile/sysaux.277.971869589
+DATA/test/datafile/system.276.971869559

6. 刪除原資料檔案




來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8520577/viewspace-2152252/,如需轉載,請註明出處,否則將追究法律責任。

相關文章