1.1. 检查rac运行状态
rac1,rac2的root用户执行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. 启动rac1到mount状态
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
此时数据库状态online,rac1的状态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把节点1的rman备份归档传输到恢复机上,默认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把节点2的rman备份归档传输到恢复机上,默认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$
使用scp把rac1的rman备份集传输到恢复机上
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$
使用scp把rac2的rman备份集传输到恢复机上
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/12457158/viewspace-752935/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/12457158/viewspace-752935/