Backup is the most important. Many test environments are built on windows, and there is one on the master's computer. to ensure its security, it is decided to perform regular backup. The example shows how to use scripts + windows scheduled tasks in windows to periodically execute full backup. Backup script C: rman_backuprman_bk.bat file content: rman
Backup is the most important. Many test environments are built on windows, and there is one on the master's computer. to ensure its security, it is decided to perform regular backup. The example shows how to use scripts + windows scheduled tasks in windows to periodically execute full backup. Backup script C: \ rman_backup \ rman_bk.bat file content: rman
Backup is the most important. Many test environments are built on windows, and there is one on the master's computer. to ensure its security, it is decided to perform regular backup.
The example shows how to use scripts + windows scheduled tasks in windows to periodically execute full backup.
Backup script
C: \ rman_backup \ rman_bk.bat file content:
Rman target sys/xiaojun @ startrek prepare file 'C:/rman_backup/rman_bk_script.txt 'log' c:/rman_backup/% DATE :~ 0, 4% % DATE :~ 5, 2% % DATE :~ 8, 2% ". Log'
C: \ rman_backup \ rman_bk_script.txt file content (you can modify it as needed)
RUN {
Delete noprompt obsolete;
Allocate channel c1 type disk;
Backup database format 'C:/rman_backup/db _ % U' plus archivelog delete all input format 'C:/rman_backup/arch _ % U ';
Release channel c1;
}
Exit
Run rman_bk.bat to output:
C:\Users\fengjun>rman target sys/xiaojun@startrek cmdfile 'c:/rman_backup/rman_bk_script.txt' log 'c:/rman_backup/20140121".log'RMAN> 2> 3> 4> 5> 6> 7>C:\Users\fengjun>C:\Users\fengjun>
The following files are generated in the corresponding C: \ rman_backup directory:
Set windows scheduled task
Run the command in cmd.
Taskschd. msc
Go to the task scheduling page in windows.
Create basic task
Enter the Task Name
Select Period
Select the cycle Start Time
Select Start Program for Operation Type
Set script location
Then you can run the test directly.
If you need to reprint it, please indicate the source:
Blog.csdn.net/renfengjun or
Www. orcl. cc