关闭

ORACLE11G R2创建回复目录

300人阅读 评论(0) 收藏 举报
分类:

环境为AIX+ORACLE11G R2 RAC

1.用SYSDBA权限连接到数据库,并在RMAN表空间中创建RMAN账号和回复目录:

 

[oracle@sfc3rc1:/]$sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Wed Jul 8 16:24:34 2015

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

 

SQL> create tablespace rman;

Tablespace created.

SQL>  select file_name,tablespace_name from  dba_data_files;

FILE_NAME                                                                                                                                                                                                                                                                                                     TABLESPACE_NAME
--------------------------------------------------------------------------------------------------------                      --------------------------------------------------------------------------------------------------------                      ------------------------------------------------- ------------------------------
+DATA/askey/datafile/users.259.865164449                                                                                                                                                                                                                                                                      USERS
+DATA/askey/datafile/undotbs1.258.865164449                                                                                                                                                                                                                                                                   UNDOTBS1
+DATA/askey/datafile/sysaux.257.865164447                                                                                                                                                                                                                                                                     SYSAUX
+DATA/askey/datafile/system.256.865164447                                                                                                                                                                                                                                                                     SYSTEM
+DATA/askey/datafile/undotbs2.261.865164771                                                                                                                                                                                                                                                                   UNDOTBS2
+DATA/askey/datafile/mynew_tablespace.263.884530011                                                                                                                                                                                                                                                           MYNEW_TABLESPACE
+DATA/askey/datafile/rman.264.884537743                                                                                                                                                                                                                                                                       RMAN

7 rows selected.

SQL> grant recovery_catalog_owner to rman identified by oracle;

 

SQL> alter user rman default tablespace rman
  2  quota unlimited on rman;

 

 

2.在数据库中存在一个RMAN用户账号,因此启动RMAN,连接到目录,并使用create catalog命令来初始化存储库:

 

[oracle@sfc3rc1:/]$rman catalog rman/oracle@ASKEY

Recovery Manager: Release 11.2.0.4.0 - Production on Wed Jul 8 17:06:07 2015

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to recovery catalog database

RMAN> create catalog

error creating db
ORACLE error from recovery catalog database: ORA-00955: name is already used by an existing object

ORACLE error from recovery catalog database: ORA-00942: table or view does not exist

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-06433: error installing recovery catalog

这里创建catalog的时候出现上面的报错,catalog已经被创建过,清除后重新创建。

 

RMAN> drop catalog

recovery catalog dropped

 

RMAN> create catalog

recovery catalog created

 

3.对于每一个使用RMAN执行备份和回复的数据库,必须在RMAN存储库中对它们进行注册。该操作记录诸如目标数据库模式和数据库的唯一ID(DBID)等信息。只需注册目标数据库一次,随后连接到目标数据库的RMAN会话将自动引用存储库中的正确的元数据。

 

[oracle@sfc3rc1:/]$rman target / catalog rman@ASKEY

Recovery Manager: Release 11.2.0.4.0 - Production on Thu Jul 9 09:32:07 2015

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: ASKEY (DBID=3715509859)
recovery catalog database Password:
connected to recovery catalog database

RMAN> register database;

database registered in recovery catalog
starting full resync of recovery catalog
full resync complete

 

 

 


 

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:5754次
    • 积分:141
    • 等级:
    • 排名:千里之外
    • 原创:7篇
    • 转载:6篇
    • 译文:0篇
    • 评论:0条
    文章存档