ORCL用于数据存储,SUN_BACK用于恢复目录
2.在目标库中建立表空间,用于存放数据
CREATE SMALLFILE TABLESPACE "FG_SUNPOS_SPACE"
DATAFILE 'E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\FG_SUNPOS.DAT'
SIZE 100M LOGGING EXTENT MANAGEMENT
LOCAL SEGMENT SPACE MANAGEMENT AUTO
3.使用恢复目录
CREATE SMALLFILE TABLESPACE "BACKUP_CATALOG"
DATAFILE 'E:\ORACLE\PRODUCT\10.2.0\ORADATA\SUN_BACK\sun_back.dat'
SIZE 100M LOGGING EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO
C:\>SET ORACLE_SID=SUNBACK
C:\>RMAN
恢复管理器: Release 10.2.0.1.0 - Production on 星期二 2月 10 22:28:35 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
RMAN> CONNECT TARGET /
连接到目标数据库: SUN_BACK (DBID=1824281102)
C:\>sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on 星期二 2月 10 22:30:19 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> create user rman identified by rman
2 temporary tablespace temp
3 default tablespace backup_catalog
4 quota unlimited on backup_catalog;
用户已创建。
SQL> grant recovery_catalog_owner to rman;
授权成功。
RMAN> connect catalog rman@SUN_BACK;
恢复目录数据库口令:
连接到恢复目录数据库
RMAN> create catalog tablespace backup_catalog;
恢复目录已创建
C:\>SET ORACLE_SID=ORCL
C:\>RMAN
恢复管理器: Release 10.2.0.1.0 - Production on 星期二 2月 10 22:43:11 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
RMAN> CONNECT TARGET /
连接到目标数据库: ORCL (DBID=1206252968)
RMAN> CONNECT CATALOG rman@SUN_BACK;
恢复目录数据库口令:
连接到恢复目录数据库
RMAN> resync catalog;
正在启动全部恢复目录的 resync
完成全部 resync