- 最后登录
- 2017-2-9
- 在线时间
- 43 小时
- 威望
- 22
- 金钱
- 371
- 注册时间
- 2012-4-19
- 阅读权限
- 10
- 帖子
- 57
- 精华
- 1
- 积分
- 22
- UID
- 363
|
3#
发表于 2013-1-28 13:37:15
ylw6006 发表于 2013-1-28 10:34
请帖出rman备份脚本!
如果你使用backup as copy方式备份,就要在降低表空间使用率后对数据文件进行收缩才 ...
$ export ORACLE_SID=cc
$rman target /
Recovery Manager: Release 10.2.0.3.0 - P roduction on Thu Mar 20 08:54:49 2008
Copyright (c) 1982, 2005, Oracle. A ll r ights reserved.
connected to target database: CC (DBID=1861215560)
connected to recovery catalog database
RMAN>
RMAN> CONFIGURE RET ENTION POLICY TO REDUNDANCY 2;
RMAN> CONFIGURE DEFAULT DEVICE TYP E TO DISK;
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON;
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYP E DISK TO '/rmancc/cf_%F';
RMAN> CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYP E DISK TO 1;
RMAN> CONFIGURE CHANNEL DEVICE TYP E DISK FORMAT '/rmancc/%d_%s_%p_%t';
RMAN>
[ocsdb_2_1][/rmancc/shell]cat rmandb.sh
#! /bin/sh
export ORACLE_SID=cc
rman target / <<EOF
run {
allocate channel 'dev1' type disk;
backup incremental leve l 0 tag 'dbL0' format '/rmancc/%d_Incr0_%T_%s_%u'
database INCLUDE CURRENT CONTROLFILE s ;
sql 'alter system archive log current' ;
backup format '/rmancc/%d_log_%T_%U' archivelog a ll delete all input;
release channel 'dev1';
}
quit;
EOF |
|