By Franck Pachot
.
My first trial was not very good because I had access to Schema as a Service only. Which is not new.
But Oracle Cloud Services is becoming now a reality, available for trial and available for general availability.
Let’s see now how to use Database as a Service.
Creation
My goal here is to see what is the default configuration, so I want a VM with storage and database already configured.
12c of course.
I use minimum storage requirements (given that I’ve chose to install the demo pdb).
I’ve allocated two ‘OCPU’, we’ll see what it means later.
Here is the summary
and my ‘dbi-cdb’ creation is in progress:
Storage
The following volumes have been created:
They use ext4 filesystem:
[oracle@dbi-cdb ~]$ mount
/dev/xvdb2 on / type ext4 (rw,barrier=0)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/xvdb1 on /boot type ext4 (rw)
/tmp on /var/tmp type none (rw,bind)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/dev/xvdc1 on /u01 type ext4 (rw)
/dev/mapper/dataVolGroup-lvol0 on /u02 type ext4 (rw)
/dev/mapper/fraVolGroup-lvol0 on /u03 type ext4 (rw)
/dev/mapper/redoVolGroup-lvol0 on /u04 type ext4 (rw)
[oracle@dbi-cdb ~]$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/xvdb2 16G 7.2G 7.6G 49% /
tmpfs 7.4G 3.6G 3.9G 49% /dev/shm
/dev/xvdb1 194M 91M 94M 49% /boot
/dev/xvdc1 30G 8.5G 20G 31% /u01
/dev/mapper/dataVolGroup-lvol0
25G 7.2G 17G 31% /u02
/dev/mapper/fraVolGroup-lvol0
42G 2.2G 38G 6% /u03
/dev/mapper/redoVolGroup-lvol0
9.9G 151M 9.2G 2% /u04
OCPU
I’ve defined two OCPU in the configuration above. What is it?
Definition from Oracle is:
OCPU is defined as the CPU capacity equivalent of one physical core of an Intel Xeon processor with hyper threading enabled. Each OCPU corresponds to two hardware execution threads, known as vCPUs
However, from the system it looks like one socket with one core and 4 threads:
[oracle@dbi-cdb ~]$ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 4
Core(s) per socket: 1
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 62
Stepping: 4
CPU MHz: 2992.844
BogoMIPS: 5985.68
Hypervisor vendor: Xen
Virtualization type: full
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 25600K
NUMA node0 CPU(s): 0-3
Here is what it looks like from /proc/cpuinfo. There are 4 entries like that:
processor : 3
vendor_id : GenuineIntel
cpu family : 6
model : 62
model name : Intel(R) Xeon(R) CPU E5-2690 v2 @ 3.00GHz
stepping : 4
cpu MHz : 2992.844
cache size : 25600 KB
physical id : 0
siblings : 4
core id : 1
cpu cores : 1
apicid : 3
initial apicid : 3
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu de tsc msr pae cx8 sep cmov pat clflush mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good nopl pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 x2apic popcnt aes xsave avx f16c rdrand hypervisor lahf_lm ida arat epb xsaveopt pln pts dts fsgsbase erms
bogomips : 5985.68
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
Good to see SSE4 features. They are used by In-Memory and are not always implemented by visualization.
Install
The configuration is still in progress:
and I can see it with ‘top’:
top - 20:37:09 up 31 min, 1 user, load average: 1.28, 1.27, 1.13
Tasks: 136 total, 4 running, 110 sleeping, 0 stopped, 22 zombie
Cpu(s): 4.3%us, 28.2%sy, 0.0%ni, 67.4%id, 0.1%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 15435892k total, 14293320k used, 1142572k free, 72448k buffers
Swap: 4194300k total, 852k used, 4193448k free, 13577748k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
13676 oracle 20 0 6379m 2.5g 2.5g R 99.4 16.9 0:03.10 ora_sa00_CDB
13672 oracle 20 0 6379m 121m 119m R 14.6 0.8 0:00.45 ora_mman_CDB
13662 oracle -2 0 6379m 18m 16m S 1.0 0.1 0:00.06 ora_vktm_CDB
13696 oracle 20 0 6385m 25m 16m S 0.7 0.2 0:00.02 ora_dbw0_CDB
13724 oracle 20 0 6382m 19m 17m S 0.7 0.1 0:00.02 ora_lreg_CDB
13747 oracle 20 0 6383m 26m 23m S 0.7 0.2 0:00.02 oracleCDB (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
12499 oracle 20 0 140m 8680 1340 S 0.3 0.1 0:00.13 /usr/bin/perl /var/opt/oracle/ocde/assistants/dbda/dbda -out /var/opt/o
13654 oracle 20 0 6379m 21m 19m S 0.3 0.1 0:00.03 ora_pmon_CDB
This ‘dbda’ assistant is something interesting, very interesting, but that’s for another post.
Connect
The configuration is completed.
Let’s see the version:
[oracle@dbi-cdb ~]$ $ORACLE_HOME/OPatch/opatch lsinventory
...
Oracle Database 12c 12.1.0.2.0
There are 1 products installed in this Oracle Home.
Interim patches (4) :
Patch 19665921 : applied on Wed Jun 17 04:19:25 UTC 2015
Unique Patch ID: 18730325
Created on 8 Apr 2015, 22:12:39 hrs PST8PDT
Bugs fixed:
19665921
This patch overlays patches:
20299023
This patch needs patches:
20299023
as prerequisites
Patch 20415564 : applied on Wed Apr 22 18:40:56 UTC 2015
Unique Patch ID: 18617752
Patch description: "Database PSU 12.1.0.2.3, Oracle JavaVM Component (Apr2015)"
Created on 31 Mar 2015, 05:37:43 hrs PST8PDT
Bugs fixed:
19699946, 19909862, 19223010, 19877336, 19895326, 20408829, 19153980
20415564, 19855285, 19895362, 19231857, 19245191, 20408866
Patch 20281121 : applied on Wed Apr 22 18:39:17 UTC 2015
Unique Patch ID: 18730317
Created on 25 Mar 2015, 17:19:22 hrs PST8PDT
Bugs fixed:
20281121
This patch overlays patches:
20299023
This patch needs patches:
20299023
as prerequisites
Patch 20299023 : applied on Wed Apr 22 18:37:30 UTC 2015
Unique Patch ID: 18703022
Patch description: "Database Patch Set Update : 12.1.0.2.3 (20299023)"
Created on 16 Mar 2015, 22:21:54 hrs PST8PDT
Sub-patch 19769480; "Database Patch Set Update : 12.1.0.2.2 (19769480)"
It’s the PSA from april, and 4 interim paches.
Here are my services:
[oracle@dbi-cdb ~]$ lsnrctl status
LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 25-AUG-2015 21:10:02
Copyright (c) 1991, 2014, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbi-cdb.compute-dbitrial1.oraclecloud.internal)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Start Date 25-AUG-2015 20:13:38
Uptime 0 days 0 hr. 56 min. 23 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/12.1.0/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/dbi-cdb/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dbi-cdb.compute-dbitrial1.oraclecloud.internal)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=dbi-cdb.compute-dbitrial1.oraclecloud.internal)(PORT=5500))(Security=(my_wallet_directory=/u01/app/oracle/product/12.1.0/dbhome_1/admin/CDB/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "CDB.dbitrial1.oraclecloud.internal" has 1 instance(s).
Instance "CDB", status READY, has 1 handler(s) for this service...
Service "CDBXDB.dbitrial1.oraclecloud.internal" has 1 instance(s).
Instance "CDB", status READY, has 1 handler(s) for this service...
Service "demos.dbitrial1.oraclecloud.internal" has 1 instance(s).
Instance "CDB", status READY, has 1 handler(s) for this service...
Service "pdb1.dbitrial1.oraclecloud.internal" has 1 instance(s).
Instance "CDB", status READY, has 1 handler(s) for this service...
The command completed successfully
I can connect:
[oracle@dbi-cdb ~]$ sqlplus sys/Ach1z0#d@//dbi-cdb/PDB1.dbitrial1.oraclecloud.internal as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Tue Aug 25 21:13:05 2015
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Oracle Label Security option
SQL> show con_name
CON_NAME
------------------------------
PDB1
If I want to connect though internet, I have to tunnel the 1521 port because only ssh is open. But that, again, is for a future post.
Don’t hesitate to follow the dbi-services blog to be up-to-date on new technologies. Also on twitter: https://twitter.com/dbiservices