1. 创建catalog数据库:
在dbca中使用new database数据库进行创建,不使用现有模板,不需任何SQL附加产品选项。设置了较大的large pool。
2. 操作系统的设置:
创建操作系统用户rman,将其primary goup设为DBA。并对其.profile文件做如下修改:
ORACLE_SID=catalog
ORACLE_HOME=/oracle/app/oracle/product/9.2.0.1.0
ORACLE_BASE=/oracle/app/oracle
PATH=$PATH:/oracle/bin:$ORACLE_HOME/bin
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
#DISPLAY=local:0
DISPLAY=10.250.4.87:0.0
export ORACLE_SID ORACLE_HOME ORACLE_BASE PATH LD_LIBRARY_PATH DISPLAY
NLS_LANG=AMERICAN
NLS_DATE_FORMAT="MON DD YYYY HH24:MI:SS"
export NLS_LANG NLS_DATE_FORMAT
3. 在新创建的数据库上的操作:
1) 创建表空间ts_rman;
2) 创建用户rman,指定其缺省表空间为ts_rman;
3) 为用户授权:grant connect,resource,RECOVERY_CATALOG_OWNER to rman;
4. 在catalog数据库中创建恢复目录catalog:
$ rman catalog rman/rman
Recovery Manager: Release 9.2.0.1.0 - Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
connected to recovery catalog database
recovery catalog is not installed
RMAN> create catalog tablespace ts_rman;
recovery catalog created
RMAN> exit
Recovery Manager complete.
5. 在catalog中注册需要备份恢复的数据库(ora):
$ rman target sys/sys@ora
Recovery Manager: Release 9.2.0.1.0 - Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
connected to target database: ORA (DBID=1147939807)
RMAN> connect catalog rman/rman@catalog
connected to recovery catalog database
RMAN> register database;
database registered in recovery catalog
starting full resync of recovery catalog
full resync complete
RMAN> exit
Recovery Manager complete.
至此,RMAN的配置就完全结束了,可以对目标数据库进行利用RMAN的备份以及恢复了。
6. 进行RMAN的测试:
$ rman target sys/sys@ora
Recovery Manager: Release 9.2.0.1.0 - Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
connected to target database: ORA (DBID=1147939807)
RMAN> connect catalog rman/rman@catalog
connected to recovery catalog database
RMAN> run {
allocate channel c1 type disk;
backup current controlfile;
}
allocated channel: c1
channel c1: sid=15 devtype=DISK
Starting backup at 25-JUN-04
channel c1: starting full datafile backupset
channel c1: specifying datafile(s) in backupset
including current controlfile in backupset
channel c1: starting piece 1 at 25-JUN-04
channel c1: finished piece 1 at 25-JUN-04
piece handle=/oracle/app/oracle/product/9.2.0.1.0/dbs/01fp7orm_1_1 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:01
Finished backup at 25-JUN-04
released channel: c1
RMAN> list backup;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
21 Full 1M DISK 00:00:00 25-JUN-04
BP Key: 22 Status: AVAILABLE Tag: TAG20040625T184158
Piece Name: /oracle/app/oracle/product/9.2.0.1.0/dbs/01fp7orm_1_1
Controlfile Included: Ckp SCN: 623816 Ckp time: 25-JUN-04
RMAN>
测试成功,可以进行进一步的rman的备份恢复了。
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/241379/viewspace-564949/ ,如需转载,请注明出处,否则将追究法律责任。