移動資料檔案從檔案系統到ASM磁碟組中
測試環境:ORACLE 10.2.0.4 + ASM
把資料庫檔案從檔案系統移動到ASM,跟之前介紹的將ASM磁碟中的資料檔案移動到檔案其實差不多,也是有兩種方法可以實現,分別在資料庫關閉或者掛在狀態和在資料庫執行時把涉及到的表空間OFFLINE,下面我們透過實際操作來介紹下:
資料庫處於RUNNING(OPEN)狀態
1、 確認要移動的資料檔案
SQL>
select file_id,file_name,tablespace_name from dba_data_files where file_id=4;
FILE_ID FILE_NAME TABLESPACE_NAME
---------- --------------------------------------------------
------------------------------
4 /home/oracle/users.dbf USERS
2、 OFFLINE表空間USERS
SQL>
alter tablespace users offline;
Tablespace altered.
3、 透過RMAN進行COPY
RMAN>
copy datafile 4 to '+XINER_DATA';
Starting backup at 07-APR-2011 12:35:51
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
input datafile fno=00004 name=/home/oracle/users.dbf
output filename=+XINER_DATA/xiner/datafile/users.266.747837351
ag=TAG20110407T123551 recid=3 stamp=747837353
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
Finished backup at 07-APR-2011 12:35:54
Starting Control File and SPFILE Autobackup at 07-APR-2011 12:35:54
piece handle=/u01/app/oracle/product/10.2.0/db_1/dbs/c-4034639180-20110407-07
comment=NONE
Finished Control File and SPFILE Autobackup at 07-APR-2011 12:35:57
4、 更新控制檔案以便其可以識別新路徑下的資料檔案
RMAN>
switch datafile 4 to copy;
datafile 4 switched to datafile copy
"+XINER_DATA/xiner/datafile/users.266.747837351"
5、 確認資料檔案已被遷至ASM磁碟組
SQL>
select file_name,tablespace_name from dba_data_files where file_id=4;
FILE_NAME TABLESPACE_NAME
--------------------------------------------------
------------------------------
+XINER_DATA/xiner/datafile/users.266.747837351 USERS
另外一種方式就是將資料庫關閉(shutdown)或者啟動到MOUNT狀態,然後透過RMAN進行copy,更以上面的步驟幾乎一樣,我就省略不寫了,有什麼問題,歡迎大家留言~
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/25834554/viewspace-707653/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 移動資料檔案從ASM到檔案系統ASM
- 從ASM磁碟中複製檔案到本地檔案系統ASM
- 如何移動asm磁碟組內的資料檔案到另外一個磁碟組ASM
- 如何遷移ASM資料檔案到檔案系統ASM
- 在ASM磁碟組之間移動檔案ASM
- 用rman從檔案系統遷移資料庫到asm資料庫ASM
- ASM與檔案系統之間copy資料檔案--檔案系統到ASMASM
- oracle 將表空間下的資料檔案從檔案系統遷移到ASM磁碟組OracleASM
- 使用rman在oracle ASM磁碟組之間移動資料檔案OracleASM
- 四、用rman從檔案系統遷移資料庫到asm資料庫ASM
- 實現資料庫由檔案系統遷移到 ASM 磁碟組中資料庫ASM
- 使用RMAN遷移檔案系統資料庫到ASM資料庫ASM
- 遷移資料庫檔案到ASM資料庫ASM
- asm拷貝檔案到檔案系統ASM
- ASM檔案系統遷移ASM
- asm 檔案系統遷移ASM
- 資料庫從檔案系統遷移到ASM資料庫ASM
- 用oracle amdu 抽取asm磁碟組的資料檔案OracleASM
- ORACLE 資料庫 ASM磁碟組上新增控制檔案Oracle資料庫ASM
- 10G下從ASM複製檔案到檔案系統ASM
- 從ASM磁碟中還原出檔案(二)ASM
- 從ASM磁碟中還原出檔案(一)ASM
- ASM之磁碟組中目錄檔案的管理ASM
- ASM下資料檔案遷移至不同磁碟組小記ASM
- 將資料庫從ASM遷移到檔案系統資料庫ASM
- 將資料庫從檔案系統遷移到ASM資料庫ASM
- 在ASM Diskgroup間移動資料檔案ASM
- 將ASM裡面的檔案copy到檔案系統ASM
- 移動資料檔案,平衡磁碟負載負載
- 利用rman遷移裸裝置資料檔案到檔案系統
- 使用shell指令碼及asm cp或RMAN copy批量將資料檔案從ASM拷貝到檔案系統指令碼ASM
- 【資料遷移】RMAN遷移資料庫到ASM(二)切換資料檔案到ASM資料庫ASM
- oracle中移動控制檔案、資料檔案、日誌檔案Oracle
- oracle asm 儲存 a磁碟組中的資料檔案 遷移到b磁碟組實施步驟OracleASM
- 利用RMAN將非ASM檔案移動到ASM裡 - [ASM]ASM
- 用RMAN遷移檔案到ASM或從ASM遷出ASM
- 遷移檔案系統管理下的db到asm下ASM
- 移動資料檔案、系統表空間檔案、臨時表空間檔案