环境:
生产库:
OS:Solaris 10
DB:Oracle 10g
备份库:
OS:Windows
DB:Oracle 10g
RMAN备份配置过程:
建议将数据库启动到归档模式下:
SQL>shutdown immediate
SQL>startup mount
SQL>alter database archivelog;
SQL>alter database open;
SQL>archive log list;
恢复目录的配置
创建恢复目录表空间:
SQL> create tablespace ts_rman
2 datafile 'C:/oracle/product/10.2.0/oradata/rman/rman01.dbf' size 2000m
3 extent management local;
Tablespace created.
创建恢复目录User:
SQL> create user rman
2 profile default
3 identified by rman
4 default tablespace ts_rman
5 temporary tablespace temp
6 account unlock;
User created.
用户授权:
SQL> grant connect,resource,recovery_catalog_owner to rman;
Grant succeeded.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Pr
oduction
With the Partitioning, OLAP and Data Mining options
为恢复目录创建对象:
D:/>rman catalog rman/rman
Recovery Manager: Release 10.2.0.1.0 - Production on Wed Jan 31 11:17:34 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to recovery catalog database
RMAN> create catalog tablespace “ts_rman”;//在这边表空间可能要使用双引号,可能跟环境有关系吧
recovery catalog created
RMAN>exit
注册目标数据库:
D:/>rman catalog rman/rman target system/system@oradb
Recovery Manager: Release 10.2.0.1.0 - Production on Wed Jan 31 11:31:05 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: ORADB (DBID=2366502499)
connected to recovery catalog database
RMAN> register database;
database registered in recovery catalog
starting full resync of recovery catalog
full resync complete
RMAN>exit
说明:
被备份的库的用户需要是具有sysdba权限(select * from v$pwfile_users;),可以通过给用户授权来达到目的地(grant sysdba to dname;).