資源描述:
《裸設(shè)備遷移方案》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在教育資源-天天文庫。
1、Sxdb的數(shù)據(jù)庫,由于本人過失,將數(shù)據(jù)文件加到了r5上,特準(zhǔn)備了一下遷移方案!測試在redhat5下面進(jìn)行的,同樣是采用邏輯卷的方式的。一、測試過程1、查看一下數(shù)據(jù)據(jù)文件SQL>selectstatus,file_namefromdba_data_fileswheretablespace_name='USERSSTATUSFILE_NAME-----------------------------------------AVAILABLE/dev/raw/raw11AVAILABLE/dev/raw/raw12
2、AVAILABLE/dev/raw/raw13AVAILABLE/dev/raw/raw14AVAILABLE/dev/raw/raw15假如要將raw15遷移到別的存儲上面去[root@uptestoradata]#vgdisplayoravg
3、grepFreeFreePE/Size51830/20.25GB2、新建lv[root@updataoradata]#lvcreate-nusers06-L20482moravg[root@updataoradata]#raw/dev/raw/raw16/dev/ma
4、pper/oravg-users06[root@updataoradata]#chownoracle:oinstall/dev/mapper/oravg-users06[root@updataoradata]#chownoracle:oinstall/dev/raw/raw16[root@updataoradata]#chmod660/dev/raw/raw16建好了后,就可以遷移了3、遷移裸設(shè)備首先將要遷移的文件離線SQL>alterdatabasedatafile'/dev/raw/raw15'offlin
5、e打開rman,進(jìn)行遷移復(fù)制[oracle@updatau02]$rmantarget/RMAN>copydatafile'/dev/raw/raw15'to'/dev/raw/raw16';Startingbackupat05-MAY-12usingtargetdatabasecontrolfileinsteadofrecoverycatalogallocatedchannel:ORA_DISK_1channelORA_DISK_1:SID=18devicetype=DISKchannelORA_DISK_1
6、:startingdatafilecopyinputdatafilefilenumber=00005name=/dev/raw/raw15outputfilename=/dev/raw/raw15tag=TAG20120505T051439RECID=3STAMP=782457346channelORA_DISK_1:datafilecopycomplete,elapsedtime:00:05:15Finishedbackupat05-MAY-124.對數(shù)據(jù)庫文件renameonlineSQL>shutdow
7、nimmediateDatabaseclosed.Databasedismounted.ORACLEinstanceshutdown.SQL>startupmountORACLEinstancestarted.TotalSystemGlobalArea701485056bytesFixedSize2216664bytesVariableSize322964776bytesDatabaseBuffers373293056bytesRedoBuffers3010560bytesDatabasemounted.SQL
8、>alterdatabaserenamefile'/dev/raw/raw15'to'/dev/raw/raw16';SQL>alterdatabasedatafile'/dev/raw/raw16'online;*ERRORatline1:ORA-01113:file16needsmediarecoveryORA-01110:datafile16:'/dev/raw/raw16'提示需要恢復(fù)SQL>recoverdatafile'/dev/raw/raw16';Mediarecoverycomplete.SQ
9、L>alterdatabasedatafile'/dev/raw/raw16'online;Databasealtered.SQL>alterdatabaseopen;Databasealtered.做了一個(gè)resizeSQL>alterdatabasedatafile'/dev/raw/raw16'resize20480m;這種遷移,一定要求在歸檔模式下進(jìn)行的!二、aix上面的方案關(guān)