Oracle Rman Cold Shell script (I am here full backup, created 2 channels C1, C2) can be changed on this basis
650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M00/86/18/wKioL1e0fHyRO_TTAABgkcV8Mm0539.png-wh_500x0-wm_3 -wmp_4-s_2228178479.png "title=" capture. PNG "alt=" Wkiol1e0fhyro_ttaabgkcv8mm0539.png-wh_50 "/>
Text:
#!/bin/bash
#Author: Wangergui email:[email protected] date:2016-08-17
#Function: Oracle_rman_cold_backup (full backup)
["${user}" = = "Oracle"] | | Exit 2
[!-D ${oracle_base}/myrman] && mkdir ${oracle_base}/myrman
Rman Target/<<end
Shutdown immediate;
Startup Mount;
run{
Shutdown immediate;
startup Mount;
Allocate channel C1 type disk;
Allocate channel C2 type disk; #通道只能在run块儿中定义, cannot be defined separately, so use the run block!
Backup database format ' ${oracle_base}/myrman/%d_%s.bak ';
ALTER DATABASE open;
Release channel C1;
Release channel C2;
}
END
This article from the "Linux-related technology" blog, declined to reprint!
Oracle Rman Cold Shell Script