现在的位置: 首页 > 综合 > 正文

rman的配置,使用catalog

2013年01月18日 ⁄ 综合 ⁄ 共 1628字 ⁄ 字号 评论关闭

生产库名为:orcl
备份库各为:test

I:>set oracle_sid=test

I:>sqlplus "/as sysdba"

SQL*Plus: Release 10.2.0.1.0 - Production on 星期日 10月 14 14:28:13 2007

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

连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> archive log list
数据库日志模式            存档模式
自动存档             启用
存档终点            USE_DB_RECOVERY_FILE_DEST
最早的联机日志序列     3
下一个存档日志序列   5
当前日志序列           5

SQL> create tablespace rman datafile 'E:/ORACLE/PRODUCT/10.2.0/ORADATA/TEST/RMAN.DBF' size 100M extent management local;

表空间已创建。

SQL> create user rman identified by rman default tablespace rman temporary tablespace temp;

用户已创建。

SQL> grant connect,resource,recovery_catalog_owner to rman;

授权成功。

I:>set oracle_sid=test

I:>rman catalog rman/rman

恢复管理器: Release 10.2.0.1.0 - Production on 星期日 10月 14 14:40:18 2007

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

连接到恢复目录数据库

RMAN> create catalog tablespace rman  //在这边也不知道发生了什么错误
MAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: 分析输入命令时出错
RMAN-00558: 分析输入命令时出错
RMAN-01009: 语法错误: 找到 "rman": 应为: "double-quoted-string, identifier, single-quoted-string"中
的一个
RMAN-01007: 在第 1 行第 27 列, 文件: standard input
RMAN> create catalog

恢复目录已创建

RMAN>exit

Microsoft Windows XP [版本 5.1.2600]
(C) 版权所有 1985-2001 Microsoft Corp.

I:>set oracle_sid=test

I:>rman target system/hailang@orcl catalog rman/rman

恢复管理器: Release 10.2.0.1.0 - Production on 星期日 10月 14 15:10:04 2007

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

连接到目标数据库: ORCL (DBID=1162274038)
连接到恢复目录数据库

RMAN> register database;

注册在恢复目录中的数据库
正在启动全部恢复目录的 resync
完成全部 resync

RMAN>

抱歉!评论已关闭.