TYPES OF BACKUPS, HOW TO ENABLE ARCHIVELOG MODE, CONFIGURE FOR RECOVERABILITY

BACKUPS

THERE ARE 2 MAJOR TYPES OF BACKUPS;

– PHYSICAL bkp   — Recovery manager (RMAN)

– LOGICAL  bkp   — Datapump  imp/exp — 10g

impdp/expdp — 11g and higher

BACKUPS ARE FURTTHER SEPARATED INTO 2 SUBTYPES;

  1. HOT bkp — inconsistent backup because the DB is open to 3tier and 2tier users while backup is in progress
  2. COLD bkp — consistent backup because the DB is inaccessible to any user while the backup is running. Usually, the DB is MOUNTED for cold bkp

 

  1. FRA = /u06/oradata/FRA (This was my FRA)
  2. CONFIGURE FOR RECOVERABILITY (TELLING THE DB WHERE TO KEEP THE BACKUP)

BEFORE YOU BACKUP A DATABASE, YOU NEED TO CREATE THE FRA(FLASH RECOVERY AREA) WHICH WILL HOLD/KEEP THE BACKUP SIMILAR TO THE DUMPFILE DIRECTORY IN DATAPUMP

ALTER SYSTEM SET DB_RECOVERY_FILE_DEST= ‘/u06/oradata/FRA’ SCOPE=BOTH;

ALTER SYSTEM SET DB_RECOVERY_FILE_DEST_SIZE = 3G SCOPE=BOTH;

YOU HAVE THE BELOW OPTIONS;

– BOTH, SPFILE OR MEMORY

  1. IF YOU WANT TO DO A HOT BACKUP, YOUR DB MUST PLACE THE DB IN ARCHIVELOG MODE WHICH MEANS ACTIVATING THE ARCHIVER BACKGROUND PROCESS (Arch).

#steps to place DB in archivelog mode

SQL> select name from v$database;

SQL> show parameter recovery;

NAME                                 TYPE        VALUE

———————————— ———– ——————————

db_recovery_file_dest                string      /u06/kud01

db_recovery_file_dest_size           big integer 8182M

recovery_parallelism                 integer     0

SQL> archive log list; 

Database log mode              No Archive Mode

Automatic archival             Disabled

Archive destination            USE_DB_RECOVERY_FILE_DEST

Oldest online log sequence     102

Current log sequence           104

#This shows that database is not in archivelog mode

Shut down the database

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

Place database in the mount state

SQL> startup mount;

ORACLE instance started.

Total System Global Area 1169149952 bytes

Fixed Size                  2252624 bytes

Variable Size             704643248 bytes

Database Buffers          452984832 bytes

Redo Buffers                9269248 bytes

Database mounted.

Place database in archivelog mode as below

SQL> alter database archivelog;

Database altered.

Open the database

 

SQL> alter database open;

Database altered.

Confirm that database is now in archive log mode

SQL>  archive log list;

Database log mode              Archive Mode

Automatic archival             Enabled

Archive destination            USE_DB_RECOVERY_FILE_DEST

Oldest online log sequence     102

Next log sequence to archive   104

Current log sequence           104

Take a hot backup of the database

[69-64-69-66:oracle]$rman target /

Recovery Manager: Release 11.2.0.4.0 – Production on Tue Jun 13 08:06:30 2017

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

connected to target database: KUD01 (DBID=957181213)

RMAN> backup database;

Starting backup at 13-JUN-17

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=133 device type=DISK

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00002 name=/u03/oradata/kud01/sysaux01.dbf

input datafile file number=00001 name=/u02/oradata/kud01/system01.dbf

input datafile file number=00007 name=/u02/oradata/kud01/kofi_TS01.dbf

input datafile file number=00005 name=/u06/oradata/kud01/example01.dbf

input datafile file number=00003 name=/u04/oradata/kud01/undotbs01.dbf

input datafile file number=00004 name=/u05/oradata/kud01/users01.dbf

input datafile file number=00008 name=/u03/oradata/kud01/mmobit01.dbf

input datafile file number=00006 name=/u03/oradata/kud01/mktest01.dbf

channel ORA_DISK_1: starting piece 1 at 13-JUN-17

channel ORA_DISK_1: finished piece 1 at 13-JUN-17

piece handle=/u06/kud01/KUD01/backupset/2017_06_13/o1_mf_nnndf_TAG20170613T080724_dmzzxg05_.bkp tag=TAG20170613T080724 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:45

channel ORA_DISK_1: starting 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 13-JUN-17

channel ORA_DISK_1: finished piece 1 at 13-JUN-17

piece handle=/u06/kud01/KUD01/backupset/2017_06_13/o1_mf_ncsnf_TAG20170613T080724_dmzzyvjk_.bkp tag=TAG20170613T080724 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

Finished backup at 13-JUN-17

 

by Anthony Besong

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s