一套ORACLE11G DG环境打补丁
############## apply patch前备份工作 ###############
lsnrctl stop
sqlplus / as sysdba;
shutdown immediate;
startup;
run{
allocate channel c1 device type disk;
allocate channel c2 device type disk;
backup AS COMPRESSED BACKUPSET format 'E:\rmanback\gzxnh_full_%T_%d_%s_%p_%u.dbf' database plus archivelog;
sql "ALTER SYSTEM switch logfile";
sql "ALTER SYSTEM switch logfile";
sql "ALTER SYSTEM switch logfile";
backup current controlfile format 'E:\rmanback\controlfile_%T_%U_%t.crl';
release channel c1;
release channel c2;
}
############### apply patth前备库复制工作检查 ############
主库:
lsnrctl stop
sqlplus / as sysdba;
shutdown immediate;
startup;
create table test0407(id number(4));