Thursday, January 8, 2015

Adding a RAID volume to Azure Linux VM


Breaking into our short OEM work I find I have to move it to some faster disk as  a single Azure BLOB has a 500 IOPS limit.   So we need to stripe a bunch of disks together.

To do this we first have to create them in Azure Control Panel ( I hate Powershell )


Click Attach Empty Disk at the bottom.   We will do  15x10G disks


]


Repeat till 10 done ! 

Sorry ( don't use Read/Write above , use None or you will run into a problem with it,  that onyl  4 R/W can be there ).



now lets' install mdadm

[root@ebscloud ~]# yum install mdadm
Loaded plugins: refresh-packagekit
public_ol6_addons                                                                                                                                         | 1.2 kB     00:00
public_ol6_addons/primary                                                                                                                                 |  77 kB     00:00
public_ol6_addons                                                                                                                                                        264/264
public_ol6_latest                                                                                                                                         | 1.4 kB     00:00
public_ol6_latest/primary                                                                                                                                 |  45 MB     00:03
public_ol6_latest                                                                                                                                                    29084/29084
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package mdadm.x86_64 0:3.2.6-7.el6_5.2 will be updated
---> Package mdadm.x86_64 0:3.3-6.el6_6.1 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

=================================================================================================================================================================================
 Package                              Arch                                  Version                                       Repository                                        Size
=================================================================================================================================================================================
Updating:
 mdadm                                x86_64                                3.3-6.el6_6.1                                 public_ol6_latest                                341 k

Transaction Summary
=================================================================================================================================================================================
Upgrade       1 Package(s)

Total download size: 341 k
Is this ok [y/N]: y
Downloading Packages:
mdadm-3.3-6.el6_6.1.x86_64.rpm                                                                                                                            | 341 kB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating   : mdadm-3.3-6.el6_6.1.x86_64                                                                                                                                    1/2
  Cleanup    : mdadm-3.2.6-7.el6_5.2.x86_64                                                                                                                                  2/2
  Verifying  : mdadm-3.3-6.el6_6.1.x86_64                                                                                                                                    1/2
  Verifying  : mdadm-3.2.6-7.el6_5.2.x86_64                                                                                                                                  2/2

Updated:
  mdadm.x86_64 0:3.3-6.el6_6.1

Complete!
[root@ebscloud ~]#

[root@ebscloud ~]# fdisk -l|grep 10
Disk /dev/sda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 26108 cylinders
/dev/sdc1               1       26108   209712478+  83  Linux
Disk /dev/sdd: 10.7 GB, 10737418240 bytes
Disk /dev/sde: 10.7 GB, 10737418240 bytes
Disk /dev/sdg: 10.7 GB, 10737418240 bytes
Disk /dev/sdf: 10.7 GB, 10737418240 bytes
Disk /dev/sdj: 10.7 GB, 10737418240 bytes
Disk /dev/sdi: 10.7 GB, 10737418240 bytes
Disk /dev/sdl: 10.7 GB, 10737418240 bytes
Disk /dev/sdm: 10.7 GB, 10737418240 bytes
Disk /dev/sdk: 10.7 GB, 10737418240 bytes
Disk /dev/sdh: 10.7 GB, 10737418240 bytes
Disk /dev/sdn: 10.7 GB, 10737418240 bytes

[root@ebscloud ~]#

so those are the disks.  Repeat for all 10

[root@ebscloud ~]# fdisk /dev/sdd
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xe1519968.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').
Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1305, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-1305, default 1305):
Using default value 1305
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@ebscloud ~]#



etc 
Now run mdadm --create /dev/md0 --verbose --level 0 --raid-devices 15 /dev/sdd1 /dev/sde1 /dev/sdg1 /dev/sdf1 /dev/sdj1 /dev/sdi1 /dev/sdl1 /dev/sdm1 /dev/sdk1 /dev/sdh1 /dev/sdn1 /dev/sdo1 /dev/sdp1 /dev/sdq1 /dev/sdr1

this will give you a Linux device /dev/md0 

then do mkfs.ext4 on it and mount it in fstab . 

Et Voila now you have a drive.   ( if you've messed up and built Grid Control on a slow disk we will now give you several hours to push it all across to the new drive and then remap drives etc ) 
.. all done..  several Azure features were bumped into like no more than 16 attached disks etc  

Tuesday, January 6, 2015

Patching the Cloud Control - Part 1 - What Patches to Apply.



In looking at Oracle's fantastic Enterprise Manager Product we should get the usual "Update to Latest Patchsets" out of the way first.  This is relevant because Oracle update OEM very fast ( its better than it used to be so we are taking full advantage ! )


We consider here our repository database to be up-to-date, so updates here refer only to the OMS components

For the Cloud Control How do We Do that ?

Part 1 : OMS

metalink points the way, usually

and a quick search points out

Master Index for Cloud Control Agent Installation, Upgrade and Patching (Doc ID 1363767.1)

and this lovely document points us to 

793512.1  - Release Schedule of Current Enterprise Manager Releases and Patch Sets

Since I am on Linux x86-64 and on 12.1.0.4 this lovely document tells me my OMS is at the latest version. 

But it also links to 822485.1  Oracle Recommended Patches (PSU) for Enterprise Manager Base Platform (All Releases)

And this tells me that the latest patchset ( at time of writing Jan 2015 ) is 

12.1.0.4.1 Enterprise Manager Base Platform Patch Set Update (PSU) which can be found at 

If we look at that we find  


This PSU1 is an OMS patch only.
This PSU1 can be installed on top of Enterprise Manager Base Platform 12.1.0.4.0.

So we'll look at that in our next steps and how to do that.   
But that is the OMS Side Patch 

Agent-Side Patches 

Let's look at 
Enterprise Manager 12.1.0.4.0 (PS3) Master Bundle Patch List for Agent and Plug-ins (OMS and Agent side) (Doc ID 1900943.1)


This tells us we need the patch for 

System Patch 12.1.0.4.7 at Ml Note Patch 20188140


and we need the latest agent patch Patch 19513382

So that should be the set of patches we will need to do.   In the next phase we will show how to do this. 

Monday, January 5, 2015

How to Connect to the Cloud Control



So your fantastic System Administrators have installed the cloud control for you.
In the previous post we showed you how to start the cloud control and check it is up.

Now we can show you how to log on to it !

From the previous post I showed you how to get the URL for the Cloud Control
 https://ebscloud.bsx.com:7803/em

Open a browser and enter your URL into the address bar


now enter the sysman userid = SYSMAN and the assigned password

press Enter and eventually ( can take several errors and retries if it is a slow oms and a slow link )




Note that different home pages can show up if you selected a different one to appear when you first logged in, but its easy to change to whichever one matters to you. 

How to find out what version of cloud control you are running ... Click your username in the top right hand corner, and in the ensuing menu click About Enterprise Manager





If you want to log out of the Cloud Control ( you should always log out as your credentials can be very powerful giving you unlimited access ) 

at the top right corner you can see your username SYSMAN or whatever, click it, then the menu pops out, click  Log Out 



We can see we have been logged out.   IN the next post we will look at patching the Cloud Control to add all the latest updates.

Happy New Year

Chris.

How to Start the Oracle Cloud Control OMS



This is for cloud control 12.1.0.4  but should work for most Cloud Control variants

We're assuming here that you have installed the Cloud Control database, and run all the installation etc but you've forgotten how to start the OMS, so this is a fairly basic Oracle Cloud Control installation.



Assumptions : We're working on Oracle Linux here but it's fairly simple to do this on any platform.


First thing to do is to source the environment :

export ORACLE_BASE=/u01/oracle/
export ORACLE_HOME=/u01/oracle/oms12104/oms
export PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_SID=EMREP

Your paths and SID will of course vary.   If  you don't want to spend too much time looking for those values 

SID should be easy to find 

and the first two values can be found by checking 
/etc/oragchomelist which is a file that should exist on every OMS with usually the first two lines being that of the BASE and HOME 

e.g. 

[oracle@ebscloud ~]$ cat /etc/oragchomelist
/u01/oracle/oms/oms
/u01/oracle/oms12104/oms

/u01/oracle/agent/core/12.1.0.4.0:/u01/oracle/agent/agent_inst
[oracle@ebscloud ~]$



Steps to check

1.  OMS repository database is available
2.  OMS Repository listener is available and you can connect to it.

The above steps are easy to check by using a SQLPLUS check from SYSMAN/@ if you have defined it in TNSNAMEs 

[oracle@ebscloud ~]$ tnsping EMREP

TNS Ping Utility for Linux: Version 11.2.0.4.0 - Production on 05-JAN-2015 11:54:16

Copyright (c) 1997, 2013, Oracle.  All rights reserved.

Used parameter files:


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = ebscloud)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = EMREP)))
OK (90 msec)
[oracle@ebscloud ~]$ sqlplus sysman/password@emrep

SQL*Plus: Release 11.2.0.4.0 Production on Mon Jan 5 11:54:31 2015

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>

so that is all OK.

OK so now we can see the database.

next step is to start the OMS.

[oracle@ebscloud ~]$ emctl start oms
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation.  All rights reserved.
Starting Oracle Management Server...
Starting WebTier...
WebTier Successfully Started
Oracle Management Server Already Started
Oracle Management Server is Up
[oracle@ebscloud ~]$

This can take a few minutes. 

note that this can cause a lot of database throughput so be aware that "Management Server is Up"  may not be entirely correct, but we will show it off as the management server will not start until some database work is complete. 

How do we check it is started OK ? 

Simple Method : 

[oracle@ebscloud ~]$ emctl status oms
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation.  All rights reserved.
WebTier is Up
Oracle Management Server is Down

So we realize that starting cloud control can take a LONG time 

top - 12:11:48 up 31 min,  2 users,  load average: 3.50, 2.52, 2.20
Tasks: 456 total,   2 running, 454 sleeping,   0 stopped,   0 zombie
Cpu(s): 23.0%us,  2.6%sy,  0.0%ni, 70.2%id,  4.0%wa,  0.0%hi,  0.1%si,  0.0%st
Mem:  14387520k total,  8291548k used,  6095972k free,    59120k buffers
Swap:        0k total,        0k used,        0k free,  5566052k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
10373 oracle    20   0 7133m 888m  54m S 152.4  6.3   5:34.56 java
 2858 oracle    20   0 4509m 817m 773m S 43.4  5.8   2:40.02 oracle
 1999 oracle    -2   0 4461m  16m  14m S  4.0  0.1   0:29.90 oracle


If we look at top or iotop we can see lots of Java or DBW on the database server.  Wait till it all dies off and then run the status command again.  This can take up to 25-30 minutes on slow OMS machines 


but finally 

[oracle@ebscloud ~]$ emctl status oms
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation.  All rights reserved.
WebTier is Up
Oracle Management Server is Up
[oracle@ebscloud ~]$


so that's not very detailed so let's ask for the details  ( note you need the sysman password for this ) .  If you don't have the sysman password you shouldn't really be starting and stopping the OMS .....  but it might happen.  However to get the detail status you need it. 


if we add the detail and sysman_pwd in

[oracle@ebscloud ~]$ emctl status oms -details -sysman_pwd
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation.  All rights reserved.
Console Server Host        : ebscloud.bsx.com
HTTP Console Port          : 7790
HTTPS Console Port         : 7803
HTTP Upload Port           : 4890
HTTPS Upload Port          : 4904
EM Instance Home           : /u01/oracle/gc_inst1/em/EMGC_OMS1
OMS Log Directory Location : /u01/oracle/gc_inst1/em/EMGC_OMS1/sysman/log
OMS is not configured with SLB or virtual hostname
Agent Upload is locked.
OMS Console is locked.
Active CA ID: 1
Console URL: https://ebscloud.bsx.com:7803/em
Upload URL: https://ebscloud.bsx.com:4904/empbs/upload

WLS Domain Information
Domain Name            : GCDomain
Admin Server Host      : ebscloud.bsx.com
Admin Server HTTPS Port: 7103
Admin Server is RUNNING

Oracle Management Server Information
Managed Server Instance Name: EMGC_OMS1
Oracle Management Server Instance Host: ebscloud.bsx.com
WebTier is Up
Oracle Management Server is Up

BI Publisher is not configured to run on this host.
[oracle@ebscloud ~]$


Note that the Console URL should be recorded as that is what you want to put into the browser address bar and that will be the title of the next post. 

so from above we record  https://ebscloud.bsx.com:7803/em


How do we stop the OMS

emctl stop oms should work just fine.


Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation.  All rights reserved.
Stopping WebTier...
WebTier Successfully Stopped
Stopping Oracle Management Server...
Oracle Management Server Successfully Stopped
Oracle Management Server is Down
[oracle@ebscloud ~]$



Tuesday, August 19, 2014

More new Checks in DBMS_FEATURE_USAGE

After yesterdays post I decided to just run a quick diff against 12.1.0.1 and 12.1.0.2 catfsusrg.sql

This returned about 2000 lines, so I filtered it by new procedures

this results in

 CREATE OR REPLACE PROCEDURE dbms_feature_ba_owner
CREATE OR REPLACE PROCEDURE dbms_feature_adaptive_plans
CREATE OR REPLACE PROCEDURE dbms_feature_auto_reopt
CREATE OR REPLACE PROCEDURE dbms_feature_zmap
create or replace procedure DBMS_FEATURE_JSON
create or replace procedure DBMS_FEATURE_IOT(
create or replace procedure DBMS_FEATURE_IMC(
create or replace procedure DBMS_FEATURE_ADV_TABCMP(
create or replace procedure DBMS_FEATURE_DATABASE_ODM
CREATE OR REPLACE PROCEDURE DBMS_FEATURE_GATEWAYS
CREATE OR REPLACE PROCEDURE dbms_feature_emx
create or replace procedure DBMS_FEATURE_IMA(

A quick look at a couple of these
zmap=Zone Maps ( ? )

dbms_ba_owner looks like something to do with RMAN as there is much stuff in recover.bsq to back it.    Hmmmm....


Monday, August 18, 2014

dbms_feature_usage in 12.1.0.2 and the in-memory option.

With all the kerfuffle about in-memory reporting usage recently I thought I'd write a post about it.

DBMS_FEATURE_USAGE is a set of packages and procedures produced by Oracle to check ( the clue is in the title ) about how whether particular features are in use, and usually, if a license fee is due.

It does this by running a set of checks and recording the output.

Over a couple of blog posts I will see if we can figure out how it works.

We will take a topical example, that of the In-Memory Option.

So : How does Oracle figure out one is using In-Memory ?

in $ORACLE_HOME/rdbms/admin are several scripts.  The one we are interested in is
catfsusrg.sql

In this long piece of SQL ( 13000+ lines )  are procedures to check if anything from ASM to Exadata is in use.

So how does In-Memory Column Option get checked ?

Step forward

/****************************************************************
 * DBMS_FEATURE_IMC
 * The procedure to detect In-Memory Column Store usage
 ****************************************************************/

What does this do ?
It takes
   'select count(*) from dba_tables where ' ||
       'inmemory_compression is not null',
    'select count(*) from dba_tab_partitions where ' ||
       'inmemory_compression is not null'
   'select count(*) from dba_tab_subpartitions where ' ||
       'inmemory_compression is not null'
    'select count(*) from gv$im_segments_detail where ' ||
       'segtype=0'
( apparently to exclude in-memory journals ) 

Adds up the answer from the above 4 counts;  if the number is > 0 then the feature is in use. 










Wednesday, July 9, 2014

Oracle Fusion Middleware 12c 12.1.3 released


Hi folks and sorry for the big gap in blogging !


Well folks we at Version 1 keep a close eye on what is happening in the Oracle world.  Oracle have recently released Fusion Middleware 12c 12.1.3 which is a major release of their middleware stack

Over the next short while we will be releasing blogs and looking at the new features that showcase this major release but for now here are the major links to get you started

The Oracle Main FMW page :

http://www.oracle.com/us/products/middleware/overview/index.html

The Oracle OTN page

( includes downloads )

http://www.oracle.com/technetwork/middleware/fusion-middleware/overview/index.html

the main documentation set

http://docs.oracle.com/middleware/1213/index.html

and finally a link to the main infrastructure "What's New" ( e.g. OPMN has been removed )

http://docs.oracle.com/middleware/1213/core/ASCON/whatsnew.htm#ASCON11223

Best regards and speak to you all soon !

Chris