MERCADOS FINANCIEROS

jueves, 20 de febrero de 2020

BACKUP NOARCHIVELOG

Backing Up in NOARCHIVELOG Mode: Example

This script puts the database into the correct mode for a consistent, whole database backup and then backs up the database. The script performs a shutdown, startup, shutdown, and then startup again before creating multiple copies of the backup:
# Shut down database cleanly with immediate option. This type of shutdown lets  
# current calls to the database complete, but prevents further logons or calls. 
# If the database is not up, you receive a message saying so but RMAN will not 
# treat this situation as an error.
SHUTDOWN IMMEDIATE; 
  
# Start up the database in case it suffered instance failure or was 
# closed with SHUTDOWN ABORT before starting this script. 
# The script performs instance recovery if 
# needed. Oracle uses the default init.ora file. Alternatively, use this form:
# STARTUP FORCE DBA pfile=filename. 
# Use the DBA option because you are going to shut down again
# and do not want to let users in during the short interval. Use the FORCE 
# option because it cannot hurt and might help in certain situations. 
STARTUP FORCE DBA; 
SHUTDOWN IMMEDIATE; 
  
# The database is cleanly closed and ready for a consistent backup. RMAN
# requires that the database be started and mounted to perform a backup.
RMAN> STARTUP MOUNT;

# this example uses automatic channels to make the backup
BACKUP 
  COPIES 2 
  INCREMENTAL LEVEL 0 
  MAXSETSIZE 10M 
  DATABASE 
  INCLUDE CURRENT CONTROLFILE
  TAG 'BACKUP_1'
;

# Now that the backup is complete, open the database. 
ALTER DATABASE OPEN; 

No hay comentarios: