which command would you use to back up your NOARCHIVELOG mode database using RMAN with compression?

A shoot-out has erupted between your MS development teams using .NET and your Linux
development teams using Java. Knowing that your database is in danger, which command would
you use to back up your NOARCHIVELOG mode database using RMAN with compression?

A shoot-out has erupted between your MS development teams using .NET and your Linux
development teams using Java. Knowing that your database is in danger, which command would
you use to back up your NOARCHIVELOG mode database using RMAN with compression?

A.
backup database all

B.
backup compressed database

C.
backup as compressed backupset database;

D.
backup as compressed backup database plus archivelog all;

E.
backup as compressed backupset database plus compress archivelog all;



Leave a Reply 4

Your email address will not be published. Required fields are marked *


EncinoM

EncinoM

Proof that A not C is correct:

SQL> archive log list
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 8
Current log sequence 10

SQL> !
[oracle@node2 ~]$ rman target /

Recovery Manager: Release 11.2.0.4.0 – Production on Sun Feb 23 11:45:09 2014

Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.

connected to target database: TEST0221 (DBID=3883475966)

RMAN> backup as compressed backupset database;

Starting backup at 23-FEB-14
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=33 device type=DISK
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 02/23/2014 11:46:01
ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode
continuing other job steps, job failed will not be re-run
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 23-FEB-14
channel ORA_DISK_1: finished piece 1 at 23-FEB-14
piece handle=/u01/app/oracle/fast_recovery_area/TEST0221/backupset/2014_02_23/o1_mf_ncsnf_TAG20140223T114559_9jlvqv10_.bkp tag=TAG20140223T114559 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:04
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================

RMAN-03009: failure of backup command on ORA_DISK_1 channel at 02/23/2014 11:46:01
ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode

RMAN>

EncinoM

EncinoM

Also, http://docs.oracle.com/cd/B28359_01/backup.111/b28270/rcmbckba.htm#BRADV89526

“Backing Up a Database in NOARCHIVELOG Mode

The only legal backup of a NOARCHIVELOG database is a closed, consistent backup. This script puts the database into the correct mode for a consistent, whole database backup and then backs up the database. The script assumes that control file autobackup is enabled for the database.

Example 8-8 Backing Up a Database in NOARCHIVELOG Mode

SHUTDOWN IMMEDIATE;
# Start up the database in case it suffered instance failure or was
# closed with SHUTDOWN ABORT before starting this script.
STARTUP FORCE DBA;
SHUTDOWN IMMEDIATE;
STARTUP MOUNT;
# this example uses automatic channels to make the backup
BACKUP
INCREMENTAL LEVEL 0
MAXSETSIZE 10M
DATABASE
TAG ‘BACKUP_1’;
# Now that the backup is complete, open the database.
ALTER DATABASE OPEN;

You can skip tablespaces, such as read-only tablespaces, but any skipped tablespace that has not been offline or read-only since its last backup is lost if the database has to be restored from a backup.”

dbr

dbr

Correct answer is C while backing up the database mounted or closed!

SQL> alter database noarchivelog;

Database altered.

RMAN> backup as compressed backupset database;

Starting backup at 24-JUL-15
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=35 instance=RAC_1 device type=DISK
file 5 is excluded from whole database backup
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=+DATA/rac/datafile/system.270.878316851
channel ORA_DISK_1: starting piece 1 at 24-JUL-15
channel ORA_DISK_1: finished piece 1 at 24-JUL-15

…..

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:08
Finished backup at 24-JUL-15

eamon

eamon

@EncinoM, sorry your argument does nto convince me, afterall where does it say that we don’t shutdown first?

I say the correct answer is C, see example from @dbr above.