Você está na página 1de 14

RMAN BACKUP AND CLONING

JNVS SAIKUMAR
DIVYANSHU SHEKHAR
RAJESH BANDI
PUTHALAPATTU VIKRAM

© 2019 Cognizant
© 2019 Cognizant
RMAN Clone - Duplicate and manual restore method
1. Check the status of the database.
2. Take the backup of Archive and database
using RMAN.
3. Take backup current controlfile.
4. After take backup of spfile.
5. Create p file for clone database and copy it to
the clone server.
6. Start Auxiliary instance on clone server and
restore the database.
7. Open the database in resetlogs.
8. Test the clone database.

2 © 2019 Cognizant
RMAN - Point in time recovery, SCN recovery

© 2019 Cognizant
RMAN configuration setups, catalog database and its concepts

© 2019 Cognizant
RMAN configuration steps:
Step # 1: Connect to Target database(Target DB: The database on which Backup &
Recovery to be performed) as sysdba.
Step # 2: Ensure the database has been configured with ARCHIVELOG mode or not?
Step # 3: If the database has been configured with ARCHIVELOG mode then skip the
Step number 3 to 6, If not then Shutdown the database.
Step # 4: Startup the database in mount state.
Step # 5: Configure database in ARCHIVELOG mode.
Step # 6: Alter database to open state.
Step # 7: Ensure ARCHIVELOG destination.
Step # 8: Ensure the flash/fast recovery area location.
Step # 9: Connect to RMAN prompt with target database.
Step # 10: Configure RMAN with controlfile auto-backup feature that will be auto-backup
controlfile in case of major changes done in database.
© 2019 Cognizant
Step # 11: To enable backup optimization run the following command, by default
backup optimization has been configured OFF.
Step # 12: Configure retention policy for backup.
Step # 13: Connect to the recovery catalog database(RMAN Repository) & Create
a tablespace to store RMAN catalog database objects.
Step # 14: Create a RMAN user, assign RMAN tablespace to RMAN user as a
default & grant recovery catalog owner,connect & resource privileges to RMAN
user.
Step # 16: create catalog by issuing the following command in RMAN prompt.
Step # 17: After creating catalog, Ensure RMAN repository tables by logging into
repository database as RMAN user. This is only for the first time.
Step # 18: Register database with recovery catalog.

© 2019 Cognizant
Multiplexing of redolog

© 2019 Cognizant
Multiplexing of Control files

© 2019 Cognizant
Troubleshooting Issues related to Control files and Redo files
1.Control files
Checking for Missing or Extra Files
Handling Errors During CREATE CONTROLFILE
2. Redo files:
Normally the REDO log switches take place every 10-15 minutes. That means about 4 to 6 redo log files will be
created in one hour. Sometimes it can create 1 or more redo log files within one minute due to heavy database activity
or a large database transaction.
1.Stop the database, delete the redo logs in ArchiveLogs directory, then restart the database.

2.Fix the scheduled delete ArchiveLog job

3.Find what heavy database transaction that may cause redo log file accumulation, and take action

4.Resize the redo log files to make them larger to reduce the number of log switches

5.Destroy, create and reload a recent database save that was saved prior to redo log accumulation.

© 2019 Cognizant
Export/Import
Export (exp) and import (imp) utilities are used to perform
logical database backup and recovery.

In logical backup, you don't take the copies of any physical


things,you only data extract from the data files into dump
files.(ex : using export )

A database dump using expdp is a 1-time export of one or more


database schemas. It backs up DDL (table structures, views, Table objects are imported as they are read from
synonyms, stored procedures, packages, etc), plus data. the export file. The export file contains objects in
the following order:
The Import utility reads the object definitions and table data 1) Type definitions
from an Export dump file. It inserts the data objects into an 2)Table definitions
3)Table data
Oracle database. 4)Table indexes
5)Integrity constraints, views, procedures, and
triggers
6)Bitmap, functional, and domain indexes

© 2019 Cognizant
Database Cloning Using Cold Backup
1.Take backup of controlfile as trace:[SOURCE DB] and Note down the locations of data
files:[SOURCE DB]

2.Shutdown the database : [SOURCE DB]

3.Copy the data files and temp files to the target database server and Prepare the init file for the target db
: [TARGET DB]

4. Starting the TargetDB in nomount stage and Recreate the control file in TargetDB.

5. Here we have use SET DATABASE, Because we are cloning the database in target with a new db
name and run the create control file statement.

6.Open the database in resetlog mode.

7.Add the temp files.

© 2019 Cognizant
CREATION OF TABLESPACE
To Create tablespace
create tablespace tablespace_name datafile ‘---------path---------.dbf’ size
For adding datafiles
Alter tablespace tablespace_name add datafile ‘---------path---------.dbf’ size
Extending datafile and auto enable auto extend
Alter tablespace tablespace_name add datafile ‘---------path---------.dbf’ size
AutoExtend ON
next 512k
maxsize 200m

© 2019 Cognizant
Adding and dropping log groups and log members
To view log groups and members
select group#,member from v$logfile;
To check the status of the logfiles
select status from v$log;
To drop the logfile group
alter database drop logfile group 1 ‘-----path----’
alter database drop logfile member ‘-----path---’
To add the logfile group
alter database add logfile group 1 ‘-----group path----’,’-----member path—’

© 2019 Cognizant
© 2019 Cognizant

Você também pode gostar