利用RMAN將非ASM檔案移動到ASM裡 - [ASM]
利用RMAN將非ASM檔案移動到ASM裡 - [ASM]
:轉載時請以超連結形式標明文章原始出處和作者資訊及本宣告
http://oracler.blogbus.com/logs/39754517.html
ASM是將來的趨勢,這段時間一直在研究ASM。進入正題。
1、要移動的資料檔案
SQL> select file_name from dba_data_files where tablespace_name='USERS';
FILE_NAME
----------------------------------------
+GQISJ/gqsj/datafile/users.264.686852255
+GQISJ/gqsj/datafile/users.268.687200231
+GQ/tmp/user01
/opt/app/oracle/user01.dbf
2、連線到RMAN
[oracle@lee dbs]$ rman target /
Recovery Manager: Release 10.2.0.4.0 - Production on Fri May 22 17:46:40 2009
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: GQSJ (DBID=2809640057)
RMAN>
3、把表空間置為只讀狀態
RMAN> sql'alter database datafile 7 offline';
using target database control file instead of recovery catalog
sql statement: alter database datafile 7 offline
RMAN>
4、複製資料檔案到ASM磁碟組
RMAN> backup as copy datafile 7 format'+gqisj';
Starting backup at 22-MAY-09
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=143 devtype=DISK
channel ORA_DISK_1: starting datafile copy
input datafile fno=00007 name=/opt/app/oracle/user01.dbf
output filename=+GQISJ/gqsj/datafile/users.269.687549245 tag=TAG20090522T175403 recid=1 stamp=687549244
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
Finished backup at 22-MAY-09
5、switch資料檔案
RMAN> switch datafile 7 to copy;
datafile 7 switched to datafile copy "+GQISJ/gqsj/datafile/users.269.687549245"
6、把資料檔案置為ONLINE
RMAN> sql'alter database datafile 7 online';
sql statement: alter database datafile 7 online
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of sql command on default channel at 05/22/2009 17:56:37
RMAN-11003: failure during parse/execution of SQL statement: alter database data file 7 online
ORA-01113: file 7 needs media recovery
ORA-01110: data file 7: '+GQISJ/gqsj/datafile/users.269.687549245'
這裡是由於把資料檔案置為OFFLINE沒有做檢查點,所以需要恢復。
RMAN> recover datafile 7;
Starting recover at 22-MAY-09
using channel ORA_DISK_1
starting media recovery
media recovery complete, elapsed time: 00:00:01
Finished recover at 22-MAY-09
RMAN> sql'alter database datafile 7 online';
sql statement: alter database datafile 7 online
7、刪除原始的檔案
[oracle@lee oracle]$ rm user01.dbf
8、同理我們可以把一個表空間移動到ASM,也可以從一個磁碟組移動到另一個磁碟組。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/90618/viewspace-692425/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle使用RMAN將普通資料檔案轉成ASMOracleASM
- 【ASM】ASM資料檔案和OS檔案(FILESYSTEM)轉移方法總結ASM
- 【RMAN】RMAN備份至ASMASM
- 將spfile從ASM裡遷移到檔案系統ASM
- ASM叢集檔案系統ACFS(ASM Cluster File System)ASM
- Oracle:ASM & 密碼檔案OracleASM密碼
- ASM單例項安裝後,需要手動設定ASM的引數檔案ASM單例
- 從定位資料塊所在ASM磁碟到ASM strippingASM
- 遷移ASM磁碟組ASM
- ASM下遷移spfileASM
- 【ASM】ASM啟動無法找到spfile問題原因ASM
- xbbed一鍵讀取ASM block到檔案系統ASMBloC
- 【ASM】Oracle asm刪除磁碟組注意事項ASMOracle
- 【ASM】ASM磁碟頭被重寫,如何修復ASM
- gnu inline asminlineASM
- goldengate + asm + racGoASM
- 12c複製 RAC ASM中的密碼檔案到檔案系統ASM密碼
- ORACLE RAC ASM資料檔案遷移OMF檔案報錯ORA-01276解決OracleASM
- ASM磁碟組限制ASM
- 4.5.1.1 srvctl add asmASM
- ASM(Automatic Storage Management)ASM
- Android Transform + ASM 初探AndroidORMASM
- ASM Metadata Dump UtilityASM
- RAC+ASM+DATAGUARDASM
- ASM Fast Mirror ResyncASMAST
- 【ASM】RAC19C因引數設定不當,asm無法啟動ASM
- 【ASM】asm常用命令及主要功能介紹ASM
- [20191128]11GR2 asm例項audit檔案.txtASM
- 【ASM】Oracle asm磁碟被格式化,如何掛載該磁碟組ASMOracle
- Oracle ASM神書《撥雲見日 解密Oracle ASM核心》出版了OracleASM解密
- Expdp 備份到ASM之 ORA-39070ASM
- 從 Java 位元組碼到 ASM 實踐JavaASM
- Oracle ASM擴容(NFS)OracleASMNFS
- Java ASM學習(2)JavaASM
- Automatic Storage Management (ASM)(轉)ASM
- Multi-path handling for asmASM
- ASM 翻譯系列第十三彈:ASM 高階知識 - Forcing the issueASM
- IDA批量處理VirusShare樣本獲得asm檔案與bytes檔案ASM
- ASM有自己的引數、密碼、alert、監聽檔案ASM密碼