例:RMAN備份每日的orawin數據庫: sql
1,新建backup.cmd: 數據庫
set
oracle_sid
=
orawin
rman target
/
nocatalog cmdfile
=
F:Scriptorawinbackupfull.sql
log
=
F:Scriptorawinbackupfull.
log
append
2,在上一步驟指定的路徑下新建backupfull.sql: oracle
run {
set
command id
to
'
rman
'
;
allocate channel dev1 type
disk
;
backup
format
'
F:rmanbakorawindf%s_%p_%t
'
database
include
current
controlfile;sql
'
alter system archive log current
'
;
sql
'
alter system archive log current
'
;
delete noprompt obsolete; app
backup
filesperset 20
format 'F:rmanbakorawinLogar%s_%p_%t'
(archivelog until time '(SYSDATE-1)' all delete input); spa
delete noprompt obsolete;release channel dev1;
} orm
3,打開控制面板,新增每日計劃,設定好時間,便可。 ip