SlideShare ist ein Scribd-Unternehmen logo
1 von 3
Downloaden Sie, um offline zu lesen
PREPARED BY RAVI KUMAR LANKE Page 1
Oracle RMAN
One (if not the, most important) jobs of the Oracle DBA is to ensure that the databases in
their care are protected. Databases, or data in the database, can be lost through a variety of
ways including:
* User error
* Hardware failure
* Software failure
* Disasters
* Application errors
To protect your database, you will need to know how to back it up and you will need to
know how to recover your database. Backup and recovery is what this last chapter is all
about. Backup and recovery can be a very difficult and complex topic, for there are a
number of different options for you to choose from when it comes to backing up a
database. In this chapter, we aim to set you on the right course, showing you how to
perform basic database backup and recovery operations.
In this chapter we will use the Oracle RMAN tool. It comes with the Oracle RDBMS and
it’s free. In this chapter we will cover:
* Backing up your database with RMAN
* Restoring your database with RMAN
So, without further delay, let’s get started on getting your database backed up.
Backup Your Database with RMAN
Database backups with RMAN are actually quite easy. Your database can be in one of two
modes, ARCHIVELOG or NOARCHIVELOG mode. The mode your database is in
determines what kinds of backups you can perform on your database. In this section we
will cover the following topics:
Starting RMAN
The RMAN client is started from the operating system prompt. To use RMAN, simply set
the Oracle environment as you would before you use any other Oracle client (like
SQL*Plus). Once the environment is set, then you start RMAN as seen in this example:
PREPARED BY RAVI KUMAR LANKE Page 2
rman target=/
Once you have started RMAN you will find yourself at the RMAN prompt. We are then
ready to begin our database backup.
Perform an Offline (Cold) Backup of your Database with RMAN
In this section we will show you how to perform an offline (or cold) backup using RMAN.
This will require that the database be down (that’s why it’s called an offline backup).
Oracle supports online backups also, and we will be covering these shortly.
Before we can use RMAN we need to configure a few settings. In this section we will look at
configuring the database for our backup, and then we will proceed to do the backup.
Configure Oracle and RMAN for Backup
Before we can use RMAN we will need to configure a few settings. In this section we will
assume:
1. That you will be backing up to a file system called /u01/app/oracle/backup. You will need
to create this file system if it does not already exist.
2. That you are using an SPFILE.
Note that if you created your database as we described earlier in the book, you should
already be using an SPFILE.
The configuration is pretty basic. First, we need to configure a couple of database
parameters. These parameters will configure the Flash Recovery Area of the database.
This is the location that all the disk backups will be made to. To configure the flash
recovery area we will use the alter system command to set the value of two database
parameters:
* db_recovery_file_dest – Determines the location of the flash recovery area.
* db_recovery_file_dest_size – Determines how much space can be used by Oracle in the
flash recovery area.
We will configure the flash recovery area to the value of /u01/app/oracle/backup, and we
will assign it a 2 Gigabyte limit. Note! Oracle flash recovery area re-named to fast
recovery area
You may need to assign your flash recovery area more space depending on the following
factors:
PREPARED BY RAVI KUMAR LANKE Page 3
* The size of your database
* The number of backups you want to keep
* If you are running your database in ARCHIVELOG mode (which we will discuss later in
this chapter).
Here is an example of configuring the flash recovery area for the settlings listed previously.
This assumes your database is using a SPFILE which we discussed in earlier chapters:
Alter system set db_recovery_file_dest=’/u01/app/oracle/backup’;
Alter system set db_recovery_file_dest_size=2G;
We will also want to set a couple of RMAN settings before we do our first backup. Start
RMAN as detailed earlier in this section with:
$ rman target /
Now, we want to configure the following:
* Automatic backups of the control file and SPFILE.
* Retention policy to a redundancy of 2
Next, we can use the RMAN configure command to configure these settings as seen in this
example:
-- Configure the retention policy to redundancy of 2.
-- This means RMAN will try to keep 2 copies of the database
backups.
RMAN> configure retention policy to redundancy 2;
-- Configure automated backups of the control file and SPFILE.
RMAN>configure controlfile autobackup on;
Now that RMAN and the database are configured, we are ready to proceed to backup the
database.

Weitere ähnliche Inhalte

Andere mochten auch

Developing a framework for managing academic standard dr melinda-day 1-session3
Developing a framework for managing academic standard dr melinda-day 1-session3Developing a framework for managing academic standard dr melinda-day 1-session3
Developing a framework for managing academic standard dr melinda-day 1-session3
Fadi Nijem , MBA, MSc, CM, CPT, CCSE
 
Ajustament de Reaccions Redox (2)
Ajustament de Reaccions Redox (2)Ajustament de Reaccions Redox (2)
Ajustament de Reaccions Redox (2)
mrosa berenguer
 
Veliki povratek Myspacea_Marketing Magazin_nov2012_st.378_str.18
Veliki povratek Myspacea_Marketing Magazin_nov2012_st.378_str.18Veliki povratek Myspacea_Marketing Magazin_nov2012_st.378_str.18
Veliki povratek Myspacea_Marketing Magazin_nov2012_st.378_str.18
Urska Saletinger
 
Pfs customer beef catelog 110510
Pfs customer beef catelog 110510Pfs customer beef catelog 110510
Pfs customer beef catelog 110510
Jeff Cattell
 
Scholars and knowledge in the 21st century
Scholars and knowledge in the 21st centuryScholars and knowledge in the 21st century
Scholars and knowledge in the 21st century
Roxanne Missingham
 
Ragionamenti 11 07 74
Ragionamenti 11 07 74Ragionamenti 11 07 74
Ragionamenti 11 07 74
Self-Employed
 

Andere mochten auch (17)

Integrating Twitter into Education
Integrating Twitter into EducationIntegrating Twitter into Education
Integrating Twitter into Education
 
Corporate Brochure Dynamis 2012
Corporate Brochure Dynamis 2012Corporate Brochure Dynamis 2012
Corporate Brochure Dynamis 2012
 
Trio Kwek-Kwek
Trio Kwek-KwekTrio Kwek-Kwek
Trio Kwek-Kwek
 
Developing a framework for managing academic standard dr melinda-day 1-session3
Developing a framework for managing academic standard dr melinda-day 1-session3Developing a framework for managing academic standard dr melinda-day 1-session3
Developing a framework for managing academic standard dr melinda-day 1-session3
 
Are 30 year fixed mortgages safe?
Are 30 year fixed mortgages safe?Are 30 year fixed mortgages safe?
Are 30 year fixed mortgages safe?
 
Ajustament de Reaccions Redox (2)
Ajustament de Reaccions Redox (2)Ajustament de Reaccions Redox (2)
Ajustament de Reaccions Redox (2)
 
Veliki povratek Myspacea_Marketing Magazin_nov2012_st.378_str.18
Veliki povratek Myspacea_Marketing Magazin_nov2012_st.378_str.18Veliki povratek Myspacea_Marketing Magazin_nov2012_st.378_str.18
Veliki povratek Myspacea_Marketing Magazin_nov2012_st.378_str.18
 
Excalibur
ExcaliburExcalibur
Excalibur
 
Pfs customer beef catelog 110510
Pfs customer beef catelog 110510Pfs customer beef catelog 110510
Pfs customer beef catelog 110510
 
Kavita lakhani- Advanced Program in Digital Marketing - Project Submission AP...
Kavita lakhani- Advanced Program in Digital Marketing - Project Submission AP...Kavita lakhani- Advanced Program in Digital Marketing - Project Submission AP...
Kavita lakhani- Advanced Program in Digital Marketing - Project Submission AP...
 
СПА-Форум в Новосибирске, Мир новых возможностей Интернета
СПА-Форум в Новосибирске, Мир новых возможностей ИнтернетаСПА-Форум в Новосибирске, Мир новых возможностей Интернета
СПА-Форум в Новосибирске, Мир новых возможностей Интернета
 
Noticias Tel Nov
Noticias Tel NovNoticias Tel Nov
Noticias Tel Nov
 
How To Shop For A Low VA Loan Rate
How To Shop For A Low VA Loan RateHow To Shop For A Low VA Loan Rate
How To Shop For A Low VA Loan Rate
 
Leveraging ArcGIS Online for Public Utility Data
Leveraging ArcGIS Online for Public Utility DataLeveraging ArcGIS Online for Public Utility Data
Leveraging ArcGIS Online for Public Utility Data
 
Scholars and knowledge in the 21st century
Scholars and knowledge in the 21st centuryScholars and knowledge in the 21st century
Scholars and knowledge in the 21st century
 
Nuh'un Gemisinde Hayvanlar Alemi
Nuh'un Gemisinde Hayvanlar AlemiNuh'un Gemisinde Hayvanlar Alemi
Nuh'un Gemisinde Hayvanlar Alemi
 
Ragionamenti 11 07 74
Ragionamenti 11 07 74Ragionamenti 11 07 74
Ragionamenti 11 07 74
 

Mehr von Ravi Kumar Lanke

Mehr von Ravi Kumar Lanke (20)

Creating and configuring vnc sessions
Creating and configuring vnc sessionsCreating and configuring vnc sessions
Creating and configuring vnc sessions
 
Copying files between linux machines using scp and ssh without linux user pas...
Copying files between linux machines using scp and ssh without linux user pas...Copying files between linux machines using scp and ssh without linux user pas...
Copying files between linux machines using scp and ssh without linux user pas...
 
Exporting schema to dmp file and importing it into other oracle database
Exporting schema to dmp file and importing it into other oracle databaseExporting schema to dmp file and importing it into other oracle database
Exporting schema to dmp file and importing it into other oracle database
 
Installing Endeca Server, Studio, Integrator ETL , Commerce and Platform Serv...
Installing Endeca Server, Studio, Integrator ETL , Commerce and Platform Serv...Installing Endeca Server, Studio, Integrator ETL , Commerce and Platform Serv...
Installing Endeca Server, Studio, Integrator ETL , Commerce and Platform Serv...
 
Installing solaris on virtual box and installing weblogic server
Installing solaris on virtual box and installing weblogic server Installing solaris on virtual box and installing weblogic server
Installing solaris on virtual box and installing weblogic server
 
Enabling remote desktop connection on windows 7 64 bit
Enabling remote desktop connection on windows 7 64 bitEnabling remote desktop connection on windows 7 64 bit
Enabling remote desktop connection on windows 7 64 bit
 
Connecting to the remote database through sql developer without database clie...
Connecting to the remote database through sql developer without database clie...Connecting to the remote database through sql developer without database clie...
Connecting to the remote database through sql developer without database clie...
 
Setting home path class path and path for java on windows 7
Setting home path class path and path for java on windows 7Setting home path class path and path for java on windows 7
Setting home path class path and path for java on windows 7
 
How to find ip and mac address
How to find ip and mac addressHow to find ip and mac address
How to find ip and mac address
 
Step by step deployment of sampleappv406
Step by step deployment of  sampleappv406Step by step deployment of  sampleappv406
Step by step deployment of sampleappv406
 
Installing and configuring informatica 910 and dac 11 g on windows 64 bit
Installing and configuring informatica 910 and dac 11 g on windows 64 bitInstalling and configuring informatica 910 and dac 11 g on windows 64 bit
Installing and configuring informatica 910 and dac 11 g on windows 64 bit
 
Installing bi applications 7.9.6.4 on obiee 11.1.1.7.0
Installing bi applications 7.9.6.4 on obiee 11.1.1.7.0Installing bi applications 7.9.6.4 on obiee 11.1.1.7.0
Installing bi applications 7.9.6.4 on obiee 11.1.1.7.0
 
Installing my sql on windows
Installing my sql on windowsInstalling my sql on windows
Installing my sql on windows
 
How to prevent access to command prompt and registry editing tools and window...
How to prevent access to command prompt and registry editing tools and window...How to prevent access to command prompt and registry editing tools and window...
How to prevent access to command prompt and registry editing tools and window...
 
How to disable and enable task manager
How to disable and enable task managerHow to disable and enable task manager
How to disable and enable task manager
 
Deploying an application into oracle endeca tools and frame works
Deploying an application into oracle endeca tools and frame worksDeploying an application into oracle endeca tools and frame works
Deploying an application into oracle endeca tools and frame works
 
Installing oracle endeca commerce
Installing oracle endeca commerceInstalling oracle endeca commerce
Installing oracle endeca commerce
 
How to deploy rpd and catalog without enterprise manger
How to deploy rpd and catalog without enterprise mangerHow to deploy rpd and catalog without enterprise manger
How to deploy rpd and catalog without enterprise manger
 
How to change the obiee 11g browser title
How to change the obiee 11g browser titleHow to change the obiee 11g browser title
How to change the obiee 11g browser title
 
Creating new service name for oracle database
Creating new service name for oracle databaseCreating new service name for oracle database
Creating new service name for oracle database
 

Kürzlich hochgeladen

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 

Kürzlich hochgeladen (20)

How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 

Oracle rman

  • 1. PREPARED BY RAVI KUMAR LANKE Page 1 Oracle RMAN One (if not the, most important) jobs of the Oracle DBA is to ensure that the databases in their care are protected. Databases, or data in the database, can be lost through a variety of ways including: * User error * Hardware failure * Software failure * Disasters * Application errors To protect your database, you will need to know how to back it up and you will need to know how to recover your database. Backup and recovery is what this last chapter is all about. Backup and recovery can be a very difficult and complex topic, for there are a number of different options for you to choose from when it comes to backing up a database. In this chapter, we aim to set you on the right course, showing you how to perform basic database backup and recovery operations. In this chapter we will use the Oracle RMAN tool. It comes with the Oracle RDBMS and it’s free. In this chapter we will cover: * Backing up your database with RMAN * Restoring your database with RMAN So, without further delay, let’s get started on getting your database backed up. Backup Your Database with RMAN Database backups with RMAN are actually quite easy. Your database can be in one of two modes, ARCHIVELOG or NOARCHIVELOG mode. The mode your database is in determines what kinds of backups you can perform on your database. In this section we will cover the following topics: Starting RMAN The RMAN client is started from the operating system prompt. To use RMAN, simply set the Oracle environment as you would before you use any other Oracle client (like SQL*Plus). Once the environment is set, then you start RMAN as seen in this example:
  • 2. PREPARED BY RAVI KUMAR LANKE Page 2 rman target=/ Once you have started RMAN you will find yourself at the RMAN prompt. We are then ready to begin our database backup. Perform an Offline (Cold) Backup of your Database with RMAN In this section we will show you how to perform an offline (or cold) backup using RMAN. This will require that the database be down (that’s why it’s called an offline backup). Oracle supports online backups also, and we will be covering these shortly. Before we can use RMAN we need to configure a few settings. In this section we will look at configuring the database for our backup, and then we will proceed to do the backup. Configure Oracle and RMAN for Backup Before we can use RMAN we will need to configure a few settings. In this section we will assume: 1. That you will be backing up to a file system called /u01/app/oracle/backup. You will need to create this file system if it does not already exist. 2. That you are using an SPFILE. Note that if you created your database as we described earlier in the book, you should already be using an SPFILE. The configuration is pretty basic. First, we need to configure a couple of database parameters. These parameters will configure the Flash Recovery Area of the database. This is the location that all the disk backups will be made to. To configure the flash recovery area we will use the alter system command to set the value of two database parameters: * db_recovery_file_dest – Determines the location of the flash recovery area. * db_recovery_file_dest_size – Determines how much space can be used by Oracle in the flash recovery area. We will configure the flash recovery area to the value of /u01/app/oracle/backup, and we will assign it a 2 Gigabyte limit. Note! Oracle flash recovery area re-named to fast recovery area You may need to assign your flash recovery area more space depending on the following factors:
  • 3. PREPARED BY RAVI KUMAR LANKE Page 3 * The size of your database * The number of backups you want to keep * If you are running your database in ARCHIVELOG mode (which we will discuss later in this chapter). Here is an example of configuring the flash recovery area for the settlings listed previously. This assumes your database is using a SPFILE which we discussed in earlier chapters: Alter system set db_recovery_file_dest=’/u01/app/oracle/backup’; Alter system set db_recovery_file_dest_size=2G; We will also want to set a couple of RMAN settings before we do our first backup. Start RMAN as detailed earlier in this section with: $ rman target / Now, we want to configure the following: * Automatic backups of the control file and SPFILE. * Retention policy to a redundancy of 2 Next, we can use the RMAN configure command to configure these settings as seen in this example: -- Configure the retention policy to redundancy of 2. -- This means RMAN will try to keep 2 copies of the database backups. RMAN> configure retention policy to redundancy 2; -- Configure automated backups of the control file and SPFILE. RMAN>configure controlfile autobackup on; Now that RMAN and the database are configured, we are ready to proceed to backup the database.