Oracle DBA
Oracle DBaaS 1z0-160 part 18:- Patching single instance in oracle cloud
Patching from DB console
1.Please select highlighted option for checking availability patches using DB Console
2.Please check using “Precheck” option
3.PreCheck result may fail due to below errors
4.Upgrade the DBPATCHM version from server to make precheck successful
[root@ORCL dbpatchm]# rpm -qa|grep -i dbaastools
dbaastools-1.0-1+18.1.4.0.0_180123.1336.x86_64
[root@ORCL dbpatchm]# dbaascli dbpatchm –run -list_tools -cli
[root@ORCL dbpatchm]# dbaascli dbpatchm –run -toolsinst -rpmversion=18.1.4.1.0_180312.1800
DBAAS CLI version 1.0.0
[root@ORCL dbpatchm]# rpm -qa|grep -i dbaastools
Dbaastools-1.0-1+18.1.4.1.0_180312.1800.x86_64
5.Now run Precheck again and it will show successful now
6.Now you are ready for starting actual patching
7.Proceed for patching
If you want errors to be ignored during the patching operation, select the Force apply patch option. Then, click Patch.
If the Force apply patch option is selected, patch conflicts or errors discovered during the precheck stage of the patching operation are ignored and the patch will be applied (space permitting). If the option is not selected and conflicts or errors are discovered, the patch will not be applied.
8.Please check status of patch apply progress from “Activity” tab.
9.You may check the log file while instance being patched
[root@MYTST dbpatchm]# pwd
/var/opt/oracle/log/dbpatchm
[root@MYTST dbpatchm]# tail -100f dbpatchm_2018-04-03_03:39:26.log
inflating: 26925311/26713565/files/lib/libserver12.a/ktsp.o
inflating: 26925311/26713565/files/lib/libserver12.a/kkpo.o
inflating: 26925311/26713565/files/lib/libserver12.a/kjp.o
creating: 26925311/26713565/files/lib/libasmclntsh12.a/
10.Please check the final status after patching
Patching manually from server command line.
1.Please check available patches
[root@MYTST ~]# 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_2018-04-06_11:06:52.log
Config file is /var/opt/oracle/patch/dbpatchm.cfg
INFO: cdb is set to : yes
INFO: dbversion detected : 12102
INFO: patching type : psu
12.1.0.2.171017, ee
Available patches :26925311-EE
2.Please change the PSU number to 26925311-EE in below configuration file.
[root@MYTST ~]# vi /var/opt/oracle/patch/dbpatchm.cfg
[root@MYTST ~]# dbaascli dbpatchm –run -apply
DBAAS CLI version 1.0.0
Executing command dbpatchm –run -apply -cli
/var/opt/oracle/patch/dbpatchm -apply -cli
3.The dbpatchm.cfg Configuration File
To perform a patching operation, the dbpatchm subcommand reads and acts on the content of the /var/opt/oracle/patch/dbpatchm.cfg patching configuration file. This file, which is created when the database deployment is created, provides information about the locations of various files that may be used in patching operations.
Before using dbpatchm to perform a patching operation, set the value of the psunum key in the dbpatchm.cfg file to the patch ID of the patch to apply.
The dbpatchm.cfg file contains additional keys you can edit to customize the patching operation, and comment lines describing the purpose of each key and how to set its value
Oracle DBaaS 1z0-160 part 17:- Scale UP CPU and Memory in oracle cloud DBaaS
We can scale up/down memory/cpu and storage
Scale/UP or down the compute node
Now scale/up down request has been accepted
Oracle DBaaS 1z0-160 part 16 :-Attach storage volume to the node from compute classic
The following points need to be considered when you add new storage volume.
A compute node can have a maximum of ten storage volumes attached to it.
You can create a storage volume from 1 GB to 2048 GB in size, in increments of 1 GB.
If the database deployment to which you attach this temporary storage is restarted or is stopped and then started, the storage volume becomes detached from the compute node and you must reattach it.
After reattaching the storage volume, you must then connect to the compute node and remount it.
If the compute node is rebooted, such as when following the instructions in Rebooting a Compute Node , the temporary storage becomes unmounted and you must remount it.
You can attach storage volume to the node from compute classic .You need to select correct site to show instance.
Now go to “Storage” tab and select “Create Storage Volume”
Please specify below input to create new stoarge
Now you can attach the storage volume to the instance using below option
Now /dev/xvdi storage volume will be appeared
The screen will explain how you can create partition
Please create file system and mount now
Please change the /etc/fstab entry to mount /u06 automatically after restart
Oracle DBaaS 1z0-160 part 15 :- Extend Data Storage volume without creating new volume in Oracle cloud
You also have option to Extend Data Storage volume without creating new volume
Once the extend operations complete,you can see your existing storage mount point will be increase.
Oracle DBaaS 1z0-160 part 14: Adding temporary storage/Scale up storage
Scale up storage consideration
When creating a database deployment on Oracle Database Cloud Service, you choose the amount of usable data storage you want for your database. You can create a database of up to 1200 GB with backups to both cloud and local storage or up to 2048 GB (2 TB) with backups to cloud storage only or no backups
By adding more storage, you can create much larger databases:
- In Oracle Cloud Infrastructure Classic, which supports 5 scale-up operations, you can create a database of up to 4.7 TB with backups to both cloud and local storage or up to 10 TB (7.7 TB in Oracle RAC deployments) with backups to cloud storage only or no backups.
- In Oracle Cloud Infrastructure, which supports 28 scale-up operations, you can create a database of up to 19 TB with backups to both cloud and local storage or up to 48 TB with backups to cloud storage only or no backups. However, if you need databases of such large sizes, you should consider using Oracle Database Exadata Cloud Service instead of Oracle Database Cloud Service.
You may use Scale Up/Down option to increase your storage volume
Please provide how much additional storage you need and select option “Create New Storage Volume”
Now your Scale up/down request accepted
Now please note your instance went is “Service maintenance” mode and storage is increased to 159GB
Please check status from “Activity” tab and refresh to reflect current status.
Please note your new storage mount point has been created as /u05 .This is very simple to add new stoarge.
Oracle DBaaS 1z0-160 part 13:Changing sys/system password in Oracle cloud
[oracle@ORCL admin]$ dbaascli database changepassword
DBAAS CLI version 1.0.0
Executing command database changepassword
Enter username whose password change is required: system
Enter new password:
Re-enter new password:
Successfully changed the password for user system
[oracle@ORCL admin]$ sqlplus system/Bppimt#123@orcl
SQL*Plus: Release 12.1.0.2.0 Production on Tue Mar 27 12:03:55 2018
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Last Successful login time: Sun Mar 18 2018 06:06:12 +00:00
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 – 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Advanced Analytics
and Real Application Testing options
SQL>
Oracle DBaaS 1z0-160 part 12:Clone Oracle cloud database using Snapshot
On database deployments hosting a single-instance database, Oracle Database Cloud Service supports the creation of storage snapshots, which you can then use to create new database deployments called linked clones. When you create a storage snapshot, the database deployment is put into maintenance status and a snapshot of all the storage volumes for the deployment is taken. Then, when you create a linked clone deployment, Database Cloud Service creates a new database deployment whose storage volumes are from the snapshot. Using the “copy on write” technology that Oracle Compute Cloud Service supports for storage volume snapshots, the file data on the linked clone deployment can change without changing the snapshot itself. Thus, you can create several linked clones from the same snapshot to use for application testing or branched application development work.
You cannot delete a snapshot that has linked clone database deployments created from it. You must first delete the linked clone deployments, as described in Deleting a Database Deployment.
First create storage snapshot and provide “snap1” name
Now press “create” to create storage snapshot
You can note that snap1 is created now
Now you can create database clone using “snap1” snapshot
Now you can create instance with this snapshot
Please review all information before create
Oracle DBaaS 1z0-160 part 11: Starting and Stopping Oracle Database deployment
What happens when you stop database in Oracle cloud
When you stop a Database Cloud Service database deployment, no access to it is possible and you can perform no management operations on it except to start it or to delete it.
Stopping a database deployment is similar to turning off your personal computer: it has no computing capabilities because the CPU and RAM have no power, but all its other resources—disk drives and the data they contain, static IP reservations, and so on—
remain and are ready to be put back into use when power is restored.
When database deployment is stopped, its CPU and RAM (an Oracle Compute Cloud Service instance) are stopped. As a consequence, it consumes no OCPU or memory resources and so metering and billing of these resources stop. However, all the other
resources of the database deployment continue to exist and so continue to be metered and billed, including:
- Oracle Compute Cloud Service resources such as storage volumes and IP address reservations
- Oracle Storage Cloud Service storage space used by the database deployment’s backups to the Oracle Cloud (if the database deployment was being backed up to cloud storage)
Additionally, when database deployment is stopped, backups of it are not performed.
What happens when you start database in oracle cloud
When you start a stopped Database Cloud Service database deployment, access to it becomes possible again and you can perform management operations on it such as scaling and patching.
Starting a stopped database deployment is similar to turning your personal computerback on: its computing capabilities are restored because the CPU and RAM again have power, and all its other resources are put back into use.
When database deployment is started:
1.An Oracle Compute Cloud Service instance of the appropriate compute shape (OCPU and memory) is allocated to it
2.All other Compute Cloud Service resources associated with it when it was created or as the result of a scaling operation are reattached to it.
3.The allocated Oracle Compute Cloud Service instance is started.
After these steps complete, the database deployment is running and available.Because the started database deployment again consumes OCPU and memory resources, metering and billing of these resources resume
The options for start/stop and restart
Oracle DBaaS 1z0-160 part 10 :VNC setup to connect directly to Oracle cloud database VM
1.Please install tigervnc-server using yum and create VNC user and password
[root@ORCL ~]# yum install tigervnc-server xorg-x11-fonts-Type1
[root@ORCL ~]# useradd elinuxbook
[root@ORCL ~]# passwd elinuxbook
[root@ORCL ~]# su – elinuxbook
[elinuxbook@ORCL ~]$ vncpasswd
2.Configure display to proper resolution and user “elinuxbook”
[root@ORCL ~]#vi /etc/sysconfig/vncservers
# VNCSERVERS=”2:myusername”
# VNCSERVERARGS[2]=”-geometry 800×600 -nolisten tcp -localhost”
VNCSERVERS=”1:elinuxbook”
VNCSERVERARGS[1]=”-geometry 1440×900″
[root@ORCL ~]# /etc/init.d/vncserver start
Creating default startup script /home/elinuxbook/.vnc/xstartup
Starting applications specified in /home/elinuxbook/.vnc/xstartup
Log file is /home/elinuxbook/.vnc/ORCL:1.log
[ OK ]
[root@ORCL ~]# chkconfig –level 35 vncserver on
[root@ORCL ~]# chkconfig –list vncserver
vncserver 0:off 1:off 2:off 3:on 4:off 5:on 6:off