源庫 | 目標庫 | |
---|---|---|
操做系統 | WIN7 | WIN SVR 2012 R2 |
系統盤符 | C,D,E,F | C,D |
IP | x.x.x.216 | x.x.x.112 |
數據庫版本 | 10.2.0.4.0 - 64bi | 10.2.0.4.0 - 64bi |
存儲方式 | 單實例 | 單實例 |
ORACLE_HOME | D:\oracle\product\10.2.0\db_1 | D:\oracle\product\10.2.0\db_1 |
ORACLE_SID | ORCL | ORCL |
select name from v$datafile; select name from v$controlfile; select * from v$logfile; select dbid from v$database;
alter system switch logfile; alter system checkpoint; shutdown immediate;//可選[取決因而否停機遷庫]
shutdown immediate;
startup nomount; set dbid=1526707455;//(源庫DBID) shutdown immediate;
startup mount;
alter database backup controlfile to trace as 'c:\REBUILDCTL.SQL';
編輯 REBUILDCTL.SQL 文件夾,將數據文件,REDO 文件,臨時文件等替換爲放置到目標系統後的相對文件路徑。
html
關閉數據庫,而且運行 REBUILDCTL.SQL 文件數據庫
shutdown immediate; @c:\REBUILDCTL.SQL;
recover database;
alter database open resetlogs;
PSwindows