首先在catalog库,创建一个用户和一个表空间,并赋予connect,resource,recovery_catalog_owner角色给新建用户。
SQL> create tablespace rmants datafile '/ora10g/oradata/rmants01.dbf' size 200M;
Tablespace created.
SQL> create user rman identified by rman default tablespace rmants;
User created.
SQL> grant connect,resource to rman;
Grant succeeded.
SQL> grant recovery_catalog_owner to rman;
Grant succeeded.
SQL> alter user rman quota unlimited on rmants;
User altered.
SQL> select * from dba_sys_privs a where a.grantee='RMAN';
GRANTEE PRIVILEGE ADM
------------------------------ ---------------------------------------- ---
RMAN UNLIMITED TABLESPACE NO
其次,在需要配置备份的机器上配置客户端连接,连接catalog库,连接信息如下
CATALOG =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.24.22.150)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = S3P)
(INSTANCE_NAME = ora10g)
)
)
对该连接进行测试[oracle@oracle admin]$ tnsping catalog
TNS Ping Utility for Linux: Version 11.2.0.3.0 - Production on 10-MAY-2013 15:03:20
Copyright (c) 1997, 2011, Oracle. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.24.22.150)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = S3P) (INSTANCE_NAME = ora10g)))
OK (0 msec)
[oracle@oracle admin]$
最后,在需要备份的数据库使用rman进行注册
[oracle@oracle admin]$ rman target / catalog rman/rman@catalog #该命令连接到了catalog库
Recovery Manager: Release 11.2.0.3.0 - Production on Fri May 10 15:04:32 2013
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: RESTART (DBID=648727412)
connected to recovery catalog database
RMAN> create catalog tablespace rmants;
recovery catalog created
RMAN> register database; #注册该数据库
database registered in recovery catalog
starting full resync of recovery catalog
full resync complete
RMAN>
后续就可以进行正常的数据库备份了,其备份信息将保存在catalog库了。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/11590946/viewspace-1068516/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/11590946/viewspace-1068516/