Linux 6.4平台利用RMAN遷移Oracle 11g R2資料庫

來源:互聯網
上載者:User

測試環境分別在虛擬機器安裝A,B主機
系統:linux 6.4,
資料庫:Oracle 11g r2
A主機:安裝oracle 11g r2資料庫
B主機:只安裝oracle 11g r2軟體

第一步,運行下面rman命令備份資料庫
run{
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/u01/app/dbback/config_%F';
allocate channel c1 type disk format '/u01/app/dbback/full_%U';
backup database tag 'full_gpodb_data' FILESPERSET 10 PLUS ARCHIVELOG FILESPERSET 20 DELETE ALL INPUT;
release channel c1;
}


[root@bogon ~]# su - oracle
[oracle@bogon ~]$ rman target /

Recovery Manager: Release 11.2.0.1.0 - Production on Sat Oct 26 05:16:55 2013

Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.

connected to target database: DB (DBID=1587060738) ------------記住這個DBID恢複資料庫會用到
RMAN> run{
2> CONFIGURE CONTROLFILE AUTOBACKUP ON;
3> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/u01/app/dbback/config_%F';
4> allocate channel c1 type disk format '/u01/app/dbback/full_%U';
5> backup database tag 'full_gpodb_data' FILESPERSET 10 PLUS ARCHIVELOG FILESPERSET 20 DELETE ALL INPUT;
6> release channel c1;
7> }

old RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters are successfully stored

old RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/u01/app/dbback/gpofullbak/%F';
new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/u01/app/dbback/config_%F';
new RMAN configuration parameters are successfully stored

allocated channel: c1
channel c1: SID=47 device type=DISK


Starting backup at 26-OCT-13
current log archived
channel c1: starting archived log backup set
channel c1: specifying archived log(s) in backup set
input archived log thread=1 sequence=21 RECID=12 STAMP=829805117
channel c1: starting piece 1 at 26-OCT-13
channel c1: finished piece 1 at 26-OCT-13
piece handle=/u01/app/dbback/full_08onbkhu_1_1 tag=TAG20131026T052518 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:01
channel c1: deleting archived log(s)
archived log file name=/u01/app/archiv/1_21_823244933.dbf RECID=12 STAMP=829805117
Finished backup at 26-OCT-13

Starting backup at 26-OCT-13
channel c1: starting full datafile backup set
channel c1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/db/system01.dbf
input datafile file number=00002 name=/u01/app/oracle/oradata/db/sysaux01.dbf
input datafile file number=00005 name=/u01/app/oracle/oradata/db/anfei01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/db/undotbs01.dbf
input datafile file number=00006 name=/u01/app/oracle/oradata/db/DB/datafile/o1_mf_dbs_91x4vt9f_.dbf
input datafile file number=00007 name=/u01/app/oracle/oradata/db/dbt.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/db/users01.dbf
channel c1: starting piece 1 at 26-OCT-13
channel c1: finished piece 1 at 26-OCT-13
piece handle=/u01/app/dbback/full_09onbkhv_1_1 tag=FULL_GPODB_DATA comment=NONE
channel c1: backup set complete, elapsed time: 00:01:36
Finished backup at 26-OCT-13

Starting backup at 26-OCT-13
current log archived
channel c1: starting archived log backup set
channel c1: specifying archived log(s) in backup set
input archived log thread=1 sequence=22 RECID=13 STAMP=829805216
channel c1: starting piece 1 at 26-OCT-13
channel c1: finished piece 1 at 26-OCT-13
piece handle=/u01/app/dbback/full_0aonbkl1_1_1 tag=TAG20131026T052657 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:01
channel c1: deleting archived log(s)
archived log file name=/u01/app/archiv/1_22_823244933.dbf RECID=13 STAMP=829805216
Finished backup at 26-OCT-13

Starting Control File and SPFILE Autobackup at 26-OCT-13
piece handle=/u01/app/dbback/config_c-1587060738-20131026-01 comment=NONE
Finished Control File and SPFILE Autobackup at 26-OCT-13

released channel: c1

RMAN>

更多詳情見請繼續閱讀下一頁的精彩內容:

Oracle基礎教程之通過RMAN複製資料庫

RMAN備份策略制定參考內容

RMAN備份學習筆記

OracleDatabase Backup加密 RMAN加密

  • 1
  • 2
  • 3
  • 下一頁

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.