EDUCBA

EDUCBA

MENUMENU
  • Free Tutorials
  • Free Courses
  • Certification Courses
  • 360+ Courses All in One Bundle
  • Login

Oracle Backup Database

By Priya PedamkarPriya Pedamkar

Home » Data Science » Data Science Tutorials » Oracle Tutorial » Oracle Backup Database

Oracle Backup Database

Introduction to Oracle Backup Database

Oracle Backup Database, as the name suggests, can be defined as a database which is a copy of the original database which is required when we need to restore the original data in case of data loss due to natural disasters (earthquakes tsunami, floods, fire), manmade accidents (sudden deletion or format of the entire database or even terrorist activities like bomb blast and sabotage activities like virus attack, hardware theft) which provides us a safe and reliable and secure environment for the data of any business organizations or even personal data.

How to Create Backup Database in Oracle?

Let us now discuss about how we can create the backup in Oracle in this section and also understand the concept of Full Backup and Partial Backup. When we say, Full Backup or whole database backup means that it is the backup of every data file present in the current database, including the control file. It is the most common or most used backup. Next is partial backup is, as the name suggests, not a full backup. It is generally taken when the database is open or the database is shut down. It is also called an operating system backup. There are two types of backup methods in the case of the Oracle database. Let us look at them one by one.

Start Your Free Data Science Course

Hadoop, Data Science, Statistics & others

Methods of Oracle Backup Database

Below are the two types of methods to create the Oracle Backup Database as follows:

Methods of Oracle Backup Database

1. Oracle Recovery Manager

Oracle Recovery Manager is a utility that is already present with the Oracle database. Since it is already present, there is no need to download and install it externally. So, now the question comes what is RMAN (Recovery Manager)? The answer to that question is it that it is a client-server application that uses the database server sessions to manage the backup and recovery of the database. The metadata about its operations is stored in a control file in the target database. Let us now look into the reasons why we should be using the Recovery manger.

  • It makes the backups scalable and flexible.
  • It manages the complexity of backup operations, so the stress and activity of the customer or user are reduced.
  • The backups are not proportional to the size of the database, but they are proportional to the size of the transactions.
  • The last important one is that it reduces the chances of human error.

One important requirement for RMAN is that it can be used for Oracle database version 8.0 and greater.

Example:

In the case of the Recovery manager, we will try to get the backup of a target database. To fulfill the task we need to see the environment. The two important topics are the RMAN executable which is the executable file, and the other important one is the target database. The target database is the database that the recovery manager is taking the backup of. Let us now start RMAN and execute it through this example.

First, we connect to the target database using the connect target command, and this will start the RMAN. The third prompt asks for the password because we have not specified DBA, so we need to give the password.

Popular Course in this category
Sale
Oracle Training (14 Courses, 8+ Projects)14 Online Courses | 8 Hands-on Projects | 120+ Hours | Verifiable Certificate of Completion | Lifetime Access
4.5 (8,949 ratings)
Course Price

View Course

Related Courses
Oracle DBA Database Management System Training (2 Courses)All in One Financial Analyst Bundle - 250+ Courses, 40+ Projects

%rman
RMAN> CONNECT TARGET SYS@Nil
target database password: password
connected to target database NIL
RMAN> EXIT

The EXIT command helps us to quit the RMAN client.

2. User-Managed Backup and Recovery

The alternative to the Recovery Manager is the strategy of User managed backup and recovery. In this strategy, we do not use the Oracle Recovery Manager. It is a very simple strategy that involves periodic backups of data files by the user, and archived logs with OS commands. This strategy of backup can be either logical or physical. We can use export utility to make backups of logical objects like tables, views, stored procedures and stored functions. We can use Operating System utilities to create physical backups.

In general, the preferred approach is RMAN for backup, which we discussed in the previous section, but there are certain areas in which we can also use user-managed backup in place of RMAN. Some of the situations where we can use this strategy are mentioned below.

  • We are having an older version of the database, and we want to migrate into the latest version, but we do not want to migrate the legacy backup scripts.
  • RMAN only supports backup for versions starting from 8.0, and above but for lower versions, we can use User managed backup.
  • In case of some issue, all the RMAN backups are lost, and then we have to use this method forcibly.

Example:

Let us now take a look at an example that involves the whole database. In this example, we will create a backup of the whole database. Let us look at the process of creating a backup.

  • We need to shut down the database with NORMAL, IMMEDIATE, or TRANSACTIONAL options.
  • To create a physical backup, we will use an operating system utility that will create backups of all data files and control files. The control files will be specified by the parameter CONTROL_FILESpresent in the initialization parameter file.
  • The important question now is how we find these files which were mentioned. We can find these files by doing a search for *.ora in the oracle home directory and its subdirectories.
  • In this example, we will take the backup of the data files, control files of the database to the address /backup/backup_version1 as shown below.

% cp $ORACLE_HOME/oradata/target/*.dbf /backup/backup_version1
% cp $ORACLE_HOME/oradata/target/arch/* /backup/backup_version1 /arch

  • In the end, we can restart the database using the STARTUP command in SQL Plus.

Conclusion

In this article, we discussed the definition of the backup and the reasons we need to have the backup. Later on, we discussed in detail the two backup strategies that we use and also discussed an example along with the steps for each strategy.

Recommended Articles

This is a guide to Oracle Backup Database. Here we discuss the Introduction of the Oracle Backup Database and its different methods, along with the practical examples. You can also go through our suggested articles to learn more –

  1. Introduction to Oracle Aliases 
  2. How Does Left Join Works in Oracle?
  3. What Are Oracle Database | Applications
  4. To 10 Oracle Database Interview Questions

Oracle Training (14 Courses, 8+ Projects)

14 Online Courses

8 Hands-on Projects

120+ Hours

Verifiable Certificate of Completion

Lifetime Access

Learn More

0 Shares
Share
Tweet
Share
Primary Sidebar
Oracle Tutorial
  • Advanced
    • Timestamp to Date in Oracle
    • Oracle Describe Table
    • Oracle Clauses
    • Oracle Having Clause
    • Oracle FOREIGN Key
    • PIVOT in Oracle
    • Oracle Alter Table
    • Oracle Queries
    • Oracle Views
    • Oracle Window Functions
    • Oracle String Functions
    • Oracle Date Functions
    • Oracle Analytic Functions
    • Oracle Aggregate Functions
    • Select in Oracle
    • INSERT in Oracle
    • DISTINCT in Oracle
    • Function in Oracle
    • Oracle GROUP_CONCAT
    • Oracle INSTR()
    • Oracle CONVERT
    • Oracle LENGTH()
    • Oracle EXISTS
    • Oracle REPLACE()
    • Oracle MERGE
    • Oracle LEAD()
    • Oracle EXTRACT()
    • Oracle LISTAGG()
    • Oracle SYS_CONTEXT()
    • Oracle COALESCE
    • Oracle NVL()
    • Oracle SYSDATE()
    • Oracle?Date Format
    • Oracle SYS_GUID()
    • Oracle WILDCARDS
    • Oracle Synonyms
    • Oracle Subquery
    • BETWEEN in Oracle
    • FETCH in Oracle
    • Oracle Index
    • Oracle Function-based Index
    • Oracle UNIQUE Index
    • Oracle Bitmap Index
    • Oracle Column
    • Oracle Triggers
    • Oracle Procedures
    • Sample Database for Oracle
    • Oracle LIKE Operator
    • ORDER BY in Oracle
    • Oracle ORDER BY DESC
    • GROUP BY in Oracle
    • Oracle GROUP BY HAVING
    • Oracle Aliases
    • Table in Oracle
    • Oracle Temporary Table
    • Oracle? Table Partition
    • Oracle rename table
    • Oracle CTE
    • Cursor in Oracle
    • Oracle LOCK TABLE
    • Oracle Tablespace
    • Oracle CARDINALITY
    • Oracle REGEXP
    • Oracle REGEXP_REPLACE
    • Oracle to_date
    • JSON in Oracle
    • Oracle COMMIT
    • Oracle GRANT
    • Oracle MD5
    • Oracle ROLLBACK
    • Oracle Users
    • Oracle TIMESTAMP
    • IF THEN ELSE in Oracle
    • Oracle While Loop
    • Oracle Clone Database
    • Oracle Backup Database
    • Oracle? XML
    • Oracle XMLAGG
    • Oracle XMLTABLE
    • Oracle Performance Tuning
    • Oracle B Tree Index
    • Oracle fusion
    • Oracle ebs
    • Oracle GRC
    • Oracle Cloud
    • Oracle HCM Cloud
    • Oracle Integration Cloud
    • Oracle Jinitiator
    • Oracle pathfinder
    • Oracle VirtualBox
    • Oracle Weblogic Server
    • Oracle decode
    • Oracle Exadata
    • Oracle ZFS
    • Oracle? utilities
    • JDBC Driver for Oracle
    • Oracle? DBA Versions
    • Oracle DBA Salary
  • Basic
    • Oracle Marketing Cloud
    • What is Oracle?
    • Career in Oracle
    • How to Install Oracle
    • Oracle Versions
    • What Is Oracle Database
    • Oracle Data Warehousing
    • Oracle Warehouse Builder
    • Career In Oracle Database Administrator
    • Career In Oracle DBA
    • What is Oracle RAC
    • Oracle DBA
    • Oracle? Vanderbilt
    • What is RMAN Oracle
    • Oracle Database Administration
    • Oracle Operators
    • Oracle Constraints
    • Oracle number
    • Oracle Data Types
    • Oracle UNIQUE Constraint
    • Oracle Check Constraint
  • Joins
    • Joins in Oracle
    • Inner Join in Oracle
    • Oracle Cross Join
    • Left Join in Oracle
    • OUTER Join in Oracle
    • Oracle Full Outer Join
    • Natural Join in Oracle
    • Oracle Self Join
    • Oracle hash join
    • Oracle? Update with Join
  • Oracle SET Operators
    • UNION in Oracle
    • Oracle UNION ALL
    • INTERSECT in Oracle
    • MINUS in Oracle
  • Interview Questions
    • Oracle Interview Questions
    • Oracle Apps Interview Questions
    • Oracle Apps Technical Interview Questions
    • Oracle Database Interview Questions
    • Oracle Forms Interview Questions
    • Oracle PL/SQL Interview Questions
    • Oracle RAC Interview Questions
    • Oracle SOA Interview Questions

Related Courses

Oracle Course Training

Oracle DBA Certification Course

MongoDB Certification Training

Footer
About Us
  • Blog
  • Who is EDUCBA?
  • Sign Up
  • Live Classes
  • Corporate Training
  • Certificate from Top Institutions
  • Contact Us
  • Verifiable Certificate
  • Reviews
  • Terms and Conditions
  • Privacy Policy
  •  
Apps
  • iPhone & iPad
  • Android
Resources
  • Free Courses
  • Database Management
  • Machine Learning
  • All Tutorials
Certification Courses
  • All Courses
  • Data Science Course - All in One Bundle
  • Machine Learning Course
  • Hadoop Certification Training
  • Cloud Computing Training Course
  • R Programming Course
  • AWS Training Course
  • SAS Training Course

© 2022 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA
Free Data Science Course

Hadoop, Data Science, Statistics & others

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA
Free Data Science Course

Hadoop, Data Science, Statistics & others

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

Let’s Get Started

By signing up, you agree to our Terms of Use and Privacy Policy.

Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more

EDUCBA Login

Forgot Password?

By signing up, you agree to our Terms of Use and Privacy Policy.

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

Special Offer - Oracle Training (14 Courses, 8+ Projects) Learn More