tdau

When to put Oracle DB in backup mode and when not to for snapshot?

Blog Post created by tdau Employee on Jun 4, 2013

If you want to roll forward an Oracle DB from a snapshot using future archives, then you need to put the database in backup mode before taking a snapshot.  If you want to use the Oracle DB from a snapshot as is, then you don't need to to put the database in backup mode.

 

Sample PL/SQL script to put the DB in backup mode before taking a snapshot:

su - oracle << EOF

sqlplus "/as sysdba" <<END

whenever sqlerror exit1

alter system archive log current;

alter database begin backup;

END

EOF

 

Sample PL/SQL script to take the DB out of backup mode after taking a snapshot:

su - oracle << EOF

sqlplus "/as sysdba" <<END

whenever sqlerror exit1

alter database end backup;

alter system archive log current;

END

EOF

Outcomes