Chinaunix首页 | 论坛 | 博客
  • 博客访问: 642099
  • 博文数量: 244
  • 博客积分: 9445
  • 博客等级: 中将
  • 技术积分: 2572
  • 用 户 组: 普通用户
  • 注册时间: 2006-04-11 16:39
个人简介

简单点,再简单点

文章分类

全部博文(244)

文章存档

2020年(2)

2019年(1)

2018年(2)

2014年(2)

2013年(4)

2012年(13)

2011年(24)

2010年(12)

2009年(34)

2008年(61)

2007年(51)

2006年(38)

我的朋友

分类: Oracle

2008-12-08 15:14:15

4. 启动RMAN
RMAN为交互式命令行处理界面,也可以从企业管理器中运行。
为了使用下面的实例,先检查环境符合:
  the target database is called "his" and has the same TNS alias
  user rman has been granted "recovery_catalog_owner "privileges
  目标数据库的连接用户为internal帐号,或者以其他SYSDBA类型帐号连接  
  the recovery catalog database is called "rman" and has the same TNS alias
  the schema containing the recovery catalog is "rman" (same password)
在使用RMAN前,设置NLS_DATE_FORMAT 和NLS_LANG环境变量,很多RMAN LIST命令的输出结果是与日期时间相关的,这点在用户希望执行以时间为基准的恢复工作也很重要。
下例是环境变量的示范:
NLS_LANG=SIMPLIFIED CHINESE_CHINA.ZHS16GBK
NLS_DATE_FORMAT=DD-MON-YYYY HH24:MI:SS
为了保证RMAN使用时能连接恢复目录,恢复目录数据库必须打开,目标数据库至少要STARTED(unmount),否则RMAN会返回一个错误,目标数据库必须置于归档模式下。
1.  使用不带恢复目录的 RMAN
    设置目标数据库的  ORACLE_SID  ,执行:$ rman nocatalog RMAN> connect target RMAN> connect target user/pwd>@db
    2.  使用带恢复目录的RMAN
    $ rman catalogrman/rman RMAN> connecttarget    //连接本地数据库作为目标数据库RMAN> connecttarget user/pwd>@db //连接远程数据库或$ rman catalogrman/rman
targetuser/pwd>@db
阅读(897) | 评论(0) | 转发(0) |
0

上一篇:rman备份(1)

下一篇:rman备份(3)非归档

给主人留下些什么吧!~~