-- PARA ACTIVAR FLASHBACK DATABASE
ALTER SYSTEM SET log_archive_dest_1="LOCATION=/vol1/.../instancia OPTIONAL REOPEN=300" SCOPE=SPFILE;
ALTER SYSTEM SET log_archive_format="archINSTANCIA_%t_%r_%s.arc" SCOPE=SPFILE;
ALTER SYSTEM SET DB_RECOVERY_FILE_DEST="/vol1/flash_recovery_area" SCOPE=SPFILE;
ALTER SYSTEM SET db_recovery_file_dest_size=50G SCOPE=SPFILE;
-- DEJAMOS 20 DIAS POSIBLES DE FLASHBACK PARA TIRAR HACIA ATRÁS
ALTER SYSTEM SET db_flashback_retention_target=28800 scope=spfile;
-- ACTIVACION DE MODO ARCHIVELOG Y FLASHBACK ON
STARTUP MOUNT EXCLUSIVE;
alter database archivelog;
ALTER DATABSE FLASHBACK ON;
-- EJEMPLO DE USO
shutdown immediate;
startup mount;
export ORACLE_SID=instancia
$ORACLE_HOME/bin/rman target /
run {
flashback database to scn 123456789;
}
No hay comentarios:
Publicar un comentario