oracle sql and dba tutorial logo

Tutorial for Oracle SQL

Oracle DBA Interview Questions

Most asked Oracle DBA Interview Questions.

60 Technical Questions
42 Backup & Recovery Questions

Unix For Oracle DBA 20 Questions



Oracle DBA Topics

Overview of Oracle Grid Architecture

Difference between cluster and grid

Responsibilities of DBA's

Creating Oracle Database

Creating Database using SQL

Creating DB in 12c using DBCA

Creating DB in 12c using SQL commands

Managing Oracle 12c Container Databases

Creating Users in Oracle 12c

Managing Pluggable Databases in Oracle 12c

Creating Pluggable Database

Cloning Pluggable Database

Unplug and Plug databases in CDB's

Managing Tablespaces and Datafiles

Extending tablespaces

Decreasing size of a tablespace

Coalescing Tablespaces

Taking tablespaces Offline or Online

Making a Tablespace Read only

Renaming Tablespaces

Dropping Tablespaces

Viewing Info about Tablespaces

Renaming Datafiles

Relocating Datafiles

Relocating Datafiles in Multiple Tablespaces

Temporary Tablespace

Changing the size

Tablespace Groups

Creating a Temp. Tablespace Group

Assigning a Tablespace Group

Diagnosing and Repairing LMT

Scenario 1: Fixing Bitmap

Scenario 2: Dropping a Corrupted Segment

Scenario 3: Fixing Bitmap when Overlapped

Scenario 4: Correcting Corruption of Blocks

Scenario 5: Migrating from a Dictionary-Managed to LMT

Transporting Tablespaces

Procedure for transporting tablespaces

Transporting Tablespace Example

Managing REDO LOGFILES

Adding New Redo Logfile Group

Adding Members to group

Dropping Members from group

Dropping Logfile Group

Resizing Logfiles

Renaming or Relocating Logfiles

Clearing REDO LOGFILES

Viewing Info About Logfiles

Managing Control Files

Multiplexing Control File

Changing the Name of a Database

Creating A New Control File

Cloning an Oracle Database

UNDO TABLESPACE

Switching to Automatic Management

Calculate Undo Retention

Altering UNDO Tablespace

Dropping an Undo Tablespace

Switching Undo Tablespaces

Viewing Information

SQL Loader

CASE STUDY (From MS-ACCESS to Oracle)

From Fixed Length file

From MySQL to Oracle

Using WHEN condition

Conventional and Direct Path Load

Direct Path

Restrictions on Using Direct Path Loads

Export and Import

Invoking Export and Import

Parameters of Export tool

Exporting Full Database

Exporting Schemas

Exporting Tables

Exporting Consistent Image of tables

Using Import Utility

Example Importing Tables

Import from One User to another User

Using Pattern Matching

Migrating a Database across platforms

DATA PUMP Utility

Data Pump Export

Exporting a Full Database

Exporting a Schema

Exporting Individual Tables

Filtering Objects during Export

Filter Rows during Export

Suspending and Resuming Export

Data Pump Import Utility

Importing Full Dump File

Importing Objects between Schemas

Loading Objects between Tablespaces

Generating SQL File of DDL commands

Import objects of a Schema

Importing Only Particular Tables

Interactive Mode

Flash Back Features

Flashback Query

Flashback Version Query

Flashback Table to Past States

Purging Objects from Recycle Bin

Flashback Objects With Same Name

Flashback instead of PIT Recovery

Enabling Flash Back Database

Sizing flash recovery area

How far we can flashback database

Example:Flashing Back Database

Flashback Data Archive (FDA)
(Oracle Total Recall)

Introduction

Creating FDA tablespace

Creating FDA

Querying historical data

Log Miner

LogMiner Configuration

LogMiner Dictionary Options

Using the Online Catalog

Extracting Dictionary to Log Files

Extracting Dictionary to File

Redo Log File Options

Example: Finding All Modifications

Mining Logfiles in a Time Range

BACKUP AND RECOVERY

Opening DB in Archivelog Mode

Reverting back to NoArchiveLog mode

Taking Offline (COLD) Backups

Taking Online (HOT) Backups

Recovering from the Loss of a Datafile

When in Noarchivelog Mode

When in Archivelog Mode

Recovering from loss of Control File

Recovery Manager ( RMAN )

Offline Backups using RMAN

Recover DB when in NOARCHIVELOG

Online Backups using RMAN

Backup tablespaces or datafiles

Image Backups in RMAN

Incremental Backup using RMAN

Updating backup copy for fast recovery

View info about RMAN backups

Configuring Retention policy

Configure Options in RMAN

Maintaining RMAN Repository

Recover datafiles (Archivelog mode)

Recover datafiles by renaming

Performing Disaster Recovery

 

 

 

 

 

 

 

 

 

Taking Incremental Backups using RMAN

Since taking Full backups consumes lots of space and also takes much time, many dba's resorts to incremental backup. The advantage of incremental backups compare to Full backup is that it takes less time and also consumes less space.

The main idea of incremental backups is that not all tables are changed daily. So why take full backup daily it's sufficient to just take backup of changes rather than whole database.

An Incremental Backup copies only those blocks changed since last incremental or full backup. The incremental backup takes less time and occupies less space then a normal full database backup.

The incremental backups in RMAN is much robust than incremental Export of database using Oracle Export tool. The incremental export of database copies all the tables changed since last complete export. So even if one row in a big table containing millions of rows is changed then the whole table is considered as changed and export tool will export the whole table while taking incremental export.

Whereas if you are taking an incremental backup using RMAN then if one row is changed in a big table then RMAN will copy only the changed block containing the changed row instead of copying the whole table blocks.

So the RMAN incremental backups are much more efficient and also takes less time and occupies less space then incremental export of database

The increment backup in RMAN is done if you specify a LEVEL <n> option, where n can by either 0 or 1

A LEVEL 0 incremental backup means complete backup just like Full backup
A LEVEL 1 incremental backup copies all blocks changed since last LEVEL 0 or LEVEL 1 backup.

A LEVEL 1 COMULATIVE backup copies all blocks changed since last LEVEL 0 backup.

In incremental backup strategy you will first need to take complete backup i.e. LEVEL 0 backup

oracle incremental backups

In the above picture, we are taking complete backup on Monday and then on each other day of the week we are taking incremental backup. If we lose the database on Friday in the first week, the database have to recovered first from complete backup taken on first Monday and then we have to apply the incremental backups taken on Tue, Wed and Thursday.

Similarly if the database is lost on Wednesday in the second week, we have to recover database first from Monday in the second week and then we have to apply incremental backups on Tuesday.

 

Let's take complete Backup LEVEL 0 backup

Type the following command at RMAN prompt

RMAN> backup incremental level 0 database;

backup incremental complete backup

The above backup can now be considered as base backup or parent backup.

Next day we can take incremental level 1 backup which will copy only the changes made since last backup

To make incremental level 1 backup give the following command

RMAN> backup incremental level 1 database;

incremental level1 backup rman

Similarly you can also take cumulative backup by typing the following command

RMAN> backup incremental level 1 cumulative database;

oracle incremental cumulative backup

You can also take incremental backup of particular tablespaces.

To take incremental backup of users tablespaces we can give the following command

RMAN> backup incremental level 1 tablespace users;

backup incremental tablespace

 

 

 


HomeContact Us

Data Loader

Data Loader is a simple yet powerful tool to
export and import Data between many common database formats


Forms Data Loader

Tool to load data into Oracle E-Business Suite R12 / Oracle Apps using Macros and Forms Record and Playback

Interface Computers Academy © 2007-2017 All Rights Reserved