Oracle資料庫檔案遷移步驟
(1)首先確認需要遷移的檔案
SQL> select name from v$controlfile;
NAME
-----------------------------------------
D:\ORACLE\ORADATA\XSFREE\CONTROL01.CTL
D:\ORACLE\ORADATA\XSFREE\CONTROL02.CTL
SQL> select name from v$datafile;
NAME
-----------------------------------------
D:\ORACLE\ORADATA\XSFREE\SYSTEM01.DBF
D:\ORACLE\ORADATA\XSFREE\SYSAUX01.DBF
D:\ORACLE\ORADATA\XSFREE\UNDOTBS01.DBF
D:\ORACLE\ORADATA\XSFREE\USERS01.DBF
SQL> select member from v$logfile;
MEMBER
---------------------------------------------
D:\ORACLE\ORADATA\XSFREE\REDO01.LOG
D:\ORACLE\ORADATA\XSFREE\REDO02.LOG
D:\ORACLE\ORADATA\XSFREE\REDO03.LOG
SQL> select name from v$tempfile;
NAME
--------------------------------------
D:\ORACLE\ORADATA\XSFREE\TEMP01.DBF
(2)建立pfile,spfile
SQL> create pfile from spfile;
move SPFILEXSFREE.ORA SPFILEXSFREE.ORA_bak
(3)關閉資料庫
SQL> shutdown immediate;
(4)遷移資料庫檔案
將D:\oracle\oradata下的檔案複製到D:\oracle\oradata_bak下(本測試是將oradata目錄下的資料庫檔案遷移至oradata_bak下)
(5)修改pfile中控制檔案路徑
*.control_files='D:\oracle\oradata_bak\xsfree\control01.ctl','D:\oracle\oradata_bak\xsfree\control02.ctl'
(6)rename檔案
SQL> startup mount pfile='D:\oracle\product\11.2.0\dbhome_1\database\INITxsfree.ORA';
SQL> alter database rename file 'D:\ORACLE\ORADATA\XSFREE\SYSTEM01.DBF' to 'D:\ORACLE\ORADATA_BAK\XSFREE\SYSTEM01.DBF';
SQL> alter database rename file 'D:\ORACLE\ORADATA\XSFREE\SYSAUX01.DBF' to 'D:\ORACLE\ORADATA_BAK\XSFREE\SYSAUX01.DBF';
SQL> alter database rename file 'D:\ORACLE\ORADATA\XSFREE\UNDOTBS01.DBF' to 'D:\ORACLE\ORADATA_BAK\XSFREE\UNDOTBS01.DBF';
SQL> alter database rename file 'D:\ORACLE\ORADATA\XSFREE\USERS01.DBF' to 'D:\ORACLE\ORADATA_BAK\XSFREE\USERS01.DBF';
SQL> alter database rename file 'D:\ORACLE\ORADATA\XSFREE\REDO01.LOG' to 'D:\ORACLE\ORADATA_BAK\XSFREE\REDO01.LOG';
SQL> alter database rename file 'D:\ORACLE\ORADATA\XSFREE\REDO02.LOG' to 'D:\ORACLE\ORADATA_BAK\XSFREE\REDO02.LOG';
SQL> alter database rename file 'D:\ORACLE\ORADATA\XSFREE\REDO03.LOG' to 'D:\ORACLE\ORADATA_BAK\XSFREE\REDO03.LOG';
SQL> alter database rename file 'D:\ORACLE\ORADATA\XSFREE\TEMP01.DBF' to 'D:\ORACLE\ORADATA_BAK\XSFREE\TEMP01.DBF';
(7)開啟資料庫
SQL> alter database open;
SQL> create spfile from pfile='D:\oracle\product\11.2.0\dbhome_1\database\INITxsfree.ORA';
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/196700/viewspace-719415/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Mongodb資料遷移步驟MongoDB
- Git 倉庫程式碼遷移步驟記錄Git
- oracle資料庫的配置檔案Oracle資料庫
- 達夢資料庫資料檔案遷移過程資料庫
- oracle uncatalog資料庫備份檔案Oracle資料庫
- Oracle資料庫遷移至PolarDb(阿里雲資料庫)Oracle資料庫阿里
- oracle dg庫資料檔案空間不足Oracle
- Oracle資料庫啟動步驟Oracle資料庫
- Oracle資料庫(資料泵)遷移方案(上)Oracle資料庫
- Oracle資料庫(資料泵)遷移方案(下)Oracle資料庫
- 資料庫課程作業筆記 - 編寫資料庫遷移檔案資料庫筆記
- 分析Oracle資料庫日誌檔案(三)EPOracle資料庫
- 分析Oracle資料庫日誌檔案(二)DOOracle資料庫
- 分析Oracle資料庫日誌檔案(一)HBOracle資料庫
- 無外網Oracle資料庫遷移Oracle資料庫
- Oracle資料庫(DataGuard)遷移方案(上)Oracle資料庫
- Oracle資料庫(DataGuard)遷移方案(中)Oracle資料庫
- Oracle資料庫(DataGuard)遷移方案(下)Oracle資料庫
- ORACLE RAC ASM資料檔案遷移OMF檔案報錯ORA-01276解決OracleASM
- Oracle案例11——Oracle表空間資料庫檔案收縮Oracle資料庫
- 遷移資料庫的檔案到不同路徑(轉)資料庫
- kubernetes-部署Oracle資料庫步驟Oracle資料庫
- Oracle 資料檔案回收Oracle
- Centos MySQL資料庫遷移詳細步驟CentOSMySql資料庫
- Oracle DG備庫手動管理新增資料檔案Oracle
- oracle資料庫使用者建立步驟Oracle資料庫
- 達夢資料庫系統表空間資料檔案遷移過程資料庫
- oracle dg庫資料檔案建立失敗ORA-01111Oracle
- 【LOG】Oracle資料庫清理日誌、跟蹤檔案利器Oracle資料庫
- Oracle資料庫中資料行遷移與行連結Oracle資料庫
- Oracle 19c adg全庫遷移資料Oracle
- 資料檔案遷移至其他磁碟組
- 異構資料庫資料遷移 oracle to mysql之oracle sqlloader和mysql load data資料庫OracleMySql
- 基於Docker部署Oracle、MySQL等資料庫的資料檔案持久化DockerOracleMySql資料庫持久化
- Oracle資料檔案和臨時檔案的管理Oracle
- Masonite 熟悉步驟小記錄 (三、資料庫遷移)資料庫
- Oracle資料庫升級或資料遷移的方法探討Oracle資料庫
- 【資料庫資料恢復】Oracle資料庫檔案出現壞塊報錯的資料恢復案例資料庫資料恢復Oracle
- oracle 線上rename資料檔案Oracle