遷移案例一: oracle 8i 檔案遷移
前兩天去客戶那,因為客戶使用到的盤櫃儲存透過檢測發現可能有問題,為了防止資料檔案丟失
需要遷移到好的儲存硬碟上 客戶版本是oracle8i+IBM aix 平臺
需要遷移的有控制檔案,資料檔案,重做日誌檔案
首先關閉資料庫
1.控制檔案遷移
1.1 修改初始化引數 vi init.ora 使控制檔案引數對應上新遷移的目錄
1.2 複製控制檔案到新目錄下
cp /oradata/oradata1/control01.ctl /oradata4/ora8idata/ .
cp /oradata/oradata2/control02.ctl /oradata4/ora8idata/.
cp /oradata/oradata3/control03.ctl /oradata4/ora8idata/ .
2.遷移資料檔案
cp /oradata/oradata1/oracle/system01.dbf /oradata4/ora8idata/ system01.dbf
總共有50多個資料檔案需要遷移
其他資料檔案照上面步驟複製對新目錄下
3.啟動資料庫到mount狀態下
sqlplus internal
startup mount;
alter database rename file '/oradata/oradata1/oracle/system01.dbf' to '/oradata4/ora8idata/system01.dbf';
其他資料檔案也照上面操作,這步的意思,修改控制檔案,使其能認到新目錄下的資料檔案
一定要細心,不要搞錯路徑和檔名等,否則會修改不成功,導致資料庫打不開
為了防止出錯,最好寫指令碼來執行,這樣就避免手工帶來的誤操作
遷移完後,開啟資料庫
alter database open;
4.遷移重做日誌檔案到新路徑
alter database add logfile '/oradata4/ora8idata/redo01_new.log' size 100m;
alter database add logfile '/oradata4/ora8idata/redo02_new.log' size 100m;
alter database add logfile '/oradata4/ora8idata/redo03_new.log' size 100m;
alter database add logfile '/oradata4/ora8idata/redo04_new.log' size 100m;
alter system switch logfile;
alter database drop logfile group 1;
alter system switch logfile;
alter database drop logfile group 2;
alter system switch logfile;
alter database drop logfile group 3;
SQL> select MEMBER from v$logfile;
/oradata4/ora8idata/redo01_new.log
/oradata4/ora8idata/redo02_new.log
/oradata4/ora8idata/redo03_new.log
/oradata4/ora8idata/redo04_new.log
5.再次驗證關閉和啟動資料庫,看能否正常開啟
shutdown immediate;
startup;
啟動正常,遷移成功
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7199859/viewspace-464611/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- mysql檔案複製遷移MySql
- Laravel 遷移檔案生成包Laravel
- oracle遷移OCR盤Oracle
- Oracle遷移文件大全Oracle
- Oracle遷移文章大全Oracle
- 連載一:Oracle遷移文件大全Oracle
- oracle xtts遷移 AIX to LinuxOracleTTSAILinux
- Oracle rman duplicate遷移測試Oracle
- oracle 19c pdb遷移Oracle
- AWS RDS Oracle資料遷移Oracle
- 阿里雲NAS檔案遷移專案實踐阿里
- 建立遷移檔案 auth 認證表 users
- 利用offline datafile檔案方式遷移資料
- 專案遷移的思考
- Oracle12C新特性-線上重新命名遷移資料檔案(一)Oracle
- ORACLE RAC ASM資料檔案遷移OMF檔案報錯ORA-01276解決OracleASM
- Oracle RAC 遷移替換 OCR 盤Oracle
- 遷移oracle使用者密碼Oracle密碼
- 連載二:Oracle遷移文章大全Oracle
- 使用GoldenGate 遷移Oracle到PostgreSQL/LightDBGoOracleSQL
- 棧遷移
- 遷移公告
- 100爬蟲專案遷移爬蟲
- 【遷移】SqlServer 遷移到 MySQL 方法ServerMySql
- 用 Laravel 遷移檔案新增表註釋的一種方法Laravel
- 無外網Oracle資料庫遷移Oracle資料庫
- Oracle資料庫(DataGuard)遷移方案(上)Oracle資料庫
- Oracle資料庫(DataGuard)遷移方案(中)Oracle資料庫
- Oracle資料庫(DataGuard)遷移方案(下)Oracle資料庫
- Oracle中表空間、表、索引的遷移Oracle索引
- 【STATS】Oracle遷移表統計資訊Oracle
- Springboot 遷移及上傳檔案至阿里雲OSSSpring Boot阿里
- 使用dbeaver 用csv 檔案進行資料遷移
- FastDFS檔案系統遷移和資料恢復AST資料恢復
- docker映象遷移Docker
- 賬號遷移
- Jenkins Job遷移Jenkins
- 單體JOB向分散式JOB遷移案例分散式
- [論文閱讀] 顏色遷移-N維pdf遷移