Oracle: Protect Your Data
()
About this ebook
This book is for all those wishing to protect their data stored in the RDBMS ORACLE.
It assumes that the reader already knows the architecture of the Oracle database
(9i Versions at minimum)
Contents of the book
The book comprises 11 chapters divided into two parts:
I. - The first part dealing with the backup consists of four chapters
The first chapter is devoted to the logical backup
The second chapter deals with the physical backup
The third chapter discusses the various flashback technologies
The fourth chapter describes the duplication of a database
and Tablespace Point in Time Recovery
II - The second part dealing with DATA GUARD consists of seven chapters
Begins with an overview of Data Guard in Chapter 5.
It continues with chapters 6 and 7 which respectively describe how to create a physical standby database and a logical standby database.
Chapter 8 discusses the data protection methods and redo log transfer services .
Chapter 9 describes the permutations of roles and base change.
Chapter 10 describes Fast Start Failover & Transparent Application Fail Over functionalities .
Chapter 11, which closes the last part of the book, presents other accounts related to Data Guard .
Form of the book
The book is designed as a course. It outlines in a phased manner different fundamentals of Backup / Recovery and protection against disasters .
The pedagogical approach used in this book will satisfy both the needs of :
1) Beginners readers with a minimal experience in running an Oracle
database which will be guided throughout this book from a database creation to Data Guard implementation through the different backups / recoveries setups procedures .
2) Students, Engineers, Project Managers who already have a first experience in administering Oracle databases and want to broaden the concepts in order to :
- Implementing advanced backup strategies
- Effectively protecting their data against all types of failures.
Many examples present in this book and the scripts which can be downloaded on the site www.tchoko-books.com will enable readers to implement effective strategies for Backup /Recovery and DATA GUARD management .
The content is based on 11g version while highlighting the changes from the earlier versions 10g and 9i.
Floribert TCHOKO
Telecom Paris Engineer and Oracle Certified Master, Floribert TCHOKONGOUE is a senior consultant technology at CATALYST BUSINESS SOLUTIONS, Oracle platinum partner. He has 27 years experience in the IT industry with 15 years in Oracle Server technologies. During all these years, he teaches both the standard as advanced database trainings in Oracle University classes covering: - Real Application Clusters (RAC), Performance & Tunings - Advanced Backups, Application Server - Grid Control, Database Security - Data Guard, Oracle Streams,... Building on his long experience of administering databases (from version 7 to 11g), and trainings delivered, he designed this book as a course. Each concept developed begins with a theoretical description followed by examples and workshops where frequent encountered errors are highlighted. This teaching approach can meet the expectations of the beginners and those (students, engineers, project managers) who have a first experience in the administration of a version of Oracle. The software (ORACLE RDBMS and Linux) needed for the practices developed in this book are downloadable free on the sites: • http://www.oracle.com/technetwork/database/enterprise-edition/ downloads/index.html (For a training purpose only) • https://edelivery.oracle.com/linux
Related to Oracle
Related ebooks
Oracle Data Guard 11gR2 Administration Beginner's Guide Rating: 0 out of 5 stars0 ratingsOracle Database Mastery: Comprehensive Techniques for Advanced Application Rating: 0 out of 5 stars0 ratingsOracle Database 12c Install, Configure & Maintain Like a Professional: Install, Configure & Maintain Like a Professional Rating: 0 out of 5 stars0 ratingsOracle Business Intelligence : The Condensed Guide to Analysis and Reporting Rating: 0 out of 5 stars0 ratingsPostgreSQL 9 Administration Cookbook LITE: Configuration, Monitoring and Maintenance Rating: 3 out of 5 stars3/5Oracle Recovery Appliance Handbook: An Insider’S Insight Rating: 0 out of 5 stars0 ratingsLearning Oracle 12c: A PL/SQL Approach Rating: 0 out of 5 stars0 ratingsMastering MariaDB Rating: 0 out of 5 stars0 ratingsMastering Oracle Database: From Basics to Expert Proficiency Rating: 0 out of 5 stars0 ratingsOCA Oracle Database 11g Administration I Exam Guide (Exam 1Z0-052) Rating: 0 out of 5 stars0 ratingsGetting Started with SQL Server 2014 Administration Rating: 0 out of 5 stars0 ratingsOracle GoldenGate With Microservices: Real-Time Scenarios with Oracle GoldenGate Rating: 0 out of 5 stars0 ratingsSQL Tutorial For Beginners Rating: 0 out of 5 stars0 ratingsPostgreSQL 9 High Availability Cookbook Rating: 5 out of 5 stars5/5Oracle Quick Guides: Part 1 - Oracle Basics: Database and Tools Rating: 0 out of 5 stars0 ratingsNoSQL Essentials: Navigating the World of Non-Relational Databases Rating: 0 out of 5 stars0 ratingsOracle 19c AutoUpgrade Best Practices: A Step-by-step Expert-led Database Upgrade Guide to Oracle 19c Using AutoUpgrade Utility Rating: 0 out of 5 stars0 ratingsMastering Oracle Scheduler in Oracle 11g Databases Rating: 0 out of 5 stars0 ratingsMicrosoft SQL Server 2008 All-in-One Desk Reference For Dummies Rating: 0 out of 5 stars0 ratingsOracle Database Security Interview Questions, Answers, and Explanations: Oracle Database Security Certification Review Rating: 0 out of 5 stars0 ratingsInstant PostgreSQL Backup and Restore How-to Rating: 0 out of 5 stars0 ratingsMicrosoft SQL Server 2012 Administration: Real-World Skills for MCSA Certification and Beyond (Exams 70-461, 70-462, and 70-463) Rating: 0 out of 5 stars0 ratingsAdvanced Database Architecture: Strategic Techniques for Effective Design Rating: 0 out of 5 stars0 ratingsStarting Database Administration: Oracle DBA Rating: 3 out of 5 stars3/5Oracle Advanced PL/SQL Developer Professional Guide Rating: 4 out of 5 stars4/5Databases: System Concepts, Designs, Management, and Implementation Rating: 0 out of 5 stars0 ratingsOracle Database 11g - Underground Advice for Database Administrators: Beyond the basics Rating: 0 out of 5 stars0 ratingsIntroduction to Oracle Database Administration Rating: 5 out of 5 stars5/5Concise Oracle Database For People Who Has No Time Rating: 0 out of 5 stars0 ratingsDB2 9.7 for Linux, UNIX, and Windows Database Administration: Certification Study Notes Rating: 5 out of 5 stars5/5
Certification Guides For You
Coding All-in-One For Dummies Rating: 4 out of 5 stars4/5Microsoft Office 365 for Business Rating: 4 out of 5 stars4/5CompTIA A+ Complete Review Guide: Core 1 Exam 220-1101 and Core 2 Exam 220-1102 Rating: 5 out of 5 stars5/5Coding For Dummies Rating: 5 out of 5 stars5/5CompTIA Security+ Study Guide: Exam SY0-601 Rating: 5 out of 5 stars5/5CompTIA Security+ Get Certified Get Ahead: SY0-701 Study Guide Rating: 5 out of 5 stars5/5CompTIA Security+ Study Guide with over 500 Practice Test Questions: Exam SY0-701 Rating: 5 out of 5 stars5/5CompTIA A+ Complete Study Guide: Core 1 Exam 220-1101 and Core 2 Exam 220-1102 Rating: 0 out of 5 stars0 ratingsCompTIA A+ CertMike: Prepare. Practice. Pass the Test! Get Certified!: Core 1 Exam 220-1101 Rating: 0 out of 5 stars0 ratingsCompTIA A+ Complete Study Guide: Exam Core 1 220-1001 and Exam Core 2 220-1002 Rating: 4 out of 5 stars4/5(ISC)2 CISSP Certified Information Systems Security Professional Official Study Guide Rating: 3 out of 5 stars3/5CISM Certified Information Security Manager Study Guide Rating: 4 out of 5 stars4/5CompTIA Network+ Study Guide: Exam N10-009 Rating: 0 out of 5 stars0 ratingsHow to Get Started as a Technical Writer Rating: 4 out of 5 stars4/5CompTIA Network+ Review Guide: Exam N10-008 Rating: 0 out of 5 stars0 ratingsCCNA Certification Study Guide, Volume 2: Exam 200-301 Rating: 5 out of 5 stars5/5CISSP Official (ISC)2 Practice Tests Rating: 5 out of 5 stars5/5CompTIA ITF+ CertMike: Prepare. Practice. Pass the Test! Get Certified!: Exam FC0-U61 Rating: 5 out of 5 stars5/5Microsoft Certified Azure Fundamentals Study Guide: Exam AZ-900 Rating: 0 out of 5 stars0 ratingsCompTIA Data+ Study Guide: Exam DA0-001 Rating: 0 out of 5 stars0 ratingsCEH v11 Certified Ethical Hacker Study Guide Rating: 0 out of 5 stars0 ratingsIAPP CIPP/US Certification A Practical Study Guide to Master the Certified Information Privacy Professional Exam Rating: 0 out of 5 stars0 ratingsAWS Certified Cloud Practitioner - Practice Paper 1: AWS Certified Cloud Practitioner, #1 Rating: 5 out of 5 stars5/5CompTIA Security+ Study Guide: Exam SY0-501 Rating: 4 out of 5 stars4/5PMP Project Management Professional Exam Study Guide: 2021 Exam Update Rating: 4 out of 5 stars4/5The Official (ISC)2 CCSP CBK Reference Rating: 0 out of 5 stars0 ratings
Reviews for Oracle
0 ratings0 reviews
Book preview
Oracle - Floribert TCHOKO
Contents
FORWARD
About the Author
ACKNOWLEDGMENTS
PRESENTATION
OF DATA PROTECTION
PRESENTATION OF DATA PROTECTION
FIRST PART BACKUP
CHAPTER 1
CHAPTER 2
CHAPTER 3
CHAPTER 4
SECOND PART DATA GUARD
CHAPTER 5
CHAPTER 6
CHAPTER 7
CHAPTER 8
CHAPTER 9
CHAPTER 10
CHAPTER 11
APPENDICES
ORACLE
In memory of my parents
DJAPE Henri-Ledoux and TIONGOUE Clotilde.
FORWARD
For who is this book?
This book is for all those wishing to protect their data stored in the RDBMS ORACLE. It assumes that the reader already knows the architecture of the Oracle database (9i Versions at minimum)
Book contents
The book comprises 11 chapters divided into two parts:
I. -The first part dealing with the backup consists of four chapters
The first chapter is devoted to the logical backup
The second chapter deals with the physical backup
The third chapter discusses the various flashback technologies
The fourth chapter describes the duplication of a database
and Tablespace Point in Time Recovery
II. -The second part dealing with DATA GUARD consists of seven chapters
Begins with an overview of Data Guard in Chapter 5.
It continues with chapters 6 and 7 which respectively describe how to create a physical standby database and a logical standby database.
Chapter 8 discusses the data protection methods and redo log transfer services.
Chapter 9 describes the permutations of roles and base change.
Chapter 10 describes Fast Start Failover & Transparent Application Fail Over functionalities.
Chapter 11, which closes the last part of the book, presents other accounts related to Data Guard.
Form of the book
The book is designed as a course. It outlines in a phased manner different fundamentals of Backup / Recovery and protection against disasters. The pedagogical approach used in this book will satisfy both the needs of:
1) Beginners readers with a minimal experience in running an Oracle database who will be guided throughout this book from a database creation to Data Guard implementation through the different backups / recoveries setups procedures.
2) Students, Engineers, Project Managers who already have a first experience in administering Oracle databases and want to broaden the concepts in order to :
- Implementing advanced backup strategies
- Effectively protecting their data against all types of failures.
Many examples present in this book and the scripts downloadable on the site www.tchoko-books.com will enable readers to implement effective strategies for Backup /Recovery and DATA GUARD management.
The content is based on 11g version while highlighting the changes from the earlier versions 10g and 9i.
Errata and Additional Material
Despite our best endeavors, there may be errors and omissions throughout this book. While we apologize in advance for these, we will maintain up-to-date errata on the web site http://www.tchoko-books.com which will also contain additional material. You can also contact the author using the E-mail address [email protected].
SYMBOLS and CONVENTIONS USED
Є : Belongs to
Є : Does not belong to
> : Great than
< : Less than
>= : Great or Equal
<= : Less or Equal
< > : Different
{ } :Set
[ ] :Interval
Σ :Sum
I/O : Input/output
DDL : Data Definition Language
DML : Data Manipulation Language
OS : Operating System
For SQL/SQL+/RMAN Commands, the following conventions are used:
[Element] : Element between brackets is optional
{Element} : Element underlined is the default value in a list
{elt1|elt2|eltn} : A required element on choice
[elt1|elt2|eltn] : An optional element on choice
About the Author
Floribert TCHOKONGOUE
Telecom Paris Engineer and Oracle Certified Master, Floribert TCHOKONGOUE is a senior consultant technology at Catalyst Business Solutions, Oracle platinum partner. He has 27 years experience in the IT industry with 15 years in Oracle Server technologies. During all these years, he teaches the basic database trainings as well as advanced database trainings in Oracle University classes covering:
- Real Application Clusters (RAC)
- Performance & Tuning
- Advanced Backups
- Application Server
- Grid Control
- Database Security
- Data Guard, Oracle Streams, . . .
Building on his long experience of administering databases (from version 7 to 11g), and trainings delivered, he designed this book as a course. Each concept developed begins with a theoretical description followed by examples and workshops where frequent encountered errors are highlighted.
ACKNOWLEDGMENTS
I would like to thank CATALYST management (especially Prosanta Kumar Rey, Amol Awasthi and Anupam Awasthi) who encouraged me to write the English version of this book, my first production being only in French language.
I would also like to thank my wife Eliane for her coordination of the works of redaction and for her patience and support over the past 12 months, the same for my children Andress, Florient, Cindy and Leon-Marie.
Floribert TCHOKO
PRESENTATION
OF DATA PROTECTION
PRESENTATION OF DATA PROTECTION
A key responsibility of the database administrator (DBA) is to ensure the availability of the database. For this, he may take the following measures in order to reduce downtime of the database:
• Multiplex control files;
• Create Redo log files groups with several members;
• Distribution of control files and files members Redo logfiles on several different disks.
Despite these precautions, an incident may still occur interrupting production. The DBA must then restore the continuity of the service as soon as possible with minimal loss of data.
Types of incidents
The incidents that may occur have various causes:
▪ User error;
▪ Instance failure;
▪ Block corruption;
▪ Physical failure
User error
A user may intentionally (or not):
- delete a table or a tablespace;
- truncate a table;
- validate errors in a table.
To limit this type of error, the DBA must train users to manipulate the database and grant them only the required privileges for their work.
Block Corruption
There are 2 types of corruptions:
- physical corruption
- logical corruption
A logical corruption corresponds to an oracle internal error. Once an inconsistency in the structure of a block is detected, it is marked as damaged. This block can in some cases be read by low-level tools. On the other side in case of a physical corruption, the block has an incorrect format. Even with a low level tool, this block can’t be read. The corruptions are generally due to faulty hardware (disks, disk controllers) or problems of operating systems. To limit this type of errors, the DBA to its level,—in addition to the choice of hard disks, disk controllers, power quality and redundancy implementation thereof—made by the system administrator can prevent corruption by assigning appropriate values to certain initialization parameters. In addition, it is not recommended to run check disk utility on Oracle drives.
Instance failures
An instance failure can occur for one of the following reasons:
- The server becomes unavailable due to a power failure or a failure of one of its hardware components other than the hard disk (CPU, RAM…)
- Failure of the operating system
- Failure in a background process of the Oracle server.
This type of incident does not require any action of recovery (from the backups from the DBA). He should only after resolution of the incident restart the instance and open the database. The recovery process is made by the SMON process.
Physical failures
The physical failure, defined here as the inability to access a file needed to run the database, is the most severe type of incident, since it usually requires the intervention of the DBA that depending on the nature of the failure, may go to the full restoration of the database backup.
BACKUP/RESTORE STRATEGIES
The backup strategies vary according to operational requirements of each organism. An organization chart operating 24 hours out of 24, 7 days on 7, 365 days per year and an outage of a few minutes would result in a considerable financial loss, will not apply the same strategy that an organization chart operating five days on 7, 8 hours per day and capable of supporting shortages of more than one hour.
In the first case, one has to resort to an ONLINE backup, database open, whereas in the latter case, one might settle for a closed base backup (the data created between backups being lost and to be re-entered manually). In all cases, the strategies put in place depend on the QoS (quality of service), whose main parameters are:
- MTTR (Mean Time To Repair), expresses the time of restart of the database after incident
- MTBF (Mean time Between Failure)
In the first case of our example of continuous operation (MTTR close to 0 and MTBF near infinity), the DBA should:
• Perform ONLINE backups;
• Distribute the files in the database on mirror disks or RAID systems if possible;
• Enable the prevention of physical and logical block corruption (see below);
• Minimize instance time recovery ;
• Have a database backup on a remote site (see the 2nd part of this book).
While in the second case, the DBA could settle for a backup, database closed at the end of each operation knowing that he runs the risk of losing data from a day of use.
BACKUPS CLASSIFICATION
Backups can be classified into two types:
- Logical backups
- Physical backups
Logical backup
Logical backup is performed by a utility (OS level) EXPORT (or Data Pump since version 10g). This utility extracts the contents of the specified tables and dependent objects and stores them in a dump file whose format is independent of the operating system.
There are 5 modes of EXPORT:
• Table;
• User;
• Tablespace;
• Transport tablespace;
• Full;
These modes will be explained in detail further in this book.
* Caution:
The objects belonging to SYS schema are never copied no matter the EXPORT mode.
SYS being the owner of the database dictionary and containing essential tables necessary for the functioning of the database, a copy of these objects, then its IMPORT into another database could compromise its integrity.
It is not recommended to use EXPORT as the only type of backup for the following reasons:
• EXPORT can ‘t copy contents of offline tablespaces even in full mode;
• The image of the database may no longer be the same after IMPORT, if there has been an incident requiring the recreation of the database after applying patches on the Oracle server, the objects owned by SYS are not exported
• EXPORT and IMPORT can only be used as database open. In case of loss or damage of a vital file for the database (control, system, current log or undo) the database can’t be opened, our EXPORT dump file can only be used after recreating the database.
In general, we use EXPORT in addition to the backup in the case of specific operations such as:
- Moving objects from one database to another for testing purposes
- Transport of tablespace
- Reorganization of the space in the tables (method commonly used in versions prior to 10g)
Physical backup
The physical backup consists in copying the files from the database. There are 2 types of physical backups:
- backups managed by the user
- backups managed by RMAN
We use a command of the operating system (cp, Copy…) to copy the files from