oracle 增量备份脚本
oracle 增量备份脚本
OS :RHEL AS 4 oracle 10g
0备份脚本
#!/bin/bash
# incremental level 0 backup script
source /home/oracle/.bash_profile
current_day=`date +%Y%m%d`
mkdir /home/oracle/RMANBACKUP/$current_day
rman target / <<EOF
run
{
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/home/oracle/RMANBACKUP/$current_day/PID-%F';
allocate channel dev1 type disk;
allocate channel dev2 type disk;
allocate channel dev3 type disk;
backup incremental level 0 tag='db0'
format '/home/oracle/RMANBACKUP/$current_day/%n_%T_%U' database;
sql 'alter system archive log current';
backup archivelog all format '/home/oracle/RMANBACKUP/$current_day/arc_%n_%T_%U' delete all input;
release channel dev1;
release channel dev2;
release channel dev3;
}
EOF
1级累积增量脚本
#!/bin/bash
# incremental level 1 backup script
source /home/oracle/.bash_profile
current_day=`date +%Y%m%d`
incr_day=incr$current_day
mkdir /home/oracle/RMANBACKUP/$incr_day
rman target / <<EOF
run
{
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/home/oracle/RMANBACKUP/$incr_day/PID-%F';
allocate channel dev1 type disk;
allocate channel dev2 type disk;
allocate channel dev3 type disk;
backup incremental level 1 cumulative tag='db1'
format '/home/oracle/RMANBACKUP/$incr_day/%n_%T_%U' database;
sql 'alter system archive log current';
backup archivelog all format '/home/oracle/RMANBACKUP/$incr_day/arc_%n_%T_%U' delete all input;
release channel dev1;
release channel dev2;
release channel dev3;
}
EOF
每天RMAN出来的backup set集合到一个文件夹下面
相关文档:
(Oracle)rownum用法详解
2008-08-06 15:41
对于rownum来说它是oracle系统顺序分配为从查询返回的行的编号,返回的第一行分配的是1,第二行是2,依此类推,这个伪字段可以用于限制查询返回的总行数,且rownum不能以任何表的名称作为前缀。
(1) rownum 对于等于某值的查询条件
如果希望找到学生表中第一条学生的信息,可 ......
oracle分页???
在mysql中只要limit x,y就可以分页成功,那oracle 中是怎么做的呢?
=================================================
方法一:
SELECT id,rown
from (SELECT id, ROWNUM rown
&nb ......
转载
DML statements on temporary tables do not generate redo logs for the data changes. However, undo logs for the data
and redo logs for the undo logs are generated. Data from the temporary table is automatically
dropped in the case of session termination, either when the user logs o ......