You are on page 1of 16

RMAN BACKUP AND TABLESPACE

POINT IN TIME RECOVERY (TSPITR)
Oracle Database 11g Administration

2.TEST ENVIRONMENT OPERATING SYSTEM Red Hat Enterprise Linux Version 5  DATABASE Oracle Database 11g Release 2 (11.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)  We’re done.

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

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.

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

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

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

Target Database = DEVLDB  Check for archive log mode   Backup the full database  Just make sure archive gets written .

.  After Completion of recovery process thorugh RMAN.TS1 is now in offline status. Set time on to know the dropping time of TS1  Now it’s time to recover to the point 16:02:10 in time.

.  Tablespace has now recovered. Make tablespace online  Connect to U1 user and retrieve from test1 table from TS1 tablespace.

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

THANK YOU .