rman高级管理之创建恢复目录示例
2013-08-06 17:50
369 查看
rman高级管理之创建恢复目录示例:
(1)作为system用户使用sql*plus连接到目录数据库
C:\Documents and Settings\Administrator>sqlplus
system/oracle@ORCL
SQL*Plus: Release 11.2.0.1.0 Production on 星期二 8月 6 17:33:16 2013
Copyright (c) 1982, 2010, Oracle. All rights reserved.
连接到:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
(2)使用如下命令在目录数据库中创建表空间
SQL> create tablespace rman datafile 'd:\data\rman01.dbf' size 20m;
表空间已创建。
(3)使用新的表空间作为默认表空间来创建一个保存目录的模式:
SQL> create user rman identified by rman default tablespace rman;
(4)为新模式授予权限
SQL> grant recovery_catalog_owner to rman;
授权成功。
SQL> alter user rman quota unlimited on rman;
用户已更改。
(5)在操作系统提示符中,启动RMAN可执行文件并作为新用户连接到目录数据库:
C:\Documents and Settings\Administrator>rman catalog
rman/rman@ORCL
恢复管理器: Release 11.2.0.1.0 - Production on 星期二 8月 6 17:42:06 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
连接到恢复目录数据库
(6)创建目录
RMAN> create catalog;
(7)退出RMAN,然后从操作系统提示符中同时连接到目录和目标数据库:
C:\Documents and Settings\Administrator>rman catalog
rman/rman@ORCL target /
恢复管理器: Release 11.2.0.1.0 - Production on 星期二 8月 6 17:44:29 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
连接到目标数据库: ORCL (DBID=1324535298)
连接到恢复目录数据库
(8)注册目标数据库并查看是否已创建任何RMAN备份:
RMAN> register database;
RMAN> list backup of database;
(9)退出RMAN,并使用sql*plus来查询一些视图以便确认已注册了目标数据库并且已执行了备份:
C:\Documents and Settings\Administrator>sqlplus
rman/rman@ORCL
SQL*Plus: Release 11.2.0.1.0 Production on 星期二 8月 6 17:47:24 2013
Copyright (c) 1982, 2010, Oracle. All rights reserved.
连接到:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select dbid,name from rc_database;
DBID NAME
---------- --------
1324535298 ORCL
SQL> select db_id,bs_key,backup_type from rc_backup_set;
DB_ID BS_KEY B
---------- ---------- -
1324535298 154 D
1324535298 155 D
1324535298 156 D
1324535298 157 D
1324535298 158 D
1324535298 159 D
1324535298 160 D
1324535298 161 D
1324535298 162 D
1324535298 163 D
已选择10行。
(1)作为system用户使用sql*plus连接到目录数据库
C:\Documents and Settings\Administrator>sqlplus
system/oracle@ORCL
SQL*Plus: Release 11.2.0.1.0 Production on 星期二 8月 6 17:33:16 2013
Copyright (c) 1982, 2010, Oracle. All rights reserved.
连接到:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
(2)使用如下命令在目录数据库中创建表空间
SQL> create tablespace rman datafile 'd:\data\rman01.dbf' size 20m;
表空间已创建。
(3)使用新的表空间作为默认表空间来创建一个保存目录的模式:
SQL> create user rman identified by rman default tablespace rman;
(4)为新模式授予权限
SQL> grant recovery_catalog_owner to rman;
授权成功。
SQL> alter user rman quota unlimited on rman;
用户已更改。
(5)在操作系统提示符中,启动RMAN可执行文件并作为新用户连接到目录数据库:
C:\Documents and Settings\Administrator>rman catalog
rman/rman@ORCL
恢复管理器: Release 11.2.0.1.0 - Production on 星期二 8月 6 17:42:06 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
连接到恢复目录数据库
(6)创建目录
RMAN> create catalog;
(7)退出RMAN,然后从操作系统提示符中同时连接到目录和目标数据库:
C:\Documents and Settings\Administrator>rman catalog
rman/rman@ORCL target /
恢复管理器: Release 11.2.0.1.0 - Production on 星期二 8月 6 17:44:29 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
连接到目标数据库: ORCL (DBID=1324535298)
连接到恢复目录数据库
(8)注册目标数据库并查看是否已创建任何RMAN备份:
RMAN> register database;
RMAN> list backup of database;
(9)退出RMAN,并使用sql*plus来查询一些视图以便确认已注册了目标数据库并且已执行了备份:
C:\Documents and Settings\Administrator>sqlplus
rman/rman@ORCL
SQL*Plus: Release 11.2.0.1.0 Production on 星期二 8月 6 17:47:24 2013
Copyright (c) 1982, 2010, Oracle. All rights reserved.
连接到:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select dbid,name from rc_database;
DBID NAME
---------- --------
1324535298 ORCL
SQL> select db_id,bs_key,backup_type from rc_backup_set;
DB_ID BS_KEY B
---------- ---------- -
1324535298 154 D
1324535298 155 D
1324535298 156 D
1324535298 157 D
1324535298 158 D
1324535298 159 D
1324535298 160 D
1324535298 161 D
1324535298 162 D
1324535298 163 D
已选择10行。
相关文章推荐
- 高级RMAN功能之创建并连接到恢复目录
- RMAN 创建恢复目录
- 高级rman功能之恢复目录的重要性
- 在恢复管理器(RMAN)创建恢复目录测试(解决报错'对表空间 XX无权限'和'名称已由现有对象使用')
- RMAN 恢复目录管理
- RMAN恢复目录的创建和维护
- Rman使用前的准备工作,创建恢复目录所需要使用的表空间,在目录数据库创建rman用户,在目录数据库建立恢复目录
- 高级rman功能之恢复目录简介
- 创建RMAN恢复目录_OCP学习笔记(2)
- rman之创建恢复目录笔记
- RMAN 系列(六) ---- RMAN 高级恢复
- Oracle中RMAN恢复目录性能问题研究
- Oracle 恢复管理器 (RMAN)
- 通过Rman catalog 创建及管理Oracle数据库备份
- RMAN 备份异机恢复 并创建新DBID
- php循环创建目录示例分享(php创建多级目录)
- Oracle DB 创建恢复目录
- 第14章 结构和其他数据形式 14.1 示例问题:创建图书目录
- RMAN 备份异机恢复 并创建新DBID
- Linux cp 命令的15个示例 - 创建文件和目录的副本