You are on page 1of 16

RMAN BACKUP AND TABLESPACE

POINT IN TIME RECOVERY (TSPITR)


Oracle Database 11g Administration

TEST ENVIRONMENT
OPERATING SYSTEM
Red Hat Enterprise Linux Version 5
DATABASE
Oracle Database 11g Release 2 (11.2.0.1)

DATABASE ADMINISTRATION
Startup and Shutdown Database
Create Primary Storage Structures
Design a Database
Manage Database
Backup & Recovery
Privileges Handling
Users Handling
Responsible in Every Aspects of a Database

BACKUP AND RECOVERY


First take backup (Cloning the present state of our
database)
In case of any type crash (Data loss)
Restore the last consistent backup (to back up the
backed up CRD files)
If DB is in archivelog mode then only recovery can
happen
Recover for lost data (getting back the transactions
from archive log files through restored database)
Were done.

BACKUP
Logical Backup
-- exp/expdp (utilities used to store DB data in
.dmp files for later retrieval)
Physical Backup
-- cp,cpio,etc
RMAN Backup
-- Its a utility provided by oracle. Very easy to
use. DBA friendly.

LOGICAL BACKUP
Database Level
Tablespace Level
User Level
Table/Partition Level
Query Level

PHYSICAL BACKUP
Cold Backup (DB is shutdown)
Hot Backup (DB up and running)

RMAN BACKUP
Database need to be backed up is called TARGET
DATABASE.
Minimum requirements for using RMAN
RMAN Client (Comes with Oracle installation)
Target Database
Database is UP Still we can perform backup and
recovery.

ADVANTAGES OF RMAN
Takes the backup of only used blocks.
Performance is faster.
Using CTWR background process ,it takes the true
incremental backup.
To validate the database, to recover the corrupted
blocks online.
Encrypt & Compress.
No more redo log generation as in hot backup.

RMAN TSPITR
New feature in 11gR2 version.
Dropped Tablespaces ,Truncated Tablespaces.
Now have the ability to recover it.
TSPITR can be repeated multiple times for the
same tablespace. Previously , once a tablespace
had been recovered to an earlier point-in-time, it
could not recovered to another earlier point-in-time.

HOW TO PERFORM
RMAN BACKUP AND TSPITR?
Scenario:
User U1s default tablespace is TS1.
U1 made the transactions.
Now at time t ; User make a mistake and either
truncate TS1 or dropped it permanently.
Now DBAs duty would be to restore the
database and to recover the data lost from
that point in time when tablespace was intact.

Target Database = DEVLDB


Check for archive log mode

Backup the full database

Just make sure archive gets written

Set time on to know the dropping time of TS1

Now its time to recover to the point 16:02:10 in


time.

After Completion of recovery process thorugh


RMAN.TS1 is now in offline status.

Make tablespace online

Connect to U1 user and retrieve from test1 table


from TS1 tablespace.

Tablespace has now recovered.

WHAT ACTUALLY HAPPENED?


RMAN made backup at certain location.
Restored from backed up pieces.
Recovery is actually done from archived redo logs
which had the historical transaction saved.
Logical recovery is now done.
If datafiles were lost too then it would have come
from the duplicate made by RMAN backup.
We dont need to do that exclusively,RMAN takes
care of it.

THANK YOU

You might also like