Starting RMAN 启动RMAN

RMAN为交互式命令行处理界面,也可以从企业管理其中运行.为使用下面的实例,先检查环境:

☆ the target database is called "xxg" and has the other TNS alias name "xxg".

☆ user rman has been granted "recovery_catalog_owner" privileges.

☆ 目标数据库的连接用户为internal帐号,或者以其他SYSDBA类型帐号连接.

☆ the recovery catalog database is called "ora9i" and has the other TNS alias name "target".

☆ 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返回错误,目标数据库必须置于归档模式下.

[@more@]

1.使用不带恢复目录的RMAN:

设置目标数据库的oracle_sid,执行:

%rman nocatalog

RMAN>connect target

RMAN>connect target internal/@xxg

2.使用带目录的RMAN

%rman rman_ts rman/rman@target

RMAN>connect target

%rman rman_ts rman/rman@target target internal/@xxg

3.使用RMAN

连接到目标数据库,可通过交互界面或者事先存储的脚本执行指定RMAN命令,示例:

RMAN>resync catalog;

使用脚本的实例:

RMAN>execute script alloc_1_disk;

创建或者替代存储的脚本:

RMAN>replace script alloc_1_disk {

2>allocate channel d1 type disk;

3>}

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/20546452/viewspace-783576/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/20546452/viewspace-783576/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值