Presentation is loading. Please wait.

Presentation is loading. Please wait.

Are You Ready For Living In The Oracle Cloud - 2

Similar presentations


Presentation on theme: "Are You Ready For Living In The Oracle Cloud - 2"— Presentation transcript:

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

2 Today’s Agenda Recap First Session File System
Accessing Oracle SQL Developer Cloning Instance And Storage Snapshot Patching Database Cloud Service Migrating Oracle Databases To Database Cloud Service

3 Recap First Session

4 Oracle Cloud Database File 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
SPFile is 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. Click Test 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 Parameter
Description and Default Value AlertRetention Alert log (alert_instance.log) retention value in days. Default value in file: 14 ListenerRetention Listener log (listener.log) retention value in days. AuditRetentionDB Database audit (*.aud) retention value in days. CoreRetention Core dump/files (*.cmdp*) retention value in days. Default value in file: 7 TraceRetention Trace file (*.tr* and *.prf) retention value in days. obkupLogRetention obkup log file retention in days. Default value in file: 30

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 --pfile config-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
~]$ sudo -s opc]# dbaascli dbpatchm --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_ _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 , ee Available patches : EE Available patches : EE Available patches : EE Available patches : EE No applicable patches found. dbpatchm Execution completed

28 Patching Database Cloud Service
opc]# rpm -qa|grep -i dbaastools dbaastools _ x86_64 opc]# clear opc]# dbaascli dbpatchm --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_ _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 : _ Patchid : _ Patchid : _ Patchid : _ dbpatchm Execution completed

29 Patching Database Cloud Service
opc]# dbaascli dbpatchm --run -toolsinst -rpmversion= _ DBAAS CLI version 1.0.0 Executing command dbpatchm --run -toolsinst -rpmversion= _ cli /var/opt/oracle/patch/dbpatchm -toolsinst -rpmversion= _ cli Starting DBPATCHM Logfile is /var/opt/oracle/log/dbpatchm/dbpatchm_ _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 _ x86_64 INFO: updated dbaastools rpm to - dbaastools _ x86_64 dbpatchm Execution completed opc]# rpm -qa|grep -i dbaastools dbaastools _ x86_64

30 Patching Database Cloud Service
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. Database Environment Command Oracle Single-instance database dbaascli dbpatchm --run -list_patches Oracle Data Guard dbpatchmdg -list_patches

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 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_async patch_id Additional options can be specified. See dbpatchmdg precheck_async The prerequisites report displays.

36 Updating The Cloud Tooling By Using The Dbpatchm
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 The Dbpatchm
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 To apply a Patch Oracle Database on the Oracle Cloud
Applying a Patch To apply a Patch Oracle Database on the Oracle Cloud Single-instance database dbaascli dbpatchm --run -apply Oracle Data Guard dbpatchmdg -apply_async patch_id Oracle Real Application Clusters (RAC) database (DB Home) raccli apply patch -db -tag tag-name -local Oracle Real Application Clusters (RAC) database (Grid Home) raccli apply patch -gi -tag tag-name -local

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
When to use Migration Process No cross-endian Backup to Oracle Database Backup Cloud Service No structural changes Instantiate new cloud instance from backup No upgrade to new version Source version , ,

43 Migrate Using Data Guard
When to use Migration Process No cross-endian Backup to Oracle Database Backup Cloud Service No structural changes Instantiate new cloud instance from backup No upgrade to new version Configure network connection Minimal downtime migration Synchronize on-premises to standby Source version , , Switchover

44 Migrate Using Pluggable Databases (1): Unplug/Plug
When to use Migration Process (Using file copies) No cross-endian Create cloud instance Source version , Unplug PDB on-premises No structural changes Copy files to cloud Source must be a PDB Plug into cloud database Upgrade if moving to new version

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

46 Migrate Using Pluggable Databases (2): Remote Cloning
When to use Migration Process (Using DBMS_FILE_TRANSFER) No cross-endian Create cloud instance Source version , Create dblink from cloud to on premises database No structural changes Clone PDB via dblink Source must be a PDB Upgrade if moving to new version Minimal downtime with hot clone 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
When to use Migration Process No cross-endian Create cloud instance Source version , Create dblink from cloud CDB to on-premises non-CDB No structural changes Clone non-CDB over dblink Migrate from non-CDB to PDB Convert non-CDB to PDB by running noncdb_to_pdb.sql No upgrade to new version 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
When to use Migration Process Cross-endian possible Changes to database structure possible Source version 10g and later Export using expdp Migrate from non-CDB to PDB Copy dumpfiles to cloud Import using impdp Note: For 9i and earlier source use exp/imp

51 Upgrade/Migrate Using Full Transportable Export/Import
When to use Migration Process Cross-endian possible Create cloud instance and PDB Source version and later Export with expdp Migrate from non-CDB to PDB Move data files and metadata to cloud No changes to database structure RMAN CONVERT data files if needed Upgrade to new version possible Import with impdp

52 Upgrade/Migrate Using Full Transportable Export/Import

53 Upgrade/Migrate Using GoldenGate Cloud Service
When to use Migration Process Cross-endian possible Create cloud instance and PDB Source version 8i and later Configure GoldenGate cloud service Migrate from non-CDB to PDB Migrate using another method (data pump, TTS, etc.) Changes to database structurepossible Synchronize changes Minimal downtime migration Switch clients to cloud database Upgrade to new version possible

54 Upgrade/Migrate Using GoldenGate Cloud Service

55 Choose the Right Migration Method

56


Download ppt "Are You Ready For Living In The Oracle Cloud - 2"

Similar presentations


Ads by Google