实战RMAN备份传输表空间

一、检查平台是否支持
跳过(如有不明请详见第三节示例)

二、检查待传输表空间是否自包含
跳过(如有不明请详见第三节示例)

三、检查备份
跳过(如有不明请详见"一步一步学RMAN"系列) :
一步一步学RMAN之进入RMAN
一步一步学RMAN之实战RMAN备份

四、生成可传输集

E:/oracleScript/backup>set oracle_sid=jssweb
E:/oracleScript/backup>rman target /

连接到目标数据库: JSSWEB (DBID=3402005373)
RMAN> transport tablespace jssweb
2> tablespace destination 'd:/backup/td'
3> auxiliary destination 'd:/backup/ad'
4> ;
看,不需要太复杂,就是这么简单。

使用目标数据库控制文件替代恢复目录
RMAN-05026: 警告: 假定以下表空间集适用于指定的时间点

表空间列表要求具有 UNDO 段
表空间 SYSTEM
表空间 UNDOTBS1

使用 SID='gEDa' 创建自动实例

供自动实例使用的初始化参数:
db_name=JSSWEB
compatible=10.2.0.1.0
db_block_size=8192
db_files=200
db_unique_name=tspitr_JSSWEB_gEDa
large_pool_size=1M
shared_pool_size=110M
#No auxiliary parameter file used
db_create_file_dest=d:/backup/ad
control_files=d:/backup/ad/cntrl_tspitr_JSSWEB_gEDa.f

启动自动实例 JSSWEB ...
...
内存脚本的内容:
{
# set the until clause
set until scn 1672677;
# restore the controlfile
restore clone controlfile;
# mount the controlfile
sql clone 'alter database mount clone database';
# archive current online log for tspitr to a resent until time
sql 'alter system archive log current';
# avoid unnecessary autobackups for structural changes during TSPITR
sql 'begin dbms_backup_restore.AutoBackupFlag(FALSE); end;';
}
正在执行内存脚本

正在执行命令: SET until clause
..
...
sql 语句: begin dbms_backup_restore.AutoBackupFlag(FALSE); end;
释放的通道: ORA_AUX_DISK_1

内存脚本的内容:
{
# generated tablespace point-in-time recovery script
# set the until clause
set until scn 1672677;
# set an omf destination filename for restore
set newname for clone datafile 1 to new;
...
...
# make the controlfile point at the restored datafiles, then recover them
recover clone database tablespace "JSSWEB", "SYSTEM", "UNDOTBS1", "SYSAUX" delete archivelog;
alter clone database open resetlogs;
# PLUG HERE the creation of a temporary tablespace if export fails due to lack
# of temporary space.
# For example in Unix these two lines would do that:
#sql clone "create tablespace aux_tspitr_tmp
# datafile ''/tmp/aux_tspitr_tmp.dbf'' size 500K";
}
正在执行内存脚本

正在执行命令: SET until clause

正在执行命令: SET NEWNAME
...
...
介质恢复完成, 用时: 00:00:10
完成 recover 于 19-11月-07

数据库已打开

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值