MERCADOS FINANCIEROS

lunes, 29 de octubre de 2012

BACKUPS CREAR DATAGUARD

BACKUP CONTROLFILE

export ORACLE_SID=
rman target / << EOF

run {
allocate channel disk1 device type disk
format '/backup/STBYcontrolfile.ctl';
backup current controlfile for standby;
}

BACKUP FULL BASE DE DATOS

SCRIPT



export ORACLE_SID=
rman target / << EOF

run {
allocate channel t1 type disk;
allocate channel t2 type disk;
allocate channel t3 type disk;
allocate channel t4 type disk;

backup as compressed backupset
format '/exportbd/backup/web8/full_web8_%u.bkp'
database include current controlfile;
}
exit

EOF




export ORACLE_SID=

rman target / log=/backup/backupfull.log <
BACKUP AS COMPRESSED BACKUPSET DATABASE format '/backup/instancia_db_%u.rman' PLUS ARCHIVELOG format '/backup/instancia_archive_%u.rman';

EOF


RESTORE


export ORACLE_SID=WEB8
rman target / <
restore database;

exit

EOF

No hay comentarios: