剛開始出現了些問題
一個
前提:擁有完整的數據庫備份和歸檔日志
Oracle版本:
操作系統: linux
備份程序:rman
把所有rman的備份(包括控制文件的自動備份)拷貝到新的服務器上
遷移過程如下:
$set oracle_sid=service
SQL> conn / as sysdba
Connected
SQL>startup nomount;
SQL> declare
devtype varchar
done boolean;
begin
devtype :=dbms_backup_restore
dbms_backup_restore
dbms_backup_restore
end;
/
PL/SQL procedure successfully completed
$ cp control
$ cp control
SQL>alter database mount
Recovery Manager: Release
Copyright (c)
RMAN> connect target /
connected to target database: SERVICE (DBID=
RMAN> restore database ;
Starting restore at
using target database controlfile instead of recovery catalog
allocated channel: ORA_DISK_
channel ORA_DISK_
channel ORA_DISK_
channel ORA_DISK_
restoring datafile
restoring datafile
restoring datafile
restoring datafile
restoring datafile
restoring datafile
restoring datafile
channel ORA_DISK_
piece handle=/opt/backup/service_mpgr
channel ORA_DISK_
Finished restore at
RMAN> list backup archivelog all;
RMAN> recover database;
Starting recover at
using channel ORA_DISK_
starting media recovery
channel ORA_DISK_
channel ORA_DISK_
archive log thread=
channel ORA_DISK_
piece handle=/opt/backup/service_mqgr
channel ORA_DISK_
archive log filename=/opt/archive/SERVICE
channel ORA_DISK_
channel ORA_DISK_
archive log thread=
channel ORA_DISK_
archive log thread=
channel ORA_DISK_
piece handle=/opt/backup/service_msgr
channel ORA_DISK_
archive log filename=/opt/archive/SERVICE
archive log filename=/opt/archive/SERVICE
channel ORA_DISK_
channel ORA_DISK_
archive log thread=
channel ORA_DISK_
archive log thread=
channel ORA_DISK_
archive log thread=
channel ORA_DISK_
archive log thread=
channel ORA_DISK_
archive log thread=
channel ORA_DISK_
archive log thread=
channel ORA_DISK_
archive log thread=
channel ORA_DISK_
archive log thread=
channel ORA_DISK_
archive log thread=
channel ORA_DISK_
archive log thread=
channel ORA_DISK_
archive log thread=
channel ORA_DISK_
archive log thread=
channel ORA_DISK_
piece handle=/opt/backup/service_mvgraf
channel ORA_DISK_
archive log filename=/opt/archive/SERVICE
archive log filename=/opt/archive/SERVICE
archive log filename=/opt/archive/SERVICE
archive log filename=/opt/archive/SERVICE
archive log filename=/opt/archive/SERVICE
archive log filename=/opt/archive/SERVICE
archive log filename=/opt/archive/SERVICE
archive log filename=/opt/archive/SERVICE
archive log filename=/opt/archive/SERVICE
archive log filename=/opt/archive/SERVICE
archive log filename=/opt/archive/SERVICE
archive log filename=/opt/archive/SERVICE
channel ORA_DISK_
channel ORA_DISK_
archive log thread=
channel ORA_DISK_
archive log thread=
channel ORA_DISK_
archive log thread=
channel ORA_DISK_
archive log
From:http://tw.wingwit.com/Article/program/Java/JSP/201311/19738.html