One. Task Scheduler
Windows-Control Panel-Administrative Tools-Schedule task programs, right-click Task Scheduler Library, create task
Second: The contents of the relevant script:
Content in 2.1 Back_rman.bat:
Set Oracle_sid=fsf:\oracle\product\10.2.0\db_1\bin\rman target/ cmdfile=h:\worksql\windows_backupscript\ BACKUP.RCV log=h:\worksql\windows_backupscript\backup_%date:~0,4%-%date:~5,2%-%date:~8,2%-%time:~0,2%-%time:~ 3,2%.log
Content in 2.2 BACKUP.RCV:
Run {Allocate channel D1 type disk;allocate channel D2 type Disk;allocate channel D3 type Disk;backup as compressed backup Set database format ' H:\fsarch\full_%U '; SQL ' alter system archive log current '; Backup as compressed backupset archivelog a ll delete input format ' H:\fsarch\arc_%U '; release channel D1;release channel D2;release channel D3;} Crosscheck backup;delete noprompt expired backup;delete noprompt obsolete;
2.3 The full name of the log file generated:
Backup_2014-07-28-21-42.log
It means log at the start of the backup on July 28, 2014 21:42.
Small episode:
windows2008 the time format of the date command feedback under Win 7 is not the same as windows2003.
Some of the articles are modified in the time format in the Control Panel , but for DB server, our guideline is not to change. So we have the above named method of log file