0% found this document useful (0 votes)
40 views15 pages

The Cloud DBA Oracle

cloud dba textbook

Uploaded by

jlchiappa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views15 pages

The Cloud DBA Oracle

cloud dba textbook

Uploaded by

jlchiappa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

The Cloud

DBA-Oracle
Managing Oracle
Database in the Cloud

First Edition

Abhinivesh Jain
Niraj Mahajan
The Cloud DBA-Oracle: Managing Oracle Database in the Cloud
Abhinivesh Jain Niraj Mahajan
Pune, Maharashtra, India Pune, Maharashtra, India
ISBN-13 (pbk): 978-1-4842-2634-6 ISBN-13 (electronic): 978-1-4842-2635-3
DOI 10.1007/978-1-4842-2635-3
Library of Congress Control Number: 2017933318
Copyright © 2017 by Abhinivesh Jain and Niraj Mahajan
This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part
of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations,
recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission
or information storage and retrieval, electronic adaptation, computer software, or by similar or
dissimilar methodology now known or hereafter developed.
Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol
with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only
in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of
the trademark.
The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are
not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject
to proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of
publication, neither the authors nor the editors nor the publisher can accept any legal responsibility for
any errors or omissions that may be made. The publisher makes no warranty, express or implied, with
respect to the material contained herein.

Managing Director: Welmoed Spahr


Editorial Director: Todd Green
Acquisitions Editor: Celestin Suresh John
Development Editor: Laura Berendson
Technical Reviewer: Sudip Das
Coordinating Editor: Sanchita Mandal
Copy Editor: Kezia Endsley
Compositor: SPi Global
Indexer: SPi Global
Artist: SPi Global
Cover image designed by Freepik
Distributed to the book trade worldwide by Springer Science+Business Media New York,
233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail
[email protected], or visit www.springeronline.com. Apress Media, LLC is a California LLC
and the sole member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc).
SSBM Finance Inc is a Delaware corporation.
For information on translations, please e-mail [email protected], or visit http://www.apress.com/
rights-permissions.
Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook versions
and licenses are also available for most titles. For more information, reference our Print and eBook Bulk
Sales web page at http://www.apress.com/bulk-sales.
Any source code or other supplementary material referenced by the author in this book is available
to readers on GitHub via the book's product page, located at www.apress.com/978-1-4842-2634-6.
For more detailed information, please visit http://www.apress.com/source-code.
Printed on acid-free paper
To my parents, my wife Bhumika, and my son Aarjav,
for their unconditional love, support, and encouragement in writing this book.
—Abhinivesh Jain

To my parents, my wife Aboli, and my daughters Swarali and Sarisha,


for their continuous support and love.
My father is my inspiration for writing this book.
—Niraj Mahajan
Contents at a Glance

About the Authors........................................................................... xiii


About the Technical Reviewer ......................................................... xv
Acknowledgements ....................................................................... xvii
Introduction .................................................................................... xix

■Part I: Cloud Computing Fundamentals .......................... 1


■Chapter 1: Introduction to Cloud Computing .................................. 3
■Chapter 2: Introduction to Database as a Service ........................ 11

■Part II: Database Administration in Cloud .................... 23


■Chapter 3: Provisioning ................................................................ 25
■Chapter 4: High Availability Options ............................................. 51
■Chapter 5: Disaster Recovery Options .......................................... 71
■Chapter 6: DB Security ................................................................. 87
■Chapter 7: DB Migration to the Cloud ........................................... 99
■Chapter 8: Backup and Restore .................................................. 139
■Chapter 9: Manage and Monitor ................................................. 173

Epilogue ......................................................................................... 211


Index .............................................................................................. 213

v
Contents

About the Authors........................................................................... xiii


About the Technical Reviewer ......................................................... xv
Acknowledgements ....................................................................... xvii
Introduction .................................................................................... xix

■Part I: Cloud Computing Fundamentals .......................... 1


■Chapter 1: Introduction to Cloud Computing .................................. 3
Overview ................................................................................................. 3
What Is Cloud Computing ........................................................................ 3
Benefits of Cloud Computing .................................................................................... 4
Challenges of Cloud Computing................................................................................ 4

Cloud Computing Service Models ........................................................... 5


Infrastructure as a Service (IaaS) ............................................................................. 6
Platform as a Service (PaaS) .................................................................................... 6
Software as a Service (SaaS) ................................................................................... 6

Cloud Deployment Models....................................................................... 6


Public Cloud .............................................................................................................. 6
Private Cloud ............................................................................................................ 8
Hybrid Cloud ............................................................................................................. 8
Community Cloud ..................................................................................................... 9

Metering and Chargeback ..................................................................... 10


Summary ............................................................................................... 10

vii
■ CONTENTS

■Chapter 2: Introduction to Database as a Service ........................ 11


What Is Database as a Service? ............................................................ 11
DBaaS Public Cloud Offerings ............................................................... 12
Oracle Public Cloud Offering ................................................................................... 12
AWS Public Cloud Offering...................................................................................... 16
Microsoft Azure Public Cloud Offering .................................................................... 18

DBaaS in Private Cloud.......................................................................... 19


DBaaS in Managed Services Model ...................................................... 19
Getting Started with Database as a Service .......................................... 20
Selecting Your DBaaS Vendor ................................................................................. 20
Selecting the DBaaS Services ................................................................................ 20
Choosing the Right DBaaS Subscription ................................................................. 20

Getting Acquainted with the Basic Terminology in


Database as a Service ........................................................................... 21
Oracle Cloud Terminology ....................................................................................... 21
Amazon Web Services Terminology ........................................................................ 21
Microsoft Azure Terminology .................................................................................. 22

Summary ............................................................................................... 22

■Part II: Database Administration in Cloud .................... 23


■Chapter 3: Provisioning ................................................................ 25
Database Provisioning Overview ........................................................... 25
Database Provisioning in Oracle Cloud.................................................. 26
Creating Oracle Cloud Subscription ........................................................................ 26
Selecting Oracle Database Cloud Offering.............................................................. 29
Creating the Service ............................................................................................... 30
Accessing Your Database ....................................................................................... 36

viii
■ CONTENTS

Database Provisioning in AWS............................................................... 39


Selecting the Proper Engine ................................................................................... 39
Specifying the DB Environment .............................................................................. 41
Specifying the DB Details ....................................................................................... 41
Configuring the Advanced Settings ........................................................................ 44
Accessing Your AWS RDS Instance ......................................................................... 47

Summary ............................................................................................... 50
■Chapter 4: High Availability Options ............................................. 51
Need for High Availability with Cloud-Based DBs.................................. 51
Database High Availability Overview ..................................................... 51
HA Options in Oracle Cloud ................................................................... 53
Oracle RAC Provisioning in Oracle Cloud ............................................... 53
Connecting to Your RAC Database Servers Using PuTTY....................... 59
Connecting to Your RAC Database Using
SQL Developer ....................................................................................... 60
RAC HA Testing ...................................................................................... 64
HA Options in AWS................................................................................. 64
Overview of Oracle RAC Provisioning in AWS ......................................................... 64

Overview of the Multi-AZ Deployment Option ....................................... 65


Multi-AZ Deployment Method ................................................................................. 66
Failover in Multi-AZ Deployment ............................................................................ 69

Summary ............................................................................................... 70
■Chapter 5: Disaster Recovery Options .......................................... 71
Need for Disaster Recovery with Cloud-Based DBs .............................. 71
Database Disaster Recovery (DR) Overview .......................................... 71
DR Options in Oracle Cloud ................................................................... 72
Provisioning of DataGuard in Oracle Cloud............................................ 73

ix
■ CONTENTS

DataGuard Administration in Oracle Cloud ............................................ 75


Checking the DG Configuration Details ................................................................... 76
Performing DB Switchover Using the Console........................................................ 76
Performing DB Switchover Using dbaascli ............................................................. 78
Performing DB Failover Using the Console ............................................................. 82
Reinstating Failed Primary Database ..................................................................... 83

DR Options in AWS................................................................................. 85
Summary ............................................................................................... 85
■Chapter 6: DB Security ................................................................. 87
Need for Database Security with Cloud-Based DB................................ 87
Cloud Security Model ............................................................................ 87
Security Configurations in Oracle Cloud ................................................ 88
Transparent Data Encryption (TDE) ......................................................................... 89
SQL*Net Encryption ................................................................................................ 90

Security Configurations in AWS ............................................................. 90


Security at the Account Level ................................................................................. 91
Security for Oracle Running on Amazon RDS ......................................................... 93
Security for Oracle Running on Amazon EC2 .......................................................... 95

Security Best Practices ......................................................................... 98


Summary ............................................................................................... 98
■Chapter 7: DB Migration to the Cloud ........................................... 99
DB Migration Key Considerations .......................................................... 99
Migration Lifecycle .............................................................................. 101
Migration Approach ............................................................................. 102
Backup.................................................................................................................. 102
Transfer................................................................................................................. 102
Restore ................................................................................................................. 103

x
■ CONTENTS

Migration Options ................................................................................ 103


Migration Using Tools ........................................................................................... 103
Traditional Migration Methods .............................................................................. 105
Lesser Known Migration Methods ........................................................................ 106
Comparison of Migration Methods ....................................................................... 107

Detailed Migration Steps for Data Migration from


the Local Database to Amazon RDS .................................................... 107
Detailed Migration Steps for Data Migration Using
Oracle Data Pump Utility ..................................................................... 113
Sample Comparison Between SQL Developer and
Data Pump Migration ............................................................................................ 116

Migration Using RMAN Backup Restore .............................................. 117


Migration By Cloning a PDB into the Cloud ......................................... 118
Multitenant Setup On-Premise (Local).................................................................. 119
Create Oracle 12c PDB Database in Oracle Public Cloud ..................................... 120
Clone LocalPDB (Optional) .................................................................................... 120
Open the Cloned LocalPDB in READWRITE Mode (Optional) ................................. 122
Close LocalPDB ..................................................................................................... 123
Convert LocalPDB into READONLY Mode .............................................................. 123
Unplug LocalPDB .................................................................................................. 124
Copy the .XML and Data Files to the Cloud DB Server.......................................... 124
Using EM Express to Plug LocalPDB into the Cloud .............................................. 129
Open LocalPDB in the Cloud ................................................................................. 131

Migration Using DMS........................................................................... 132


Migration Using AWS Snowball ........................................................... 135
Migration Best Practices ..................................................................... 137
Summary ............................................................................................. 137

xi
■ CONTENTS

■Chapter 8: Backup and Restore .................................................. 139


Overview of Database Backup and Restore from
the Cloud Perspective ......................................................................... 139
Using the Cloud as a Backup Destination for
an On-Premise Database..................................................................... 140
Using Backup and Restore Options (Within the Cloud)
for a Cloud Database ........................................................................... 141
DB Backup and Restore in Oracle Cloud ............................................. 141
Oracle Database Cloud Backup Service ............................................................... 142
DB Snapshots ....................................................................................................... 147
Oracle Database Backup Service ......................................................................... 149

Database Recovery in Oracle Cloud .................................................... 155


DB Backup and Restore in AWS........................................................... 162
On-Premise Backup to Amazon Cloud Using Amazon S3 ..................................... 162
DB Backup and Restore in Amazon RDS............................................................... 167
DB Backup and Restore in Amazon EC2 ............................................................... 172

Backup and Restore Best Practices .................................................... 172


Summary ............................................................................................. 172
■Chapter 9: Manage and Monitor ................................................. 173
Overview of Cloud DB Monitoring and Management........................... 173
DB Monitoring and Management in Oracle Cloud ............................... 174
DBaaS Monitor ...................................................................................................... 176
EM Express ........................................................................................................... 185
Command-Line Interfaces .................................................................................... 194
SQL Developer ...................................................................................................... 197

xii
■ CONTENTS

DB Monitoring and Management in AWS............................................. 199


AWS RDS Monitoring Using OEM .......................................................................... 201
AWS CloudWatch .................................................................................................. 204

DB Monitoring and Management Best Practices ................................. 209


Summary ............................................................................................. 209

Epilogue ......................................................................................... 211


Index .............................................................................................. 213

xiii
About the Authors

Abhinivesh Jain is Oracle ACE Associate, AIOUG


(All India Oracle User Group) Evangelist, and founder
member of AIOUG, Pune Chapter.
He has more than a decade of database
experience with expertise in datacenter migration,
transformation, database migration, upgrade,
performance tuning, solution designing, DBaaS, and
Exadata.
He is a frequent presenter at Sangam, OTN Yathra,
AIOUG Pune Chapter, Tech Days, and other Oracle
events. He is an active member of Oracle community
and one of the leading members of the Exadata
community.

Niraj Mahajan has more than 15 years of experience


in managing Oracle databases. He is a founding
member of AIOUG, Pune Chapter, and a frequent
speaker at the AIOUG annual conference, Sangam. His
core skills are Oracle licensing, DB cloud adoption,
solution architecture and tuning, database design and
administration, OEM12c, etc.
He is Oracle Certified Professional DBA (OCP)
for Oracle 8i,9i,10g,11g, and OCE 10g RAC, Oracle
12c implementation specialist, and Oracle Exadata
implementation specialist. He is also certified for SQL
Server, VMware, and ITIL.

xv
About the Technical
Reviewer

Sudip Das has over 21 years of diverse, all round


experience in IT Infrastructure strategy, Cloud
solutions, solution architecture, consulting, delivery,
automation, operations and innovation in large
projects of global organizations specializing in
database administration. Won multiple large deals
over 100MUSD. Over six years of international
experience with global organizations and customers
in Germany, United States, South Africa and Europe.
Rich experience in developing and implementing
service line strategy. Adept at engaging with customers
and partners to provide consultative approach
towards building proactive solutions addressing client
requirements.

xvii
Acknowledgments

Converting an idea into a book is a long journey and this can't be done without the help
of so many individuals.
First of all, thanks to my co-author Niraj, without whom I could not have
completed this book. Besides writing four chapters, he was instrumental in solving
many show-stopper issues and keeping the momentum going.
Thanks to our technical reviewer, Sudip, whose expert comments helped in
improving the quality of this book.
Special thanks to our friends, Harichand Kapgate and Luv Ranadive, who constantly
inspired us and motivated us to finish this book.
Thanks to all our family members for their support and encouragement.
Last but not the least, thanks to all our readers!!!

xix
Introduction

Cloud adoption in the database world is growing very rapidly. Various research and
studies forecast the DBaaS and cloud database service market to grow at a compound
annual growth rate (CAGR) of more than 65% by 2019.
Currently available books cover either cloud computing or database administration,
but not both. This book bridges the gap. The book is divided into two parts. Part I covers
the cloud computing concepts and database as a service overview, whereas Part II covers
everything that is required for you to become a cloud DBA.
Part II starts from your first database provisioning in the cloud and then moves to
setting up Oracle RAC and DataGuard in the cloud. The chapter on database migration
to the cloud gives you in-depth details around how to plan and execute DB migration.
The chapter on DB security touches on the key security aspects that you should take
care for your cloud-based database. The backup and recovery chapter covers various
backup and recovery options in Oracle cloud and AWS. The manage and monitor chapter
covers details on all the tools that are useful for performing day-to-day monitoring and
administration. Part II covers DB administration aspects from the two most prominent
cloud providers—Oracle Cloud and Amazon Web Services (AWS).
This book has the right balance of theory and practical examples, along with the best
practices in each given area.
Database administrators, DB architects, and DB operations managers can use this
book to learn and understand the process of running Oracle database in the cloud.
Thanks for purchasing this book; we are confident that the knowledge you acquire by
reading this book will be worth your time and money. For any comments, suggestions, or
feedback, write to us at [email protected].

xxi

You might also like