- 论坛徽章:
- 0
|
networker 安装在linxu as 4u4上,oracle 9.0.1.1.1安装在win2003 上,nsrnmo 4.2
备份的全备份脚本:
connect target bakuser/bakuser@ora9i
run {
sql 'alter session set nls_language=american';
sql 'alter system switch logfile';
allocate channel ch1 type 'sbt_tape';
allocate channel ch2 type 'sbt_tape';
send 'NSR_ENV=(NSR_SERVER=cls1,NSR_CLIENT=bakserver,NSR_DATA_VOLUME_POOL=dbpool)';
backup full filesperset 5 format 'ora9i_%p_%u_%s_$t'
(database include current controlfile);
release channel ch1;
release channel ch2;
allocate channel d1 type disk;
copy current controlfile to 'c:\controlfile\control.ctl';
release channel d1;
}
备份的增量备份脚本
connect target bakuser/bakuser@ora9i
run {
sql 'alter session set nls_language=american';
sql 'alter system switch logfile';
allocate channel ch1 type 'sbt_tape';
allocate channel ch2 type 'sbt_tape';
send 'NSR_ENV=(NSR_SERVER=cls1,NSR_CLIENT=bakserver,NSR_DATA_VOLUME_POOL=dbpool)';
backup incremental level=2 filesperset 5 format 'ora9i_%p_%u_%s_$t'
(database include current controlfile);
release channel ch1;
release channel ch2;
allocate channel d1 type disk;
copy current controlfile to 'c:\controlfile\control.ctl';
release channel d1;
}
过程:
1.停数据库,执行了一次冷备份;
2.启动数据在test1tablespace上创建表test1user.test1,然后插入几个值,然后执行增量备份(把备份的group的start time调到马上就到的北京时间,比如现在是11:00,调到11:02启动备份)
3.再在test1user.test1表上插入一些值据然后再增量备份;
4.把数据库停下来,删除所有的控制文件,归档文件,日志文件,数据文件;
5.然后把冷备份的数据文件拷贝回来,把备份的控制文件拷贝回来,并且改名为cotrol01.ctl,control02.ctl,control03.ctl;
6.连接数据库conn sys/sys@ora9i as sysdba;
7.startup mount ;
8.在客户端执行如下:
rman target sys/sys@ora9i nocatalog
run {
allocate channel t1 type sbt_tape;
allocate channel t2 type set_tape;
send 'nsr_env=(nsr_server=bakserver,nsr_client=cls1,nsr_data_volume_pool=dbpool)';
restore database;
release channel t1;
release channel t2;
}
9.回到sqlplusw,执行如下:
recover database using backup controlfile until cancel ;
SQL> recover database using backup controlfile until cancel;
ORA-00279: 更改 379548 (在 06/17/2008 11:04:28 生成) 对于线程 1 是必需的
ORA-00289: 建议: C:\ARCHIVE2ARC00018.001
ORA-00280: 更改 379548 对于线程 1 是按序列 # 18 进行的
指定日志: {<RET>=suggested | filename | AUTO | CANCEL}
是不是没有执行增量备份的恢复,只是恢复了全备份? |
|