Are You Ready For Living In The Oracle Cloud – 1 HariPrasath Rajaram

54 Slides3.08 MB

Are You Ready For Living In The Oracle Cloud - 1 HariPrasath Rajaram

Training Objective Introduction to cloud Creating database Cloud Service Administering Database Cloud Service Backing Up and Restoring Databases on Database Cloud Service Data Guard in Oracle Cloud Using Oracle DBaaS Monitor Patching Database Cloud Service Migrating Oracle Databases to Database Cloud Service

Outcome expected Understanding about Oracle Cloud Database Services Getting started to create cloud database services To learn Administrating and Monitoring the cloud database services To learn about Backup and patching on cloud database services Disaster Recovery to the Oracle Cloud Migrating from on-premise database to Cloud

Introduction to cloud

Introduction to cloud

Introduction to cloud

Introduction to cloud

Introduction to cloud

Introduction to cloud

What Is It? Oracle Database Cloud Service gives you a complete Oracle database instance in a virtual machine (VM). It’s the same familiar Oracle database—now in a cloud. You have full access to the features and operations that are available with Oracle Database, but Oracle hosts the VM and cloud storage. And you can perform some database maintenance and management operations with the easy-to-use cloud portal or command-line interface.

Service levels Two service levels are available: The Oracle Database Cloud Service - Virtual Image level includes Oracle Database and supporting software. You have to install this software yourself, and you are responsible for all maintenance operations for this software. You have root privilege, so you can load and run software in the compute environment. You have full administrative privileges for the Oracle database. The Oracle Database Cloud Service level also includes Oracle Database and supporting software. However, the software is installed for you, an Oracle database is created using values you provide when creating the database deployment, and the database is started.

Metering Frequency When creating a database deployment on Oracle Database Cloud Service, you choose one of the following metering frequencies: Hourly Pay only for the number of hours used during your billing period.You cannot switch a deployment from hourly to monthly metering frequency after it is created. Monthly Pay one price for the full month irrespective of the number of hours used. For deployments that are started in the middle of a month, the price is pro-rated; you pay only for the partial month from the start date.You cannot switch a deployment from monthly to hourly metering frequency after it is created.

Oracle Database Software Release When creating a database deployment on Oracle Database Cloud Service, you choose one of the following Oracle Database software releases: Oracle Database 11g Release 2 Oracle Database 12c Release 1 Oracle Database 12c Release 2 Oracle Database 18c Release 1

Oracle Database Software Edition When creating a database deployment on Oracle Database Cloud Service, you choose one of the following Oracle Database software editions. For detailed information about the included Oracle Database features, options and packs, see the Permitted Features section of Oracle Database Licensing Information User Manual. Standard Edition—Oracle Database Standard Edition, which delivers unprecedented ease of use, power, and performance for workgroup, department level, and Web applications. It includes all the facilities necessary to build business-critical applications. Enterprise Edition—Oracle Database Enterprise Edition, which provides the performance, availability, scalability, and security required for mission-critical applications such as high-volume online transaction processing (OLTP) applications, query-intensive data warehouses, and demanding Internet applications. Enterprise Edition - High Performance—provides all the features of Enterprise Edition, plus many of the available Oracle Database options and management packs. Enterprise Edition - Extreme Performance—provides all the features of Enterprise Edition, plus all of the Oracle Database options and management packs appropriate for use in Oracle Database Cloud Service.

Oracle Database Type Single Instance — A single Oracle Database instance and database data store hosted on one compute node. For more information about this type, see Characteristics of an Oracle Database Cloud Deployment. Database Clustering with RAC— A two-node clustered database using Oracle Real Application Clusters technology; two compute nodes each host an Oracle Database instance, and the two instances access the same shared database data store. For more information about this type, see Characteristics of an Oracle Database Cloud Service Deployment Using Oracle RAC.About Database Cloud Service Database Deployments 1-4 Oracle Cloud Using Oracle Database Cloud Service Single Instance with Data Guard Standby—Two single-instance databases, one acting as the primary database and one acting as the standby database in an Oracle Data Guard configuration. For more information about this type, see Characteristics of a Database Deployment Using Oracle Data Guard. Database Clustering with RAC and Data Guard Standby—Two two-node Oracle RAC databases, one acting as the primary database and one acting as the standby database in an Oracle Data Guard configuration. For more information about this type, see Characteristics of an Oracle Database Cloud Service Deployment Using Oracle RAC and Oracle Data Guard.

Oracle Database Type Not all types are available with all combinations of service level and software edition: Single Instance is the only type supported by the Oracle Database Cloud Service -Virtual Image service level. Single Instance is the only type supported by the Standard Edition software edition. The two types that use Oracle RAC are available only with Enterprise Edition -Extreme Performance software edition.

Creating Database Cloud Service

ating Database Cloud Service To create a database deployment on Oracle Database Cloud Service, Procedure 1) 2) 3) 4) 5) Open the Oracle Database Cloud Service console. Click Create Service. On the Service Details page, complete the Database Configuration On the Service Details page, complete the Backup and Recovery Configuration section On the Service Details page, complete the Initialize Data From Backup

ating Database Cloud Service Oracle Database Cloud - Database as a Service http:// www.oracle.com/webfolder/technetwork/tutorials/obe/cloud/dbaas/obe dbaas QS/ oracle database cloud service dbaas quick start.html#section1 https://www.youtube.com/embed/cBBqrRTaMDw?autoplay 1

Administering Database Cloud Service

nistering Database Cloud Service Adding an SSH Public Key Should the need arise, you can add an SSH public key to your Oracle Database Cloud Service environment. After you add the public key, you can provide the matching private key to connect to a compute node associated with the Database Cloud Service instance as either the opc or the oracle user To add an SSH public key: 1)Open the Oracle Database Cloud Service 2)From the menu for a database deployment, select SSH Access.The Add New Key overlay is displayed with its Key value field displaying the most recent SSH public key. 3)Specify the new public key using one of the following methods: Select Upload a new SSH Public Key value and click Choose File to select a file that contains the public key.

nistering Database Cloud Service 4)Select Key value. Delete the current key value and paste the new public key into the text area. Make sure the value does not contain line breaks or end with a line break. 5) Click Add New Key.

Administering Database Cloud Service Connecting to a Database Cloud Service (DBaaS) Instance Through an SSH Tunnel http:// www.oracle.com/webfolder/technetwork/tutorials/obe/cloud/dbaas/obe dbaas connecting to an instance/ obe dbaas connecting to an instance.html#overview https://www.youtube.com/embed/dg6KsEsswpk?autoplay 1

Backing Up and Restoring Databases on Database Cloud Service

Backing Up and Restoring Databases on https://docs.oracle.com/en/cloud/paas/database-dbaas-cloud/csdbi/change-backup-config-differentDatabase Cloud Service destination.html#GUID-E7EBDB67-007A-4910-8B5A-A84B5A4AA27E On-demand backup can be performed by running script “/var/opt/oracle/bkup api/bkup api bkup start” as the root user Step:1 [opc@CLDB4ACED ] sudo -s [root@CLDB4ACED opc]# [root@CLDB4ACED opc]# /var/opt/oracle/bkup api/bkup api bkup start DBaaS Backup API V1.5 @2015 Multi-Oracle home - Action : bkup start - logfile: /var/opt/oracle/bkup api/log/bkup api.log API INFO : Backups are not configured on this DB Instance. Nothing to do. * * RETURN CODE:0 ################################################## [root@CLDB4ACED opc]#

Backing Up and Restoring Databases Backup configuration is saved in file /var/opt/oracle/ocde/assistants/bkup/bkup.cfg. Let’s edit the file and on Database Cloud Service add required parameters. Step:2 [opc@CLDB4ACED ] sudo -s [root@CLDB4ACED opc]# [root@CLDB4ACED opc]# cd /var/opt/oracle/ocde/assistants/bkup/ [root@CLDB4ACED bkup]# ls *cfg bkup.cfg [root@CLDB4ACED bkup]# cat bkup.cfg # The bkup.cfg file will hold all the config info for BKUP [root@CLDB4ACED bkup]# cp -p bkup.cfg bkup.cfg.1 [root@CLDB4ACED bkup]# vi bkup.cfg

Backing Up and Restoring Databases on Step:3 Database Cloud Service [root@CLDB4ACED bkup]# cat bkup.cfg # The bkup.cfg file will hold all the config info for BKUP bkup cfg files yes bkup disk yes bkup disk recovery window 2 bkup oss no bkup oss url oss url bkup oss user username bkup oss passwd password bkup oss recovery window 30 Step:4 root@CLDB4ACED bkup]# chown root bkup.cfg [root@CLDB4ACED bkup]# chmod 0600 bkup.cfg

Backing Up and Restoring Databases on Database Cloud Service Step:5 [root@CLDB4ACED bkup]# ./bkup -cfg bkup.cfg Starting BKUP Logfile is /var/opt/oracle/log/bkup/bkup 2016-12-06 17:01:47.log Config file is bkup.cfg dbname: CDDB01 Dataguard configuration Enabled: 0 Mode: PRIMARY Looking for previous configuration: Directory : /home/oracle/bkup/CDDB01 - obkup - dbcfg.spec - log - Found: 3 files - Moving previous configutarion to /home/oracle/bkup/CDDB01 20161206170154 No initial bkup of PFILE needed. Configuring Backup to disk Common RMAN Config

Backing Up and Restoring Databases on Database Cloud Service Instantiating obkup Instantiating dbcfg.spec Configuring backup of Config File Updating Control File Record Keep Time Enabling block change tracking Updating RMAN defaults Adding entry to crontab INFO: Archivelog management enabled. Warning: there are already 1 entries for crontab - 0,30 * * * * root /home/oracle/bkup/CDDB01/obkup -dbname CDDB01 -archivelog Accessing to your Database ID . The DBaaS instance database id is: 4135691349 Deleting unencrypted autobackups. #### Completed Execution. [root@CLDB4ACED bkup]# BKUP DISK is for local disk backup, and enabled local backup by setting this parameter to YES. Local disk backups are written to the Flash Recovery Area, which is /u03/app/oracle/fast recovery area directory. The parameter BKUP OSS is to write backups to Oracle Cloud Storage. The bkup script, backup assistant, created few cron jobs to do the backup periodically.

Backing Up and Restoring Databases on Database Cloud Service Step:6 [root@CLDB4ACED etc]# cat /etc/crontab SHELL /bin/bash PATH /sbin:/bin:/usr/sbin:/usr/bin MAILTO "" HOME / # For details see man 4 crontabs # Example of job definition: # .---------------- minute (0 - 59) # .------------- hour (0 - 23) # .---------- day of month (1 - 31) # .------- month (1 - 12) OR jan,feb,mar,apr . # .---- day of week (0 - 6) (Sunday 0 or 7) OR sun,mon,tue,wed,thu,fri,sat # # * * * * * user-name command to be executed 0,30 * * * * root /home/oracle/bkup/CDDB01/obkup -dbname CDDB01 -archivelog 15 03 * * 6 oracle /var/opt/oracle/cleandb/cleandblogs.pl 54 2 * * * root /var/opt/oracle/bkup api/bkup api bkup start --dbname CDDB01 [root@CLDB4ACED etc]#

Backing Up and Restoring Databases on Database Cloud Service Let’s kick off the backup again. Step:7 [root@CLDB4ACED etc]# /var/opt/oracle/bkup api/bkup api bkup start --dbname CDDB01 DBaaS Backup API V1.5 @2015 Multi-Oracle home - Action : bkup start - logfile: /var/opt/oracle/bkup api/log/bkup api.log ** process started with PID: 23297 ** see log file for monitor progress ------------------------------------Step:8 [root@CLDB4ACED etc]# cat /var/opt/oracle/bkup api/log/bkup api.log Tue, 06 Dec 2016 17:17:25 db35376e-bbd7-11e6-9159-c6b07b253285 STARTING BACKUP REQUEST Tue, 06 Dec 2016 17:17:25 Creating Backup Api registry datatabase Tue, 06 Dec 2016 17:17:25 UUID db35376e-bbd7-11e6-9159-c6b07b253285 written with PID 23297 Tue, 06 Dec 2016 17:17:33 db35376e-bbd7-11e6-9159-c6b07b253285 Checking if CDDB01 resource is available Tue, 06 Dec 2016 17:17:33 db35376e-bbd7-11e6-9159-c6b07b253285 registering request into the database Tue, 06 Dec 2016 17:17:37 db35376e-bbd7-11e6-9159-c6b07b253285 current backups 0 Tue, 06 Dec 2016 17:17:37 db35376e-bbd7-11e6-9159-c6b07b253285 command /home/oracle/bkup/CDDB01/obkup dbname CDDB01 Tue, 06 Dec 2016 17:19:54 db35376e-bbd7-11e6-9159-c6b07b253285 The backup process failed

Backing Up and Restoring Databases on Database Cloud Service Backup failed! This time, it was due to insufficient local storage to hold the backup. Since I chose no backup option, Oracle Cloud Service did not allocate storage to perform backups to /u03 file system. The database was created in ARCHIVELOG mode, and the Cloud Service setup a cron job to remove the archivelog files hourly. It took a while to figure out how to add storage to /u03 file system. More storage is added to the standard file systems by using the “Scale up or down Resources” menu item. Added 50G to “Backup Storage Volume”, which is /u03. 6G volume is now 56G.

Backing Up and Restoring Databases on Database Cloud Service Adding disk space alone is not sufficient, need to increase the Fast Recovery Area as well.

Backing Up and Restoring Databases on Database Cloud Service Though backup is scheduled to run periodically using the cronjobs, lets kick off a backup to verify if the added storage in /u03 resolved the backup issue.

Disaster Recovery to the Oracle Cloud

Disaster Recovery to the Oracle Cloud Why to have DR in Cloud? Cloud service providers has in-built high availability so obvious question that comes to your mind is, why do I need to consider Oracle database disaster recovery for my cloud database or Why should I put my DR database in Cloud? Common Reasons Save costs related to running secondary data center Starting point for your Cloud journey Part of end to end move to Cloud

Disaster Recovery to the Oracle Cloud Primary on Premise, DR in Oracle Cloud Using Oracle cloud as DR brings the obvious benefits related to provisioning and maintaining DR site but it has its own challenges and complexities related to network latency, administration and performance. At high level following steps are performed to do this kind of configuration. Create an Oracle instance in Oracle cloud Perform network configuration to enable on premise DB connectivity with cloud DB Drop database created as part of step 1 Instantiate Standby database using primary DB backup Configure Standby database

Disaster Recovery to the Oracle Cloud Primary and DR both in Oracle Cloud Oracle cloud provides fully automated setup of your primary and Standby database. Here your primary and DR both databases reside in Oracle cloud

Disaster Recovery to the Oracle Cloud Data Guard Provisioning in Oracle Cloud Step 1 Login to Oracle database Cloud Service Wizard Step 2 Select Create Service and Choose Oracle Database Cloud Service in Service Level.

Disaster Recovery to the Oracle Cloud Step 3 Select Required Software release (any of the option 11.2.0.4,12.1.0.2 or 12.2.0.1 can be selected here)

Disaster Recovery to the Oracle Cloud Step 4 Select Required software edition (anything except Standard edition)

Disaster Recovery to the Oracle Cloud Step 5 Fill required details in Service details page and select “Standby Database with Data Guard” and then select High Availability or Disaster Recovery option.

Disaster Recovery to the Oracle Cloud

Disaster Recovery to the Oracle Cloud Performing DB Switchover- Initiating Switchover

Disaster Recovery to the Oracle Cloud Performing DB Switchover- During Switchover

Disaster Recovery to the Oracle Cloud Performing DB Switchover- Using DBaaS CLI [oracle@CloudDBDG-dg01 ] dbaascli dataguard status --details yes DBAAS CLI version 1.0.0 Executing command dataguard status --details yes SUCCESS: Dataguard is up and running { "instances" : [ { "DATABASE TYPE" : "PRIMARY", "PROTECTION MODE" : "MAXIMUM PERFORMANCE", "PROTECTION LEVEL" : "MAXIMUM PERFORMANCE", "ADDITIONAL MESSAGES" : "", "DATABASE NAME" : "ORCL 01", "PENDING APPLY LOG CNT" : 0, "ACTIVE SESSIONS" : "3", "HOST NAME" : "CloudDBDG-dg01", "OPEN MODE" : "READ WRITE" },

Disaster Recovery to the Oracle Cloud Performing DB Switchover- Using DBaaS CLI [oracle@CloudDBDG-dg01 ] dbaascli dataguard switchover DBAAS CLI version 1.0.0 Executing command dataguard switchover Warning: Permanently added 'clouddbdg-dg01-nat,129.152.151.188' (RSA) to the list of known hosts. Warning: Permanently added 'clouddbdg-dg02-nat,129.144.15.205' (RSA) to the list of known hosts. Performing switchover NOW, please wait. New primary database "ORCL 02" is opening. Operation requires startup of instance "ORCL" on database "ORCL 01" Starting instance "ORCL". ORACLE instance started. Database mounted. Switchover succeeded, new primary is "ORCL 02" SUCCESS : Switchover to Standby operation completed successfully [root@CloudDBDG-dg01 opc]# /etc/init.d/ords restart INFO: Stopping Oracle REST Data Services. INFO: Oracle REST Data Services stopped INFO: Starting Oracle REST Data Services. INFO: Oracle REST Data Services started with PID 5860 [root@CloudDBDG-dg01 opc]# exit

Disaster Recovery to the Oracle Cloud Reinstatiate Failed Primary

Using Oracle DBaaS Monitor

Using Oracle DBaaS Monitor DBaaS Monitor

Accessing Oracle DBaaS Monitor Assuming your public IP address were 123.123.123.123 and you've opened the relevant services on the firewall, the following URLs are available. DBaaS Monitor: https://123.123.123.123/dbaas monitor/ Username: dbaas monitor Password: (set during installation) APEX: https://123.123.123.123/ords/pdb1 Workspace: INTERNAL Username : ADMIN Password : (set during installation) Glassfish: https://123.123.123.123:4848/common/index.jsf Username : admin Password : (set during installation) DB Express : https://123.123.123.123:5500/em

Using Oracle DBaaS Monitor Oracle DBaaS Monitor provides monitoring and management of the Oracle database and listener on Oracle Database Cloud Service. Overall, how much storage is allocated to tablespaces, and how much of that storage is used For each tablespace, how much storage is allocated and how much of that storage is used, with additional drill-down capabilities to view segments A real-time graph showing wait events across several selectable categories The alert log, with log searching capabilities A list of open user sessions, with drill-down capabilities to view session details such as the last SQL statement, explain plan, waits, contention, and so on Indication of whether certain database options are enabled Monitoring of current and past SQL Developer PDB uploads A list of the SQL statements that are being monitored in the database, with real time display of details such as the status, duration, degree of parallelism, and so on

Using Oracle DBaaS Monitor DBaaS Monitor also provides the following management capabilities: Start up and shut down the database instance Open and close a pluggable database Create and drop a pluggable database Plug in and unplug a pluggable database Clone a pluggable database Start and stop the listener

Back to top button