rac asm 恢復到 單例項 1

it_newbalance發表於2013-02-03
給大家分享下我自己整理並實驗rac asm恢復到單例項的步驟,由於內容比較多,為了方便大家閱讀,本次恢復的步驟我會分兩部分分享給大家,第一部分屬於基礎準備工作部分,第二部分是具體恢復步驟,好不多說了,下面進入基礎準備工作:

1.1. 檢查rac執行狀態

rac1,rac2root使用者執行crs_stat -t

[root@rac1 ~]# crs_stat -t

Name Type Target State Host

------------------------------------------------------------

ora....B1.inst application ONLINE ONLINE rac1

ora....B2.inst application ONLINE ONLINE rac2

ora.RACDB.db application ONLINE ONLINE rac1

ora....DB1.srv application ONLINE ONLINE rac1

ora....DB2.srv application ONLINE ONLINE rac2

ora...._taf.cs application ONLINE ONLINE rac1

ora....SM1.asm application ONLINE ONLINE rac1

ora....C1.lsnr application ONLINE ONLINE rac1

ora.rac1.gsd application ONLINE ONLINE rac1

ora.rac1.ons application ONLINE ONLINE rac1

ora.rac1.vip application ONLINE ONLINE rac1

ora....SM2.asm application ONLINE ONLINE rac2

ora....C2.lsnr application ONLINE ONLINE rac2

ora.rac2.gsd application ONLINE ONLINE rac2

ora.rac2.ons application ONLINE ONLINE rac2

ora.rac2.vip application ONLINE ONLINE rac2

1.2. 啟用rac到歸檔模式

1.2.1建立歸檔及備份

如果已經是歸檔模式,請跳到1.3

所有例項都要建立:

[root@rac1 ~]# su - oracle

mkdir -p /u01/app/oracle/backup/archive1

mkdir -p /u01/app/oracle/backup/archive2

RACDB1@rac1 /home/oracle$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Dec 26 10:43:14 2012

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, Real Application Clusters, OLAP and Data Mining options

SQL> archive log list;

Database log mode No Archive Mode

Automatic archival Disabled

Archive destination /u01/app/oracle/product/10.2.0/db_1/dbs/arch

Oldest online log sequence 1

Current log sequence 2

SQL>

資料庫是非歸檔模式,啟動資料庫到歸檔模式

1.2.2.設定歸檔路徑

sqlplus下用sys使用者登入執行

alter system set log_archive_dest_1='location=/u01/app/oracle/backup/archive2' scope=both sid='RACDB2';

alter system set log_archive_dest_2='service=racdb1' scope=both sid='RACDB2';

alter system set log_archive_dest_1='location=/u01/app/oracle/backup/archive1' scope=both sid='RACDB1';

alter system set log_archive_dest_2='service=racdb2' scope=both sid='RACDB1';

alter system set standby_archive_dest='/u01/app/oracle/backup/archive2' scope=both sid='RACDB1';

alter system set standby_archive_dest='/u01/app/oracle/backup/archive1' scope=both sid='RACDB2';

1.2.3.停止叢集資料庫

[root@rac2 ~]# srvctl stop database -d RACDB

[root@rac2 ~]#

1.2.4.檢查資料庫狀態

[root@rac1 ~]# crs_stat -t

Name Type Target State Host

------------------------------------------------------------

ora....B1.inst application OFFLINE OFFLINE

ora....B2.inst application OFFLINE OFFLINE

ora.RACDB.db application OFFLINE OFFLINE

ora....DB1.srv application OFFLINE OFFLINE

ora....DB2.srv application OFFLINE OFFLINE

ora...._taf.cs application OFFLINE OFFLINE

ora....SM1.asm application ONLINE ONLINE rac1

ora....C1.lsnr application ONLINE ONLINE rac1

ora.rac1.gsd application ONLINE ONLINE rac1

ora.rac1.ons application ONLINE ONLINE rac1

ora.rac1.vip application ONLINE ONLINE rac1

ora....SM2.asm application ONLINE ONLINE rac2

ora....C2.lsnr application ONLINE ONLINE rac2

ora.rac2.gsd application ONLINE ONLINE rac2

ora.rac2.ons application ONLINE ONLINE rac2

ora.rac2.vip application ONLINE ONLINE rac2

確認資料庫、例項和服務狀態都是offline

1.2.5.啟動rac1mount狀態

RACDB1@rac1 /home/oracle$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Dec 26 10:50:47 2012

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Connected to an idle instance.

SQL> startup mount;

ORACLE instance started.

Total System Global Area 167772160 bytes

Fixed Size 1218316 bytes

Variable Size 83888372 bytes

Database Buffers 79691776 bytes

Redo Buffers 2973696 bytes

Database mounted.

SQL>

1.2.6.檢視資料庫狀態

[root@rac1 ~]# crs_stat -t

Name Type Target State Host

------------------------------------------------------------

ora....B1.inst application ONLINE ONLINE rac1

ora....B2.inst application OFFLINE OFFLINE

ora.RACDB.db application ONLINE ONLINE rac2

ora....DB1.srv application OFFLINE OFFLINE

ora....DB2.srv application OFFLINE OFFLINE

ora...._taf.cs application OFFLINE OFFLINE

ora....SM1.asm application ONLINE ONLINE rac1

ora....C1.lsnr application ONLINE ONLINE rac1

ora.rac1.gsd application ONLINE ONLINE rac1

ora.rac1.ons application ONLINE ONLINE rac1

ora.rac1.vip application ONLINE ONLINE rac1

ora....SM2.asm application ONLINE ONLINE rac2

ora....C2.lsnr application ONLINE ONLINE rac2

ora.rac2.gsd application ONLINE ONLINE rac2

ora.rac2.ons application ONLINE ONLINE rac2

ora.rac2.vip application ONLINE ONLINE rac2

此時資料庫狀態onlinerac1的狀態online

1.2.7.修改資料庫為歸檔模式

SQL> alter database archivelog;

Database altered.

SQL>

1.2.8.開啟rac1例項

SQL> alter database open;

Database altered.

SQL>

1.2.9.檢視資料庫歸檔狀態

SQL> archive log list;

Database log mode Archive Mode

Automatic archival Enabled

Archive destination /u01/app/oracle/product/10.2.0/db_1/dbs/arch

Oldest online log sequence 1

Next log sequence to archive 2

Current log sequence 2

SQL>

此時rac1已經是歸檔模式

1.2.10.啟動rac2例項

[root@rac2 ~]# srvctl start instance -d RACDB -i racdb2

[root@rac2 ~]#

1.2.11.檢視資料庫叢集狀態

[root@rac1 ~]# crs_stat -t

Name Type Target State Host

------------------------------------------------------------

ora....B1.inst application ONLINE ONLINE rac1

ora....B2.inst application ONLINE ONLINE rac2

ora.RACDB.db application ONLINE ONLINE rac2

ora....DB1.srv application OFFLINE OFFLINE

ora....DB2.srv application OFFLINE OFFLINE

ora...._taf.cs application OFFLINE OFFLINE

ora....SM1.asm application ONLINE ONLINE rac1

ora....C1.lsnr application ONLINE ONLINE rac1

ora.rac1.gsd application ONLINE ONLINE rac1

ora.rac1.ons application ONLINE ONLINE rac1

ora.rac1.vip application ONLINE ONLINE rac1

ora....SM2.asm application ONLINE ONLINE rac2

ora....C2.lsnr application ONLINE ONLINE rac2

ora.rac2.gsd application ONLINE ONLINE rac2

ora.rac2.ons application ONLINE ONLINE rac2

ora.rac2.vip application ONLINE ONLINE rac2

發現服務沒有啟動

1.2.12.手動啟動服務

[root@rac2 ~]# srvctl start service -d RACDB -s "racdb_taf"

[root@rac2 ~]#

1.2.13.檢視資料庫狀態

[root@rac1 ~]# crs_stat -t

Name Type Target State Host

------------------------------------------------------------

ora....B1.inst application ONLINE ONLINE rac1

ora....B2.inst application ONLINE ONLINE rac2

ora.RACDB.db application ONLINE ONLINE rac2

ora....DB1.srv application ONLINE ONLINE rac1

ora....DB2.srv application ONLINE ONLINE rac2

ora...._taf.cs application ONLINE ONLINE rac1

ora....SM1.asm application ONLINE ONLINE rac1

ora....C1.lsnr application ONLINE ONLINE rac1

ora.rac1.gsd application ONLINE ONLINE rac1

ora.rac1.ons application ONLINE ONLINE rac1

ora.rac1.vip application ONLINE ONLINE rac1

ora....SM2.asm application ONLINE ONLINE rac2

ora....C2.lsnr application ONLINE ONLINE rac2

ora.rac2.gsd application ONLINE ONLINE rac2

ora.rac2.ons application ONLINE ONLINE rac2

ora.rac2.vip application ONLINE ONLINE rac2

[root@rac1 ~]#

到此資料庫歸檔模式修改完成,資料庫啟動正常

1.3. 備份rac資料庫

1.3.1.插入一些測試資料,並手動歸檔

節點一:

RACDB1@rac1 /home/oracle$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Dec 26 11:28:39 2012

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, Real Application Clusters, OLAP and Data Mining options

SQL> create user test identified by test;

User created.

SQL> grant dba to test;

Grant succeeded.

SQL> conn test/test;

Connected.

SQL>

SQL>

SQL> create table test as select * from dba_objects;

Table created.

SQL> select count(*) from test;

COUNT(*)

----------

50351

SQL> conn / as sysdba

Connected.

SQL> alter system switch logfile;

System altered.

節點二:

RACDB2@rac2 /home/oracle$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Dec 26 11:31:45 2012

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, Real Application Clusters, OLAP and Data Mining options

SQL> conn test/test

Connected.

SQL> create table test2 as select * from test;

Table created.

SQL> select count(*) from test2;

COUNT(*)

----------

50351

SQL> conn / as sysdba

Connected.

SQL> alter system switch logfile;

System altered.

1.3.2.備份前檢查叢集狀態

[root@rac1 ~]# crs_stat -t

Name Type Target State Host

------------------------------------------------------------

ora....B1.inst application ONLINE ONLINE rac1

ora....B2.inst application ONLINE ONLINE rac2

ora.RACDB.db application ONLINE ONLINE rac2

ora....DB1.srv application ONLINE ONLINE rac1

ora....DB2.srv application ONLINE ONLINE rac2

ora...._taf.cs application ONLINE ONLINE rac1

ora....SM1.asm application ONLINE ONLINE rac1

ora....C1.lsnr application ONLINE ONLINE rac1

ora.rac1.gsd application ONLINE ONLINE rac1

ora.rac1.ons application ONLINE ONLINE rac1

ora.rac1.vip application ONLINE ONLINE rac1

ora....SM2.asm application ONLINE ONLINE rac2

ora....C2.lsnr application ONLINE ONLINE rac2

ora.rac2.gsd application ONLINE ONLINE rac2

ora.rac2.ons application ONLINE ONLINE rac2

ora.rac2.vip application ONLINE ONLINE rac2

1.3.3.開始rman備份

RACDB1@rac1 /home/oracle$ rman target /

Recovery Manager: Release 10.2.0.1.0 - Production on Wed Dec 26 11:38:51 2012

Copyright (c) 1982, 2005, Oracle. All rights reserved.

connected to target database: RACDB (DBID=800604347)--記住此DBID

RMAN> run{

2> allocate channel ch0 type disk connect 'sys/oracle@racdb1';

3> allocate channel ch1 type disk connect 'sys/oracle@racdb2';

4> backup as compressed backupset full database format '/u01/app/oracle/backup/racfull_blk_%u_%p_%s.rmn' include current controlfile plus archivelog delete all input;

5> release channel ch0;

6> release channel ch1;

7> }

using target database control file instead of recovery catalog

allocated channel: ch0

channel ch0: sid=151 instance=RACDB1 devtype=DISK

allocated channel: ch1

channel ch1: sid=136 instance=RACDB2 devtype=DISK

Starting backup at 27-DEC-12

current log archived

channel ch0: starting compressed archive log backupset

channel ch0: specifying archive log(s) in backup set

input archive log thread=1 sequence=5 recid=7 stamp=803142536

channel ch0: starting piece 1 at 27-DEC-12

channel ch1: starting compressed archive log backupset

channel ch1: specifying archive log(s) in backup set

input archive log thread=1 sequence=6 recid=13 stamp=803143356

input archive log thread=2 sequence=4 recid=9 stamp=803142647

channel ch1: starting piece 1 at 27-DEC-12

channel ch0: finished piece 1 at 27-DEC-12

piece handle=/u01/app/oracle/product/10.2.0/db_1/dbs/0anttvm4_1_1 tag=TAG20121227T152243 comment=NONE

channel ch0: backup set complete, elapsed time: 00:00:09

channel ch0: deleting archive log(s)

archive log filename=/u01/app/oracle/backup/archive1/1_5_802987583.dbf recid=7 stamp=803142536

archive log filename=/u01/app/oracle/backup/archive1/1_5_802987583.dbf recid=6 stamp=803142532

channel ch1: finished piece 1 at 27-DEC-12

piece handle=/u01/app/oracle/product/10.2.0/db_1/dbs/0bnttvm4_1_1 tag=TAG20121227T152243 comment=NONE

channel ch1: backup set complete, elapsed time: 00:00:10

channel ch1: deleting archive log(s)

archive log filename=/u01/app/oracle/backup/archive1/1_6_802987583.dbf recid=13 stamp=803143356

archive log filename=/u01/app/oracle/backup/archive1/1_6_802987583.dbf recid=10 stamp=803143355

archive log filename=/u01/app/oracle/backup/archive2/2_4_802987583.dbf recid=9 stamp=803142647

archive log filename=/u01/app/oracle/backup/archive2/2_4_802987583.dbf recid=8 stamp=803142644

channel ch0: starting compressed archive log backupset

channel ch0: specifying archive log(s) in backup set

input archive log thread=2 sequence=5 recid=12 stamp=803143356

channel ch0: starting piece 1 at 27-DEC-12

channel ch0: finished piece 1 at 27-DEC-12

piece handle=/u01/app/oracle/product/10.2.0/db_1/dbs/0cnttvmf_1_1 tag=TAG20121227T152243 comment=NONE

channel ch0: backup set complete, elapsed time: 00:00:01

channel ch0: deleting archive log(s)

archive log filename=/u01/app/oracle/backup/archive2/2_5_802987583.dbf recid=12 stamp=803143356

archive log filename=/u01/app/oracle/backup/archive2/2_5_802987583.dbf recid=11 stamp=803143355

Finished backup at 27-DEC-12

Starting backup at 27-DEC-12

channel ch0: starting compressed full datafile backupset

channel ch0: specifying datafile(s) in backupset

input datafile fno=00001 name=+RAC_DISK/racdb/datafile/system.256.802987477

input datafile fno=00004 name=+RAC_DISK/racdb/datafile/users.259.802987479

input datafile fno=00006 name=+RAC_DISK/racdb/datafile/undotbs2.265.802987827

channel ch0: starting piece 1 at 27-DEC-12

channel ch1: starting compressed full datafile backupset

channel ch1: specifying datafile(s) in backupset

input datafile fno=00003 name=+RAC_DISK/racdb/datafile/sysaux.257.802987477

input datafile fno=00005 name=+RAC_DISK/racdb/datafile/example.264.802987619

input datafile fno=00002 name=+RAC_DISK/racdb/datafile/undotbs1.258.802987479

channel ch1: starting piece 1 at 27-DEC-12

channel ch1: finished piece 1 at 27-DEC-12

piece handle=/u01/app/oracle/backup/racfull_blk_0enttvmk_1_14.rmn tag=TAG20121227T152259 comment=NONE

channel ch1: backup set complete, elapsed time: 00:00:48

channel ch1: starting compressed full datafile backupset

channel ch1: specifying datafile(s) in backupset

including current control file in backupset

channel ch1: starting piece 1 at 27-DEC-12

channel ch0: finished piece 1 at 27-DEC-12

piece handle=/u01/app/oracle/backup/racfull_blk_0dnttvmk_1_13.rmn tag=TAG20121227T152259 comment=NONE

channel ch0: backup set complete, elapsed time: 00:01:00

channel ch0: starting compressed full datafile backupset

channel ch0: specifying datafile(s) in backupset

including current SPFILE in backupset

channel ch0: starting piece 1 at 27-DEC-12

channel ch1: finished piece 1 at 27-DEC-12

piece handle=/u01/app/oracle/backup/racfull_blk_0fnttvo6_1_15.rmn tag=TAG20121227T152259 comment=NONE

channel ch1: backup set complete, elapsed time: 00:00:14

channel ch0: finished piece 1 at 27-DEC-12

piece handle=/u01/app/oracle/backup/racfull_blk_0gnttvoh_1_16.rmn tag=TAG20121227T152259 comment=NONE

channel ch0: backup set complete, elapsed time: 00:00:04

Finished backup at 27-DEC-12

Starting backup at 27-DEC-12

current log archived

channel ch0: starting compressed archive log backupset

channel ch0: specifying archive log(s) in backup set

input archive log thread=1 sequence=7 recid=14 stamp=803143452

channel ch0: starting piece 1 at 27-DEC-12

channel ch0: finished piece 1 at 27-DEC-12

piece handle=/u01/app/oracle/product/10.2.0/db_1/dbs/0hnttvot_1_1 tag=TAG20121227T152413 comment=NONE

channel ch0: backup set complete, elapsed time: 00:00:02

channel ch0: deleting archive log(s)

archive log filename=/u01/app/oracle/backup/archive1/1_7_802987583.dbf recid=14 stamp=803143452

channel ch0: starting compressed archive log backupset

channel ch0: specifying archive log(s) in backup set

input archive log thread=2 sequence=6 recid=15 stamp=803143452

channel ch0: starting piece 1 at 27-DEC-12

channel ch0: finished piece 1 at 27-DEC-12

piece handle=/u01/app/oracle/product/10.2.0/db_1/dbs/0inttvov_1_1 tag=TAG20121227T152413 comment=NONE

channel ch0: backup set complete, elapsed time: 00:00:02

channel ch0: deleting archive log(s)

archive log filename=/u01/app/oracle/backup/archive1/2_6_802987583.dbf recid=15 stamp=803143452

Finished backup at 27-DEC-12

released channel: ch0

released channel: ch1

RMAN>

1.3.4.另外一種rman備份指令碼

下面指令碼的好處是把歸檔和rman備份放到同一個目錄,在cp和異機恢復的時候方便處理

run{

allocate channel ch0 type disk connect 'sys/oracle@racdb1';

allocate channel ch1 type disk connect 'sys/oracle@racdb2';

backup as compressed backupset full database format '/u01/app/oracle/backup/racfull_blk_%u_%p_%s.rmn' include current controlfile

plus archivelog format '/u01/app/oracle/backup/arc_blk_%u_%p_%s.rmn' delete all input;

release channel ch0;

release channel ch1;

}

1.4. 準備單機環境

1.4.1. 解壓zip檔案

上傳安裝檔案壓縮包,並解壓

cd安裝目錄

unzip 10201_database_linux32.zip

1.4.2. Hosts File

修改/etc/host

127.0.0.1 localhost localhost.localdomain

192.168.1.198 racdb.localdomain racdb

1.4.3. 設定Kernel引數

參加下面引數到/etc/sysctl.conf檔案

kernel.shmall = 2097152

kernel.shmmax = 2147483648

kernel.shmmni = 4096

# semaphores: semmsl, semmns, semopm, semmni

kernel.sem = 250 32000 100 128

fs.file-max = 65536

net.ipv4.ip_local_port_range = 1024 65000

net.core.rmem_default=262144

net.core.rmem_max=262144

net.core.wmem_default=262144

net.core.wmem_max=262144

執行/sbin/sysctl -p使引數生效

1.4.4. 修改資源限制檔案

新增下面內容到資源限制檔案"/etc/security/limits.conf"

oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 1024

oracle hard nofile 65536

1.4.5. 修改安全限制

新增下面內容到安全限制檔案"/etc/pam.d/login"

session required pam_limits.so

1.4.6. 禁用linux安全模式

修改linux安全模式檔案"/etc/selinux/config"

SELINUX=disabled

1.4.7. 安裝rpm

因為這些安裝包存在依賴關係,所以需要嚴格按照下面的順序進行打補丁

rpm -Uvh compat-binutils215-2.15.92.0.2-24.i386.rpm

rpm -Uvh compat-libcwait-2.1-1.i386.rpm

rpm -Uvh compat-libstdc++-egcs-1.1.2-1.i386.rpm

rpm -Uvh openmotif21-debuginfo-2.1.30-11.EL5.i386.rpm

rpm -Uvh xorg-x11-libs-compat-6.8.2-1.EL.33.0.1.i386.rpm

rpm -Uvh oracleasm-support-2.1.2-1.el5.i386.rpm

rpm -Uvh oracleasm-2.6.18-53.el5-2.0.4-1.el5.i686.rpm

rpm -Uvh oracleasm-2.6.18-53.el5xen-2.0.4-1.el5.i686.rpm

rpm -Uvh kernel-debug-2.6.18-53.el5.i686.rpm

rpm -Uvh oracleasm-2.6.18-53.el5debug-2.0.4-1.el5.i686.rpm

rpm -Uvh kernel-PAE-2.6.18-53.el5.i686.rpm

rpm -Uvh oracleasm-2.6.18-53.el5PAE-2.0.4-1.el5.i686.rpm

rpm -Uvh libXp-1.0.0-8.1.el5.i386.rpm

rpm -Uvh openmotif21-2.1.30-11.EL5.i386.rpm

rpm -Uvh compat-oracle-el5-1.0-5.i386.rpm

rpm -Uvh oracleasmlib-2.0.3-1.el5.i386.rpm

1.4.8. 建立Oracle使用者和使用者組

groupadd oinstall

groupadd dba

useradd -g oinstall -G dba oracle

passwd oracle

1.4.9. 建立Oracle軟體安裝目錄

mkdir -p /u01/app/oracle

chown -R oracle.oinstall /u01

1.4.10. 編輯.bash_profile檔案

編輯Oracle使用者的環境變數

# Oracle Settings

TMP=/tmp; export TMP

TMPDIR=$TMP; export TMPDIR

ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE

ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME

ORACLE_SID=RACDB; export ORACLE_SID

ORACLE_TERM=xterm; export ORACLE_TERM

PATH=/usr/sbin:$PATH; export PATH

PATH=$ORACLE_HOME/bin:$PATH; export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH

CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

if [ $USER = "oracle" ]; then

if [ $SHELL = "/bin/ksh" ]; then

ulimit -p 16384

ulimit -n 65536

else

ulimit -u 16384 -n 65536

fi

fi

1.4.11. 安裝Oracle軟體

啟用vnc

su - oracle

vncserver

cd安裝目錄/database

./runInstaller -ignoreSysPreReqs

1.4.12. 建立相關目錄

cd $ORACLE_BASE

mkdir -p admin/RACDB/adump

mkdir -p admin/RACDB/bdump

mkdir -p admin/RACDB/cdump

mkdir -p admin/RACDB/udump

mkdir -p /u01/app/oracle/oradata/RACDB

建立存放歸檔及備份目錄

mkdir -p /u01/app/oracle/backup/archive1

mkdir -p /u01/app/oracle/backup/archive2

1.4.13.傳輸rman備份集到異機

使用scp把節點1rman備份歸檔傳輸到恢復機上,預設rman備份歸檔目錄$ORACLE_HOME/dbs

RACDB1@rac1 /u01/app/oracle/product/10.2.0/db_1/dbs$ scp 0anttvm4_1_1 0cnttvmf_1_1 0hnttvot_1_1 0inttvov_1_1 oracle@192.168.1.198:/u01/app/oracle/backup

oracle@192.168.1.198's password:

0anttvm4_1_1 100% 2317KB 2.3MB/s 00:01

0cnttvmf_1_1 100% 26KB 25.5KB/s 00:00

0hnttvot_1_1 100% 11KB 11.0KB/s 00:00

0inttvov_1_1 100% 3072 3.0KB/s 00:00

RACDB1@rac1 /u01/app/oracle/product/10.2.0/db_1/dbs$

使用scp把節點2rman備份歸檔傳輸到恢復機上,預設rman備份歸檔目錄$ORACLE_HOME/dbs

RACDB2@rac2 /u01/app/oracle/product/10.2.0/db_1/dbs$ scp 0bnttvm4_1_1 oracle@192.168.1.198:/u01/app/oracle/backup

oracle@192.168.1.198's password:

0bnttvm4_1_1 100% 2308KB 2.3MB/s 00:00

RACDB2@rac2 /u01/app/oracle/product/10.2.0/db_1/dbs$

使用scprac1rman備份集傳輸到恢復機上

RACDB1@rac1 /u01/app/oracle/backup$ cd /u01/app/oracle/backup/

RACDB1@rac1 /u01/app/oracle/backup$ ll

total 85748

drwxr-xr-x 2 oracle oinstall 4096 Dec 27 15:24 archive1/

drwxr-xr-x 2 oracle oinstall 4096 Dec 27 15:22 archive2/

-rw-r----- 1 oracle oinstall 87605248 Dec 27 15:24 racfull_blk_0dnttvmk_1_13.rmn

-rw-r----- 1 oracle oinstall 98304 Dec 27 15:24 racfull_blk_0gnttvoh_1_16.rmn

RACDB1@rac1 /u01/app/oracle/backup$ scp *.rmn oracle@192.168.1.198:/u01/app/oracle/backup

oracle@192.168.1.198's password:

racfull_blk_0dnttvmk_1_13.rmn 100% 84MB 20.9MB/s 00:04

racfull_blk_0gnttvoh_1_16.rmn 100% 96KB 96.0KB/s 00:00

RACDB1@rac1 /u01/app/oracle/backup$

使用scprac2rman備份集傳輸到恢復機上

RACDB2@rac2 /home/oracle$ cd /u01/app/oracle/backup

RACDB2@rac2 /u01/app/oracle/backup$ ll

total 32296

drwxr-xr-x 2 oracle oinstall 4096 Dec 27 15:24 archive1/

drwxr-xr-x 2 oracle oinstall 4096 Dec 27 15:22 archive2/

-rw-r----- 1 oracle oinstall 31907840 Dec 27 15:23 racfull_blk_0enttvmk_1_14.rmn

-rw-r----- 1 oracle oinstall 1114112 Dec 27 15:24 racfull_blk_0fnttvo6_1_15.rmn

RACDB2@rac2 /u01/app/oracle/backup$ scp *.rmn oracle@192.168.1.198:/u01/app/oracle/backup

oracle@192.168.1.198's password:

racfull_blk_0enttvmk_1_14.rmn 100% 30MB 30.4MB/s 00:01

racfull_blk_0fnttvo6_1_15.rmn 100% 1088KB 1.1MB/s 00:00

RACDB2@rac2 /u01/app/oracle/backup$

好到此準備工作完成,下面可以開始恢復

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24558279/viewspace-753832/,如需轉載,請註明出處,否則將追究法律責任。

相關文章