1 / 56

Are You Ready For Living In The Oracle Cloud - 2

Are You Ready For Living In The Oracle Cloud - 2. HariPrasath Rajaram. T oday’s A genda. R ecap F irst S ession F ile S ystem A ccessing O racle S QL D eveloper C loning I nstance A nd S torage S napshot P atching D atabase C loud S ervice

darr
Télécharger la présentation

Are You Ready For Living In The Oracle Cloud - 2

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. Today’s Agenda • Recap FirstSession • File System • Accessing Oracle SQLDeveloper • Cloning Instance And Storage Snapshot • Patching Database Cloud Service • Migrating Oracle Databases To Database Cloud Service

  3. Recap First Session

  4. Oracle Cloud DatabaseFile System

  5. Oracle Cloud Database File System /u01 – Local file system – Oracle software binaries, DIAGNOSTIC_DEST /u02 – Cloud Storage – Database Files, Change tracking file /u03 – Cloud Storage – Fast Recovery Area, backup files, control file copy /u04 – Cloud Storage – Redo log files, Temporary files On RAC systems, /u02, /u03, /u04 are ACFS.

  6. Oracle Cloud Database File System To increase or decrease the size of /u02, /u03 or /u04 file systems, use the “Scale Up or Down Service” menu

  7. Oracle Cloud Database File System SPFileis in the standard location with the usual name: /u01/app/oracle/product/12.2.0/dbhome_1/dbs/spfileCDDB01.ora Two Control files: /u02/app/oracle/oradata/CDDB01/control01.ctl /u03/app/oracle/fast_recovery_area/CDDB01/control02.ctl Fast Recovery Area where backups are written: /u03/app/oracle/fast_recovery_area Diagnostic Destination: /u01/app/oracle Automatic Diagnostic Repository home: /u01/app/oracle/diag/rdbms/cddb01/CDDB01 Alert log and trace files location: /u01/app/oracle/diag/rdbms/cddb01/CDDB01/trace/

  8. Oracle Cloud Database File System Software and files used to build the Cloud Instance VM /scratch/db Backup configuration files: /var/opt/oracle/ocde/assistants/bkup/ /home/oracle/bkup/CDDB01 Backup log files: /var/opt/oracle/log/bkup/ On Demand backup: /var/opt/oracle/bkup_api/bkup_api Weekly cronjob – Cleanup log files /var/opt/oracle/cleandb/cleandblogs.pl

  9. Accessing Oracle SQL Developer

  10. Accessing Oracle SQL Developer 1.Start Oracle SQL Developer 2. In the Connections view click on the + icon to create a new DB connection 3. Use the public IP address, the listener port and the service name details obtained in Identifying Oracle DB Cloud Service in use to fill out the form. ClickTest and, when succeeded, click Connect.

  11. Accessing Oracle SQL Developer

  12. Cloning Instance And Storage Snapshot

  13. Cloning Instance And Storage Snapshot

  14. Cloning Instance And Storage Snapshot

  15. Cloning Instance And Storage Snapshot

  16. Cloning Instance And Storage Snapshot

  17. Cloning Instance And Storage Snapshot

  18. Cloning Instance And Storage Snapshot

  19. Managing The Log And Diagnostic Files

  20. Managing The Log And Diagnostic Files Location of Diagnostic and Log Files When a database deployment is created on Oracle Database Cloud Service, log files from the creation operation are stored in subdirectories of /var/opt/oracle/log. By default, Oracle Database trace files and log files are stored in subdirectories of /u01/app/oracle/diag.

  21. Managing The Log And Diagnostic Files The software components in Oracle Database Cloud Service generate a variety of log and diagnostic files, and not all these files are automatically archived and purged. Thus, managing the identification and removal of these files to avoid running out of file storage space is an important administrative task. Database deployments that host single-instance databases include the cleandblogs script to simplify this administrative task. This script runs weekly as a crontab job to archive key files and remove old log and diagnostic files. It uses a configuration file named cleandblogs.cfg to determine how long to retain each kind of log or diagnostic file. You can edit this file to change the default retention periods. This file is located at /var/opt/oracle/cleandb/cleandblogs.cfg.

  22. Managing The Log And Diagnostic Files

  23. Managing The Log And Diagnostic Files Archiving Alert Logs and Listener Logs When cleaning up alert and listener logs, cleandblogs first archives and compresses the logs, operating as follows: The current log file is copied to an archive file that ends with a date stamp. The current log file is emptied. The archive file is compressed using gzip. Any existing compressed archive files older than the retention period are deleted.

  24. Managing The Log And Diagnostic Files Running the cleandblogs Script Manually For detailed instructions, see Connecting to a Compute Node Through Secure Shell (SSH). Change to the directory containing the cleandblogs script: $ cd /var/opt/oracle/cleandb Run the cleandblogs script: $ ./cleandblogs.pl When running the script manually, you can specify an alternate configuration file to use instead of cleandblogs.cfg by using the --pfile option: $ ./cleandblogs.pl --pfileconfig-file-name Close your connection to the compute node: $ exit

  25. Patching Database Cloud Service

  26. Patching Database Cloud Service

  27. Patching Database Cloud Service [opc@dev12c ~]$ sudo -s [root@dev12c opc]# dbaasclidbpatchm --run -list_patches DBAAS CLI version 1.0.0 Executing command dbpatchm --run -list_patches -cli /var/opt/oracle/patch/dbpatchm -list_patches -cli Starting DBPATCHM Logfile is /var/opt/oracle/log/dbpatchm/dbpatchm_2018-02-23_13:27:43.log Config file is /var/opt/oracle/patch/dbpatchm.cfg INFO: cdb is set to : yes INFO: dbversion detected : 12201 INFO: patching type : psu 12.2.0.1.0, ee Available patches :26609817-EE Available patches :26710464-EE Available patches :24824889-EE Available patches :27105253-EE No applicable patches found. dbpatchm Execution completed

  28. Patching Database Cloud Service [root@dev12c opc]# rpm -qa|grep -i dbaastools dbaastools-1.0-1+17.3.5.0.0_170731.1639.x86_64 [root@dev12c opc]# clear [root@dev12c opc]# dbaasclidbpatchm --run -list_tools DBAAS CLI version 1.0.0 Executing command dbpatchm --run -list_tools -cli /var/opt/oracle/patch/dbpatchm -list_tools -cli Starting DBPATCHM Logfile is /var/opt/oracle/log/dbpatchm/dbpatchm_2018-02-23_13:35:57.log Config file is /var/opt/oracle/patch/dbpatchm.cfg INFO: cdb is set to : yes INFO: dbversion detected : 12201 INFO: patching type : psu Patchid: 17.4.5.0.0_171120.1542 Patchid: 18.1.1.0.0_171130.0801 Patchid: 18.1.1.1.0_180122.0952 Patchid: 18.1.2.1.0_180215.0915 dbpatchm Execution completed

  29. Patching Database Cloud Service [root@dev12c opc]# dbaasclidbpatchm --run -toolsinst -rpmversion=18.1.2.1.0_180215.0915 DBAAS CLI version 1.0.0 Executing command dbpatchm --run -toolsinst -rpmversion=18.1.2.1.0_180215.0915 -cli /var/opt/oracle/patch/dbpatchm -toolsinst -rpmversion=18.1.2.1.0_180215.0915 -cli Starting DBPATCHM Logfile is /var/opt/oracle/log/dbpatchm/dbpatchm_2018-02-23_13:38:48.log WARN : Parameter toolsinst passed via cmdline is not a valid parameter. Please check the usage. Config file is /var/opt/oracle/patch/dbpatchm.cfg INFO: cdb is set to : yes INFO: dbversion detected : 12201 INFO: patching type : psu INFO: existing dbaastools version - dbaastools-1.0-1+17.3.5.0.0_170731.1639.x86_64 INFO: updated dbaastools rpm to - dbaastools-1.0-1+18.1.2.1.0_180215.0915.x86_64 dbpatchm Execution completed [root@dev12c opc]# rpm -qa|grep -i dbaastools dbaastools-1.0-1+18.1.2.1.0_180215.0915.x86_64

  30. Patching Database Cloud Service [opc@dev12c patch]$ cat /var/opt/oracle/patch/status.txt # This is a patching tool generated file from OPC - please do not edit this prereq=SUCCESS setup= config=

  31. Patching Database Cloud Service

  32. Patching Database Cloud Service Viewing Available Patches Viewing Available Patches by Using the Oracle Database Cloud Service Console 1. Open the Oracle Database Cloud Service console. 2. Click the database deployment on which you want to check patching. The Oracle Database Cloud Service Overview page is displayed. 3. Click the Administration tile and then click the Patching tab. The Oracle Database Cloud Service Patching page is displayed. A list of patches you can apply appears in the Available Patches section.

  33. Patching Database Cloud Service You can use the dbpatchm subcommand of the dbaascli command to check whether any patches are available. 1. Connect as the opc user to the compute node. 2. Start a root-user command shell: $ sudo -s # 3. View available patches: # dbaascli dbpatchm --run -list_patches #dbpatchmdg -list_patches A patch update is available if the command response includes the "INFO: images available for patching" message. The patch ID will be displayed as part of the command response. This patch ID can be used to download and apply the patch.

  34. Checking Prerequisites Before Applying a Patch Before you apply a patch, you can check its prerequisites to make sure that it can Be successfully applied by using the Oracle Database Cloud Service console The prerequisites-checking operation: • Confirms that the patch is available for download. • Verifies that there is enough space in the /u01 directory to apply the patch. • Compares the patch’s prerequisites to the database deployment by running opatch prereq commands.

  35. Checking Prerequisites Before Applying a Patch Before You Begin Before checking patch prerequisites, make sure the database deployment has the latest cloud tooling. Some patches require a certain minimum level of cloud tooling; for example, the October 2016 PSU requires cloud tooling version 16.4.5.1 or later. For more information, see Updating the Cloud Tooling on Database Cloud Service. Procedure 1. Connect as the opc user to the compute node. For detailed instructions, see Connecting to a Compute Node Through Secure Shell (SSH). 2. Start a root-user command shell: $ sudo -s # 3. Check the prerequisites of a patch: # dbpatchmdg -precheck_asyncpatch_id Additional options can be specified. See dbpatchmdg precheck_async The prerequisites report displays.

  36. Updating The Cloud Tooling By Using TheDbpatchm 1)Connect as the opc user to the compute node. 2)Start a root-user command shell: $ sudo -s 3)Check whether any cloud tooling updates are available: # dbaascli dbpatchm --run -list_tools 4)In the command response, locate the patch ID of the cloud tooling update. The patch ID is listed as the "Patchid" value. If multiple patches are listed, choose the latest one. 5)Check your current version of cloud tooling: # rpm -qa|grep -i dbaastools dbaastools-version_number-release_number

  37. Updating The Cloud Tooling By Using TheDbpatchm 6)After confirming that the latest update is newer than your current version, download and apply the patch containing the cloud tooling update: # dbaascli dbpatchm --run -toolsinst -rpmversion=patch-id where patch-id is the patch ID you located earlier. Note: if you get a warning message indicating that the toolsinst parameter is invalid, you can ignore the message. 7)Reset the backup configuration: # /var/opt/oracle/ocde/assistants/bkup/bkup 8)Exit the root-user command shell and disconnect from the compute node: # exit 9)If you are updating cloud tooling on a database deployment hosting a Data Guard configuration, repeat the preceding steps on the other compute node of the deployment.

  38. Applying a Patch To apply a Patch Oracle Database on the Oracle Cloud http://bijoos.com/oraclenotes/date/2016/12/page/2 http://www.gokhanatil.com/2016/12/how-to-patch-oracle-database-on-the-oracle-cloud.html

  39. Migrating Oracle Databases To Database Cloud Service

  40. Migrating Oracle Databases to Database Cloud Service • You can migrate your on-premises Oracle Database database to an Oracle Database • Cloud database using a number of different methods that use several different tools. • Not all migration methods apply to all migration scenarios. Many of the migration methods apply only • if specific characteristics of the source and destination databases match or are compatible. Moreover, • additional factors can affect which method you choose for your migration from among the methods that are • technically applicable to your migration scenario. • On-premises database version • Oracle Database Cloud database version • On-premises host operating system and version • On-premises database character set • Quantity of data, including indexes • Data types used in the on-premises database • Storage for data staging • Acceptable length of system outage • Network bandwidth

  41. Migration/Upgrade Methods Important factors – Source/target version – Source/target platform – Downtime requirements – Source database architecture – Desire to adopt new features

  42. Migrate Using Backup/Restore

  43. Migrate Using Data Guard

  44. Migrate Using Pluggable Databases (1): Unplug/Plug

  45. Migrate Using Pluggable Databases (1): Unplug/Plug

  46. Migrate Using Pluggable Databases (2): Remote Cloning With a source version of 12.2 this becomes hot cloning!

  47. Migrate Using Pluggable Databases (2): Remote Cloning

  48. Migrate Using Pluggable Databases (3): Clone a Non-CDB With a source version of 12.2 this also becomes hot cloning

  49. Migrate Using Pluggable Databases (3): Clone a Non-CDB

  50. Upgrade/Migrate Using Data Pump Note: For 9i and earlier source use exp/imp

More Related