Monday, January 21, 2019

OCI―Knowing Database Service Basics

Video 1.  OCI Level 100 - Database (Demo starts at 30:20; YouTube link)

The Oracle Cloud Infrastructure (OCI) Database service (DS) offers autonomous and user-managed Oracle Database solutions:
  • Fully-managed 
    • Autonomous databases are preconfigured, fully-managed environments that are suitable for either transaction processing or for data warehouse workloads. 
    • See OCI―Knowing Autonomous Database Basics for more information
  • User-managed
    • User-managed solutions are bare metal (BM), virtual machine (VM), and Exadata DB systems that you can customize with the resources and settings that meet your needs.
You can quickly provision a user-managed DB system or autonomous database. You have full access to the features and operations available with the database, but Oracle owns and manages the infrastructure:

In this article, we will cover mainly on Oracle provided user-managed solutions and use DS to mean either DB System or Database Service.



Virtual Machine (VM)Bare Metal (BM)Exadata
ScalingStorage (number of
CPU cores on VM DB
cannot be changed)
CPU (amount of available
storage cannot be
changed)
CPU can be scaled within
¼½ and Full rack.
Storage cannot be scaled
Multiple
Homes/Databases
No, single DB and Home onlyYes (one edition, but
different versions
possible)
Yes
StorageBlock StorageLocal NVMe disksLocal spinning disks and NVMe flash cards.
Real Application Clusters (RAC)Available (2-node)Not AvailableAvailable
Data GuardNot AvailableAvailable*Available*

*: You can manually configure Data Guard on Exadata DB systems using native Oracle Database Utilities and commands.  dbcli is not available on Exadata Data systems.

Figure 1.  Exadata Database System with the Maximum Availability Architecture:

DS Features


OCI Database Service has the following features:
  • Comprehensive offerings to cover all enterprise database needs
    • 3 Shape Types:
      • Exadata, Bare Metal, Virtual Machine 
      • Each type with different shapes 
    • Supports various Oracle database software editions, license types, database versions, and database workloads (OLTP vs DSS)
  • Lifecycle Automation
    • Provisioning, Patching, Backup & Restore
  • High Availability 
  • Scalability
    • Dynamic CPU and Storage scaling
  • Security
    • Infrastructure (IAM, Security Lists, Audit logs)
    • Database (TDE, RMAN backup/Block volume encryption)
  • OCI Platform integration
    • Tagging, Limits and Usage Integration
  • License Type
    • License Included with OCI provisioning
    • Bring Your Own License (BYOL)
With Exadata DS, all types of failures are protected against, including disk, server, network and data.

Managing DS


You can use the console to perform the following tasks:
  • Launch DS 
    • Which also create a database system
  • Start, stop or reboot DS
    • Billing continues in stop state for BM DB Systems because its attached local NVMe, but not for VM 
  • Scale CPU cores (except for VM)
  • Scale up storage (VM only)
  • Terminate
    • When you terminate a DB system or a database, all of its resources are deleted, along with any automatic backups
    • Full backups remain in Object Storage as standalone backups
      • You can use a standalone backup to create a new database.
      Figure 2.  Db System patch (upper) vs Database patch (lower)

Patching DS


Because patching a system requires a reboot, plan to run the operations at a time when they will have minimal impact on users. To avoid system interruption, consider implementing a high availability strategy such as Oracle Data Guard.

Using the Console, API, or the database CLI (dbcli), you can perform below tasks:
  • Managed/On-Demand Patching
    • Automated applicable patch discovery and pre-flight checks/tests
  • On Demand Patching
    • N-1 patching (previous patch is available if it hasn't been applied), pre-check and patching at the click of a button
  • Availability during Patching 
    • For Exadata and RAC shapes, patches are rolling.
    • For single node systems, Active Data Guard can be leveraged by the patch service if it is configured
  • 2-Step Process
    • Patching is a 2 step process.  To perform a patch operation on a
      1. DB System
      2. Database
  • Identity and Access Controls
    • Controls who can list patches, apply them, etc

Backup / Restore


If you plan to back up your DB system to Object Storage, you can use a service gateway with a private subnet or an internet gateway with a public subnet.  To recover a database from Object Storage, you can use the Console, API, or by using RMAN.[2]

For backup and restore, OCI Database Service supports:

Manged Backups vs. Unmanaged Backups

Automatic Backups (Incremental)
  • Default Policy 
    • Not changeable at this time
    • Are written to Oracle owned object storage (not visible to customers)
    • Backup window is defined by Oracle
      • New backup window time will be between midnight and 6 AM in the time zone of the DS's region
      • To migrate yours to the new behavior, contact Oracle Support 
    • All backups are encrypted with the same master key used for Transparent Data Encryption (TDE) wallet encryption.  
  • Automatically retried
    • Oracle will get notified if the job is stuck

High Availability (HA)

  • Cloud Infrastructure HA
    • Region with 3 Availability Domain architecture
      • While the availability domains provide the facility for high availability, regions provide the basis for disaster recovery
    • Fully redundant and non-blocking Networking Fabric
  • Database HA
    • Disk Redundancy
      • Normal (2-way mirroring) vs High (3-way mirroring―recommended for production) 
    • Database RAC option
    • Automated Data Guard within and across ADs
Read Oracle's whitepaper on HA for more information.

Scalability

  • Exadata 
    • Two kinds of scaling operations are supported for an Exadata DB system:
      • Scaling within an Exadata DS lets you modify compute node processing power within the system.
      • Scaling across Exadata DS configurations lets you move to a different configuration, for example, from a  ¼  to a ½ rack.
    • To learn how to scale an Exadata DS, see To scale an Exadata DB system.
  • Bare Metal 
    • # of CPU cores can be scaled
    • Total raw storage is fixed based on a chosen shape
      • However, the amount of usable storage on the BM DS can be affected by options like 2- or 3-way mirroring and the space allocated for data files.
  • Virtual Machine 
    • 1-node or 2-node RAC 
    • Storage can be scaled
      • For 2-node RAC VM DB systems, storage capacity is shared between the nodes.
    • # of CPU cores on an existing VM DS cannot be changed.

References

  1. Overview of Database Service (OCI)
  2. Recovering a Database from Object Storage
  3. Developer Tools (OCI)
  4. Updating a DB System (OCI)
    • Includes information and instructions on how to update the OS of a bare metal or virtual machine DB system.
  5. Updating an Exadata DB System (OCI)
  6. Securing Database (OCI)
    • Includes information on security best practices for databases in Oracle Cloud Infrastructure.
  7. OCI Database Service Troubleshooting 
  8. Oracle Cloud Infrastructure Object Storage FAQ
  9. Oracle Database CLI Reference (dbcli)
  10. Standalone Backups (OCI)
  11. Backing Up to Oracle Cloud Infrastructure Object  (OCI)
  12. Migrating Databases to the Cloud (OCI)
  13. Developer Tools (OCI)
  14. Introduction to Oracle Automatic Storage Management (ASM)
  15. Best Practices for Deploying High Availability Architecture on Oracle Cloud Infrastructure (must read)
  16. OCI API Documentation 

1 comment:

  1. Thanks for sharing this informative article on OCI―Knowing Database Service Basics in detail with important screenshot. If you have any requirement to Hire Database Managers for your project. Please visit us.

    ReplyDelete