將asm上datafile移動到其他的diskgroup或者普通filesystem上
1,將asm上datafile移動到其他的diskgroup上[@more@]
2,將asm上的datafile移動到普通的filesystem上[oracle@asm ~]$ rman target /
Recovery Manager: Release 11.2.0.1.0 - Production on Sat Feb 2 08:00:19 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database (not started)
RMAN> startup
Oracle instance started
database mounted
database opened
Total System Global Area 839282688 bytes
Fixed Size 2217992 bytes
Variable Size 549455864 bytes
Database Buffers 285212672 bytes
Redo Buffers 2396160 bytes
RMAN> report schema;
using target database control file instead of recovery catalog
Report of database schema for database with db_unique_name ASM
List of Permanent Datafiles
===========================
File Size(MB) Tablespace RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1 670 SYSTEM *** +DATA/asm/system01.dbf
2 510 SYSAUX *** +DATA/asm/sysaux01.dbf
3 75 UNDOTBS1 *** +DATA/asm/undotbs01.dbf
4 5 USERS *** +DATA/asm/users01.dbf
5 1 USERS *** +DATA/asm/users02.dbf
List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1 29 TEMP 32767 +DATA/asm/temp01.dbfbackup該檔案到其他的diskgroup上:RMAN> backup as copy datafile '+DATA/asm/users02.dbf' format '+flash'; (可以使用file_id代替檔案路徑)
Starting backup at 02-FEB-13
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=50 device type=DISK
channel ORA_DISK_1: starting datafile copy
input datafile file number=00005 name=+DATA/asm/users02.dbf
output file name=+FLASH/asm/datafile/users.260.806314045 tag=TAG20130202T080724 RECID=1 STAMP=806314045
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
Finished backup at 02-FEB-13offline需要移動的datafileRMAN> sql "alter database datafile ''+DATA/asm/users02.dbf'' offline";
sql statement: alter database datafile ''+DATA/asm/users02.dbf'' offlineswitch該datafile的name到新的diskgroup上RMAN> switch datafile "+DATA/asm/users02.dbf" to copy;
datafile 5 switched to datafile copy "+FLASH/asm/datafile/users.260.806314045"recover已經移動到新diskgroup的檔案RMAN> recover datafile "+FLASH/asm/datafile/users.260.806314045";
Starting recover at 02-FEB-13
using channel ORA_DISK_1
starting media recovery
media recovery complete, elapsed time: 00:00:01
Finished recover at 02-FEB-13online移動的datafileRMAN> sql "alter database datafile ''+FLASH/asm/datafile/users.260.806314045'' online";
sql statement: alter database datafile ''+FLASH/asm/datafile/users.260.806314045'' online再次檢視檔案的路徑RMAN> report schema;
Report of database schema for database with db_unique_name ASM
List of Permanent Datafiles
===========================
File Size(MB) Tablespace RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1 680 SYSTEM *** +DATA/asm/system01.dbf
2 510 SYSAUX *** +DATA/asm/sysaux01.dbf
3 75 UNDOTBS1 *** +DATA/asm/undotbs01.dbf
4 5 USERS *** +DATA/asm/users01.dbf
5 1 USERS *** +FLASH/asm/datafile/users.260.806314045
List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1 29 TEMP 32767 +DATA/asm/temp01.dbf刪除以前的檔案RMAN> delete datafilecopy '+data/asm/users02.dbf';
released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=50 device type=DISK
List of Datafile Copies
=======================
Key File S Completion Time Ckp SCN Ckp Time
------- ---- - --------------- ---------- ---------------
2 5 A 02-FEB-13 1027887 02-FEB-13
Name: +DATA/asm/users02.dbf
Do you really want to delete the above objects (enter YES or NO)? yes
deleted datafile copy
datafile copy file name=+DATA/asm/users02.dbf RECID=2 STAMP=806314150
Deleted 1 objects
做的方法和上面的步驟一樣(在做之前確保database為archivelog模式)
RMAN> backup as copy datafile '+DATA/asm/users01.dbf' format '/oradata/user01.dbf';
Starting backup at 02-FEB-13
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
input datafile file number=00004 name=+DATA/asm/users01.dbf
output file name=/oradata/user01.dbf tag=TAG20130202T082602 RECID=3 STAMP=806315163
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
Finished backup at 02-FEB-13
RMAN> sql "alter database datafile 4 offline";
sql statement: alter database datafile 4 offline
RMAN> switch datafile 4 to copy;
datafile 4 switched to datafile copy "/oradata/user01.dbf"
RMAN> recover datafile 4;
Starting recover at 02-FEB-13
using channel ORA_DISK_1
starting media recovery
media recovery complete, elapsed time: 00:00:00
Finished recover at 02-FEB-13
RMAN> sql "alter database datafile 4 online";
sql statement: alter database datafile 4 online
RMAN> report schema;
Report of database schema for database with db_unique_name ASM
List of Permanent Datafiles
===========================
File Size(MB) Tablespace RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1 680 SYSTEM *** +DATA/asm/system01.dbf
2 510 SYSAUX *** +DATA/asm/sysaux01.dbf
3 75 UNDOTBS1 *** +DATA/asm/undotbs01.dbf
4 5 USERS *** /oradata/user01.dbf
5 1 USERS *** +FLASH/asm/datafile/users.260.806314045
List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1 29 TEMP 32767 +DATA/asm/temp01.dbf
RMAN> delete datafilecopy 4;
released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=50 device type=DISK
List of Datafile Copies
=======================
Key File S Completion Time Ckp SCN Ckp Time
------- ---- - --------------- ---------- ---------------
4 4 A 02-FEB-13 1031361 02-FEB-13
Name: +DATA/asm/users01.dbf
Do you really want to delete the above objects (enter YES or NO)? yes
deleted datafile copy
datafile copy file name=+DATA/asm/users01.dbf RECID=4 STAMP=806315204
Deleted 1 objects
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24237320/viewspace-1060190/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 將普通filesystem上的database移動到asm上DatabaseASM
- 將asm上的資料庫移動到普通的filesystem上ASM資料庫
- oracle asm diskgroup add datafile error problemOracleASMError
- votedisk在ASM diskgroup上的存放規律ASM
- 利用RMAN將非ASM檔案移動到ASM裡 - [ASM]ASM
- 在ASM Diskgroup間移動資料檔案ASM
- 使用RMAN將RAC+ASM複製到單例項+ASM上ASM單例
- 將FileSystem轉換為ASM儲存ASM
- 將工作負荷組移動到其他資源池
- rman copy asm datafile(rename asm datafile)ASM
- Asm diskgroup 的修復ASM
- 最近的一次ASM diskgroup線上遷移記錄ASM
- ASM的資料庫遷移回到DISK上ASM資料庫
- 簡單兩步就能將 Laravel Log 資訊發到其他平臺上Laravel
- 如何將.Net SOE遷移升級到10.1上
- 如何將自己的本地專案上傳到github上?Github
- 【ASM】ASM資料檔案和OS檔案(FILESYSTEM)轉移方法總結ASM
- 將ORACLE資料庫審計相關的表移動到其他表空間Oracle資料庫
- script of check repair ASM DISKGROUPAIASM
- 移動ASM的spfile到一個新的disk groupASM
- 在 Mac 上通過 VirtualBox 將 Windows 10 安裝到可移動裝置中MacWindows
- 【ASM學習】普通資料庫向ASM例項的遷移(二)ASM資料庫
- 【ASM學習】普通資料庫向ASM例項的遷移(一)ASM資料庫
- 使用SecureCRT的SFTP將檔案上傳到Liunx系統上SecurecrtFTP
- ORA-17502, OSD-4002,15081 when creating a datafile on a ASM diskgroup-369898.1ASM
- partition 分割槽表移動到其他表空間
- 批量移動分割槽表到其他表空間
- 給ASM例項增加diskgroupASM
- 新建或修改ASM diskgroup 的問題ASM
- 《如何將windows上的軟體包或檔案上傳到linux服務上》WindowsLinux
- 將Excel file上轉到Internal table的方法Excel
- 把日誌寫到其他伺服器上的操作步驟伺服器
- Oracle 使用RMAN COPY 移動 Datafile 位置Oracle
- Rman 單例項filesystem(Windows)恢復到ASM環境(Linux)單例WindowsASMLinux
- 關於filesystem與ASM的效能對比ASM
- ASM管理 - 如何重新命名diskgroupASM
- Move datafile:From File System to ASMASM
- Move datafile:From ASM to File SystemASM