一、环境说明:
1、catalog数据库
sid:catalog
username:rman
password:rman
2、备份数据库
sid:orcl
二、操作步骤
1、在catalog数据库上创建用户
oracle@oracle[/home/oracle]> export ORACLE_SID=catalog
oracle@oracle[/home/oracle]> sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Fri Mar 27 06:10:11 2009
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, OLAP and Data Mining options
sys@CATALOG> create user rman identified by rman;
User created.
sys@CATALOG> alter user rman quota unlimited on users;
User altered.
sys@CATALOG> grant recovery_catalog_owner to rman;
Grant succeeded.
sys@CATALOG> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
2、编辑tnsnames.ora,增加catalog的tns
oracle@oracle[/home/oracle]> cd $ORACLE_HOME/network/admin
oracle@oracle[/oracle/app/10g/network/admin]> ls
samples shrept.lst sqlnet.ora tnsnames.ora
oracle@oracle[/oracle/app/10g/network/admin]> vi tnsnames.ora
catalog =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
)
(SID = catalog)
)
)
orcl =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
)
(SID = orcl)
)
)
oracle@oracle[/oracle/app/10g/network/admin]> tnsping catalog
TNS Ping Utility for Linux: Version 10.2.0.1.0 - Production on 27-MAR-2009 06:12:00
Copyright (c) 1997, 2005, Oracle. All rights reserved.
Used parameter files:
/oracle/app/10g/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))) (CONNECT_DATA = (SID = catalog)))
OK (10 msec)
3、创建catalog,并注册数据库
oracle@oracle[/oracle/app/10g/network/admin]> export ORACLE_SID=orcl
oracle@oracle[/oracle/app/10g/network/admin]> rman target / catalog rman/rman@catalog
Recovery Manager: Release 10.2.0.1.0 - Production on Fri Mar 27 06:12:35 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: ORCL (DBID=1210313093)
connected to recovery catalog database
RMAN> create catalog tablespace users;
recovery catalog created
RMAN> register database;
database registered in recovery catalog
starting full resync of recovery catalog
full resync complete
RMAN> exit
Recovery Manager complete.
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/22049049/viewspace-1023818/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/22049049/viewspace-1023818/