Wednesday, January 28, 2015

Adding a Database Target in Oracle Cloud Control


Log into Cloud Control

Top Right Hand Side/Add Target/Add Targets Manually

Add Using Guided Process

On the next box select the search glass




Select the host that runs the database you want to add

Click Select and Next 

you get a Target Discovery In Progress 


In the list below we want to select EMREP 


Tick box beside EMREP. fill in dbsnmp password ( note it is normally a locked account ) 
and click Test Connection



Click OK, and Next

Finally, click Save


Now Click at the Top Left
Targets/Databases/Search List


We can see the newly added EMREP
and we can see its performance metrics

So all done !

More later... 


Sunday, January 18, 2015

Applying the latest Plugins to Cloud Control



If we want to play with DBAAS (see note 1549855.1)  we need to have the latest plugins. 

OK so into Cloud Control/Extensibililty/Plugins we go 



We can see there's a later plugin for the database than the one we have *.06 so we need to get 12.1.0.7 

We can see the same for the CLoud Plugin which is at 12.1.0.8 and we need 12.1.0.9 

and the same for the storage management framework. 


We need to deploy on the OMS server first and then roll out the agent side changes. 

OMS Server

Downloading the Plugins 


OK so those plugins are not downloaded so we need to download them before we can deploy them. 
CLick into 

For each plug in listed above, click into Setup/Extensibility/Self Update, then scroll down to Plugins, 

For each plugin listed above, click Download , then Select Immediately

Wait for 5 minutes or so for all the plugins to be downloaded  ( note that the DB plugin alone is 630 MB ... You wonder what they are doing with all that ! ) 

Now we can apply them to the relevant places. 
  Go back to Setup/Extensibility/Plugins and we can see the plugins are now available



Ok now go to Deploy On/Management Server in the buttons above the plugins

Click Add, and select each of the 4 plugins we have just downloaded

Click Next.  Unfortunately we now get a warning that we need the latest virtualization plugin as well
so back to extensibility/selfupdate/plugins we go 

Select the 12.1.0.7 Plugin and Download .  This should only take a short time 
Now go back to the plugins page and 12.1.0.7 virtualization should be available  ( note you will need to repeat this process for Fusion Middleware currently 12.1.0.7 
Once you've done that you eventually get a progress bar checking the prerequisites ! 

]
These failed because we need more swap ( the Azure VM has no swap in it ). 
Step out, add swap,  retry 
if all is well the plugin prereq check should succeed 

Click Next 
On this window decide on your REPO back up strategy ( recommended ) and enter a SYSDBA credential for the repo database 
Click Next. 
you will now see an OMS downtime warning so ensure you know what this means ( no system monitoring while it is down ) 

If all is well and you wish to proceed, Click Deploy 
a final confirmation window opens...

Click OK 

We can step out and watch with emctl status oms -details -sysman_pwd 
Plug-in Name         : Oracle Virtualization
Version              : 12.1.0.7.0
ID                   : oracle.sysman.vt
Content              : Plug-in
Action               : Deployment
Status               : Deploying
Steps Info:
---------------------------------------- ------------------------- ------------------------- ----------
Step                                     Start Time                End Time                  Status
---------------------------------------- ------------------------- ------------------------- ----------
Submit job for deployment                1/18/15 11:54:42 AM EST   1/18/15 11:54:42 AM EST   Success

Initialize                               1/18/15 11:54:44 AM EST   1/18/15 11:54:53 AM EST   Success

Install software                         1/18/15 11:54:53 AM EST   1/18/15 11:54:59 AM EST   Success

Validate plug-in home                    1/18/15 11:55:01 AM EST   1/18/15 11:55:03 AM EST   Success

Perform custom preconfiguration          1/18/15 11:55:03 AM EST   1/18/15 11:55:03 AM EST   Success

Check mandatory patches                  1/18/15 11:55:03 AM EST   1/18/15 11:55:03 AM EST   Success

Generate metadata SQL                    1/18/15 11:55:03 AM EST   1/18/15 11:55:03 AM EST   Success

Preconfigure Management Repository       1/18/15 11:55:03 AM EST   1/18/15 11:55:04 AM EST   Success

Preregister DLF                          1/18/15 11:55:04 AM EST   1/18/15 11:55:04 AM EST   Success

Stop management server                   1/18/15 11:55:05 AM EST   N/A                       Running

---------------------------------------- ------------------------- ------------------------- ----------


we can see lots of stuff happening 

After about 90 minutes this clears up and we can log back in again !
Don't forget, though, we still need to roll out the plugins to the environments we want to deploy to or manage from.

In later posts we will look at the differences between all the plugins and the proper usage of all these.


Adding Swap to a Linux VM



Find a device on which you want to put the swap

for our purposes we will put it as a file on the boot device.

[root@ebscloud ~]# mkdir /swap
[root@ebscloud ~]# cd /swap
[root@ebscloud swap]# dd if=/dev/zero of=swapfile1 bs=1048576 count=500
500+0 records in
500+0 records out
524288000 bytes (524 MB) copied, 0.709267 s, 739 MB/s
[root@ebscloud swap]# ls -lrt
total 512000
-rw-r--r-- 1 root root 524288000 Jan 18 11:40 swapfile1
[root@ebscloud swap]#
[root@ebscloud swap]# mkswap ./swapfile1
Setting up swapspace version 1, size = 511996 KiB
no label, UUID=47543a04-0a4b-4b36-a257-2eb5f4aceb7a
[root@ebscloud swap]#
[root@ebscloud swap]# swapon ./swapfile1
[root@ebscloud swap]#

Don't forget to add the entry into fstab to make it persistent at reboot ( left as exercise for reader ! )

( NB :  If you are following the above is slightly incorrect as we need 600 not 500 but the theory is the same ) 

Saturday, January 17, 2015

Downloading And Applying our patches to Cloud Control ( Part 4 - Agent Patches )




OK  so let's log on to CLoud Control and thus to the Site Map


Click into patching and provisioning/patches and updates at the bottom left
This brings us to this window


Enter 20109357  ( we get this patch ID from the 1900943.1 note  it is the master note for this ) 


Once the patch appears in the list, open it, and click on Add to Plan/Add to New 
Pick the Server you want and give the plan a name - such as AGENT_PATCHPLAN_1 above 
then create plan.  Click into the plan and scroll down to Validation, then ANALYZE 




this takes a couple of minutes but 
Click into Review and Deploy on the left, and down on the right click DEPLOY

Now click Submit 
On the page it changes to Deploy in Progress.  Click into Show Details Results 

After about 5 minutes it should show OK and patch completed after stopping and restarting the agent










Downloading And Applying our patches to Cloud Control ( Part 3 - Plugin Patches )



Now we have an uptodate OMS lets get the plugins updated

At the moment this is patch 20188140: enterprise manager for oms plugins 12.1.0.4.

Download the patch to the server using the wget method I showed earlier

This is a big patch approx 400MB so it will take a bit 

unzip it to a patch directory and lets run opatch analyze 

[oracle@ebscloud 20188140]$ /u01/oracle/oms12104/oms/OPatch/opatchauto apply -analyze -property_file /home/oracle/patches/wlsprops.txt
OPatch Automation Tool
Copyright (c) 2014, Oracle Corporation.  All rights reserved.


OPatchauto version : 11.1.0.12.3
OUI version        : 11.1.0.12.0
Running from       : /u01/oracle/oms12104/oms
Log file location  : /u01/oracle/oms12104/oms/cfgtoollogs/opatch/opatch2015-01-17_08-17-50AM_1.log

OPatchauto log file: /u01/oracle/oms12104/oms/cfgtoollogs/opatchauto/20188140/opatch_oms_2015-01-17_08-17-53AM_analyze.log


WARNING: Sub-patch "19051557" skipped for incompatibility with components installed in the OMS system.
WARNING: Sub-patch "19282500" skipped for incompatibility with components installed in the OMS system.
WARNING: Sub-patch "19513319" skipped for incompatibility with components installed in the OMS system.
WARNING: Sub-patch "20109340" skipped for incompatibility with components installed in the OMS system.

Configuration Validation: Success


SKIPPED...

Complete Summary
================


All log file names referenced below can be accessed from the directory "/u01/oracle/oms12104/oms/cfgtoollogs/opatch/2015-01-17_08-17-50AM_SystemPatch_20188140_1"

Prerequisites analysis summary:
-------------------------------

The following sub-patch(es) are applicable:

      Oracle Home Name   Sub-patches                                          Log file
      ----------------   -----------                                          --------
    oracle_sysman_xa21      19907892   19907892_ApplyPrereq2015-01-17_08-18-23AM_2.log
  oracle_sysman_emas21      20109345   20109345_ApplyPrereq2015-01-17_08-18-08AM_2.log
    oracle_sysman_db21      20109326   20109326_ApplyPrereq2015-01-17_08-18-18AM_2.log
   oracle_sysman_ssa21      20109312   20109312_ApplyPrereq2015-01-17_08-18-31AM_2.log
  oracle_sysman_emct21      19163444   19163444_ApplyPrereq2015-01-17_08-18-15AM_2.log
    oracle_sysman_vt21      19060193   19060193_ApplyPrereq2015-01-17_08-18-26AM_2.log
   oracle_sysman_mos21      19051548   19051548_ApplyPrereq2015-01-17_08-18-28AM_2.log


The following sub-patches are incompatible with components installed in the OMS system:
19051557,19282500,19513319,20109340



--------------------------------------------------------------------------------
The following warnings have occurred during OPatchauto execution:
1)  Sub-patch "19051557" skipped for incompatibility with components installed in the OMS system.
2)  Sub-patch "19282500" skipped for incompatibility with components installed in the OMS system.
3)  Sub-patch "19513319" skipped for incompatibility with components installed in the OMS system.
4)  Sub-patch "20109340" skipped for incompatibility with components installed in the OMS system.
--------------------------------------------------------------------------------
OPatchauto Session completed with warnings.
Log file location: /u01/oracle/oms12104/oms/cfgtoollogs/opatchauto/20188140/opatch_oms_2015-01-17_08-17-53AM_analyze.log

OPatchauto completed with warnings.
[oracle@ebscloud 20188140]$


so now emctl stop oms 

and run the apply 

[Jan 17, 2015 8:20:27 AM]    Collect Patch Data: In Progress...
[Jan 17, 2015 8:20:33 AM]    Collect Patch Data: Completed.
[Jan 17, 2015 8:20:33 AM]    Collect Target Data: In Progress...
[Jan 17, 2015 8:20:33 AM]    Collect Target Data: Completed.
[Jan 17, 2015 8:20:33 AM]    --------------------------------------------------------------------------------------------------------------------------------------------

                             Enterprise Manager with single primary OMS instance only, not a Multi-OMS environment, and no HA configuration;
                             Primary OMS instance(s):


                            Platform Oracle home:
                             /u01/oracle/oms12104/oms
                             List of Plugin Oracle homes:
                             oracle_sysman_cfw21 : /u01/oracle/oms12104/plugins/oracle.sysman.cfw.oms.plugin_12.1.0.1.0
                             oracle_sysman_db21 : /u01/oracle/oms12104/plugins/oracle.sysman.db.oms.plugin_12.1.0.6.0
                             oracle_sysman_xa21 : /u01/oracle/oms12104/plugins/oracle.sysman.xa.oms.plugin_12.1.0.6.0
                             oracle_sysman_emas21 : /u01/oracle/oms12104/plugins/oracle.sysman.emas.oms.plugin_12.1.0.6.0
                             oracle_sysman_mos21 : /u01/oracle/oms12104/plugins/oracle.sysman.mos.oms.plugin_12.1.0.6.0
                             oracle_sysman_ssa21 : /u01/oracle/oms12104/plugins/oracle.sysman.ssa.oms.plugin_12.1.0.8.0
                             oracle_sysman_emct21 : /u01/oracle/oms12104/plugins/oracle.sysman.emct.oms.plugin_12.1.0.6.0
                             oracle_apps_ebs21 : /u01/oracle/oms12104/plugins/oracle.apps.ebs.oms.plugin_12.1.0.2.0
                             oracle_sysman_vt21 : /u01/oracle/oms12104/plugins/oracle.sysman.vt.oms.plugin_12.1.0.6.0
                             --------------------------------------------------------------------------------------------------------------------------------------------
[Jan 17, 2015 8:20:33 AM]    Validate Configuration: In Progress...
[Jan 17, 2015 8:20:33 AM]    Checking the status of weblogic admin server for OMS instance domain...
[Jan 17, 2015 8:20:34 AM]    State of the weblogic admin server "EMGC_ADMINSERVER" for OMS instance domain is : RUNNING
[Jan 17, 2015 8:20:34 AM]    AdminServer status check: [PASSED]
[Jan 17, 2015 8:20:34 AM]    Checking the status of OMS repository...
[Jan 17, 2015 8:20:34 AM]    Status of the OMS repository is : UP
[Jan 17, 2015 8:20:34 AM]    OMS repository status check: [PASSED]
[Jan 17, 2015 8:20:34 AM]    Checking whether software library is configured....
[Jan 17, 2015 8:20:34 AM]    Software library is correctly configured.
[Jan 17, 2015 8:20:34 AM]    Checking whether software library is configured....Software library configuration check: [PASSED]
[Jan 17, 2015 8:20:34 AM]    Validate Configuration: Completed.
[Jan 17, 2015 8:20:34 AM]    Running apply prerequisite checks for sub-patch(es) "20109345" and Oracle Home "/u01/oracle/oms12104/plugins/oracle.sysman.emas.oms.plugin_12.1.0.6.0"...
[Jan 17, 2015 8:20:36 AM]    Sub-patch(es) "20109345" are successfully analyzed for Oracle Home "/u01/oracle/oms12104/plugins/oracle.sysman.emas.oms.plugin_12.1.0.6.0"
[Jan 17, 2015 8:20:36 AM]    Running apply prerequisite checks for sub-patch(es) "19163444" and Oracle Home "/u01/oracle/oms12104/plugins/oracle.sysman.emct.oms.plugin_12.1.0.6.0"...
[Jan 17, 2015 8:20:39 AM]    Sub-patch(es) "19163444" are successfully analyzed for Oracle Home "/u01/oracle/oms12104/plugins/oracle.sysman.emct.oms.plugin_12.1.0.6.0"
[Jan 17, 2015 8:20:39 AM]    Running apply prerequisite checks for sub-patch(es) "20109326" and Oracle Home "/u01/oracle/oms12104/plugins/oracle.sysman.db.oms.plugin_12.1.0.6.0"...
[Jan 17, 2015 8:20:42 AM]    Sub-patch(es) "20109326" are successfully analyzed for Oracle Home "/u01/oracle/oms1

..SKIPPED...

[Jan 17, 2015 8:38:51 AM]    Patching summary:
                             -----------------
                             Binaries of the following sub-patch(es) have been applied successfully:
                             oracle_sysman_xa21:19907892
                             oracle_sysman_emas21:20109345
                             oracle_sysman_db21:20109326
                             oracle_sysman_ssa21:20109312
                             oracle_sysman_emct21:19163444
                             oracle_sysman_vt21:19060193
                             oracle_sysman_mos21:19051548


                             The following sub-patches are incompatible with components installed in the OMS system:
                             19051557,19282500,19513319,20109340

                             Deployment summary:
                             -------------------


So that is ALL OK 

We are patched. 


emctl start oms and we are done. 

Downloading And Applying our patches to Cloud Control ( Part 2 - PSU )



Using the WGET method download and unzip patch 19218456

Unzip it and run the analyze phase, with the credential key file we have created :
[oracle@ebscloud 19218456]$ /u01/oracle/oms12104/oms/OPatch/opatchauto apply -analyze -property_file /home/oracle/patches/wlsprops.txt
OPatch Automation Tool
Copyright (c) 2014, Oracle Corporation.  All rights reserved.


OPatchauto version : 11.1.0.12.3
OUI version        : 11.1.0.12.0
Running from       : /u01/oracle/oms12104/oms
Log file location  : /u01/oracle/oms12104/oms/cfgtoollogs/opatch/opatch2015-01-14_07-18-43AM_1.log

OPatchauto log file: /u01/oracle/oms12104/oms/cfgtoollogs/opatchauto/19218456/opatch_oms_2015-01-14_07-18-45AM_analyze.log



Configuration Validation: Success


Running apply prerequisite checks for sub-patch(es) "19218456" and Oracle Home "/u01/oracle/oms12104/oms"...
Please monitor OPatch log file: /u01/oracle/oms12104/oms/cfgtoollogs/opatch/19218456_Jan_14_2015_07_18_43/ApplyPrereq2015-01-14_07-19-00AM_2.log
Sub-patch(es) "19218456" are successfully analyzed for Oracle Home "/u01/oracle/oms12104/oms"


Complete Summary
================


All log file names referenced below can be accessed from the directory "/u01/oracle/oms12104/oms/cfgtoollogs/opatch/2015-01-14_07-18-43AM_SystemPatch_19218456_1"

Prerequisites analysis summary:
-------------------------------

The following sub-patch(es) are applicable:

  Oracle Home Name   Sub-patches                                          Log file
  ----------------   -----------                                          --------
           oms12c2      19218456   19218456_ApplyPrereq2015-01-14_07-19-00AM_2.log



Log file location: /u01/oracle/oms12104/oms/cfgtoollogs/opatchauto/19218456/opatch_oms_2015-01-14_07-18-45AM_analyze.log

OPatchauto succeeded.


So now we have validated our patchset, it is now time to apply it per the notes : 

emctl stop oms

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 19218456]$
[oracle@ebscloud 19218456]$ /u01/oracle/oms12104/oms/OPatch/opatchauto apply -property_file /home/oracle/patches/wlsprops.txt
OPatch Automation Tool
Copyright (c) 2014, Oracle Corporation.  All rights reserved.


OPatchauto version : 11.1.0.12.3
OUI version        : 11.1.0.12.0
Running from       : /u01/oracle/oms12104/oms
Log file location  : /u01/oracle/oms12104/oms/cfgtoollogs/opatch/opatch2015-01-17_07-56-03AM_1.log

OPatchauto log file: /u01/oracle/oms12104/oms/cfgtoollogs/opatchauto/19218456/opatch_oms_2015-01-17_07-56-06AM_deploy.log



Configuration Validation: Success


Running apply prerequisite checks for sub-patch(es) "19218456" and Oracle Home "/u01/oracle/oms12104/oms"...
Please monitor OPatch log file: /u01/oracle/oms12104/oms/cfgtoollogs/opatch/19218456_Jan_17_2015_07_56_03/ApplyPrereq2015-01-17_07-56-18AM_2.log
Sub-patch(es) "19218456" are successfully analyzed for Oracle Home "/u01/oracle/oms12104/oms"

To continue, OPatchauto will do the following:
[Patch and deploy artifacts]   : Apply sub-patch(es) [ 19218456 ] to Oracle Home "/u01/oracle/oms12104/oms";
                                 Apply RCU artifact with patch "/u01/oracle/oms12104/oms/.patch_storage/19218456_Oct_14_2014_03_22_39/original_patch"


Do you want to proceed? [y|n]
y
User Responded with: Y

Applying sub-patch "19218456" to Oracle Home "/u01/oracle/oms12104/oms"...
Please monitor OPatch log file: /u01/oracle/oms12104/oms/cfgtoollogs/opatch/19218456_Jan_17_2015_07_56_03/apply2015-01-17_07-56-30AM_4.log

Updating repository with RCU reference file "/u01/oracle/oms12104/oms/.patch_storage/19218456_Oct_14_2014_03_22_39/original_patch"

Complete Summary
================


All log file names referenced below can be accessed from the directory "/u01/oracle/oms12104/oms/cfgtoollogs/opatch/2015-01-17_07-56-03AM_SystemPatch_19218456_1"

Patching summary:
-----------------

Binaries of the following sub-patch(es) have been applied successfully:

  Oracle Home Name   Sub-patches                                    Log file
  ----------------   -----------                                    --------
           oms12c2      19218456   19218456_apply2015-01-17_07-56-30AM_4.log

Deployment summary:
-------------------

The following artifact(s) have been successfully deployed:

  Artifacts                                                  Log file
  ---------                                                  --------
        SQL   rcu_applypatch_original_patch_2015-01-17_07-58-05AM.log


Log file location: /u01/oracle/oms12104/oms/cfgtoollogs/opatchauto/19218456/opatch_oms_2015-01-17_07-56-06AM_deploy.log

OPatchauto succeeded.

And there we are.... 12.1.0.4 PSU applied ! 

Now start it up again with emctl start oms ( don't also forget to do emcli sync on your emcli installs ). 




Wednesday, January 14, 2015

Setting up opatchauto credential files



In order to have to avoid setting in passwords every time we do opatchauto we can build a credential file :

[oracle@ebscloud patches]$ /u01/oracle/oms12104/oms/OPatch/wlskeys/createkeys.sh -h $ORACLE_HOME -location .
Please enter weblogic admin server username: weblogic
Please enter weblogic admin server password:
Creating the key file can reduce the security of your system if it is not kept in a secured location after it is created. Creating new key...

Trying to get configuration and key files for the given inputs...
This operation will take some time. Please wait for updates...
User configuration file created: /home/oracle/patches/config
User key file created: /home/oracle/patches/key
'createKeys' succeeded.

Now create the small file needed the property file to point at these, lets call it wlsprops
You need the admin server URL for the first one, you can get this from emctl status oms -details and replace https with t3s 


AdminServerURL=t3s://ebscloud.bcs.com:7103
AdminConfigFile=/home/oracle/patches/config
AdminKeyFile=/home/oracle/patches/key

So this can now be used with our Enterprise Manager patching




Friday, January 9, 2015

Updating to latest opatch

In previous post we showed how to get latest opatch,  now we show how to install it


OPATCH before

[oracle@ebscloud ~]$ /u01/oracle/oms12104/oms/OPatch/opatch lsinventory
Oracle Interim Patch Installer version 11.1.0.10.4
Copyright (c) 2015, Oracle Corporation.  All rights reserved.



OPatch is just unzip the 688 zip file straight over the Oracle Home :

set ORACLE_HOME correctly  and

[oracle@ebscloud patches]$ unzip -d $ORACLE_HOME p6880880_111000_Linux-x86-64.zip
Archive:  p6880880_111000_Linux-x86-64.zip
  inflating: /u01/oracle/oms12104/oms/OPatch/wlskeys/README.txt
replace /u01/oracle/oms12104/oms/OPatch/wlskeys/createkeys.cmd? [y]es, [n]o, [A]ll, [N]one, [r]ename:

just press A and ENTER 

....
  creating: /u01/oracle/oms12104/oms/OPatch/ocm/bin/
  inflating: /u01/oracle/oms12104/oms/OPatch/ocm/bin/emocmrsp
  inflating: /u01/oracle/oms12104/oms/OPatch/opatch.bat
  inflating: /u01/oracle/oms12104/oms/OPatch/operr.bat
  inflating: /u01/oracle/oms12104/oms/OPatch/opatchauto.bat

all done.   

OPATCH after 

[oracle@ebscloud patches]$ /u01/oracle/oms12104/oms/OPatch/opatch lsinventory
Oracle Interim Patch Installer version 11.1.0.12.3
Copyright (c) 2015, Oracle Corporation.  All rights reserved.


Using Wget to get Oracle Patches

A little known metalink feature is using wget to download patches.

This can help tremendously in reducing the amount of crud you have to move around from desktop to server as patches can be very big, and people's desktop connections very slow indeed.

The usual patch download process is to find the patch in metalink, then download to the PC, then FTP or SFTP to the server to be patched.

Using Wget lets us download the file direct from metalink to the server in question.

So how to do this wget step ?


Let's assume we start both from the same point :


Here we are downloading opatch, a fairly common patching tool

If I click on the link we will have the patch downloaded to my PC.

But in the bottom we can see WGET options.  Let's look at that :


It tells us we will download a little script that will actually get the files for us, rather than the large download.  This sounds nice.  Let's do that so press the button. 

What we're seeing is windows 8.1 downloading the file to the desktop and asking if we want to open or save it. Notepad is not good with shell scripts cos it doesn't do CRLFs very well so we will save it instead ! 

When we open that file with a proper editor we see



Ok so what do we do with this.   On the database server or host which you want to patch, open a vi editor



Now copy the contents of the script into the vi editor :  ctrl-A to select all , paste into the terminal emulator




OK - can we use this :  We still have to edit it to change it for the correct userid and password so go up to the top of the file
Edit the lines SSO_USERNAME and SSO_PASSWORD to be whatever you use for Metalink like :

SSO_USERNAME=dingo@xyz.com
SSO_PASSWORD=swordfish

NOW we can use this ! 

Exit to the shell and chmod +x the script, and execute it.

You may run into the problem or two with wget, which is the mechanism for getting the patch  not working.   When you try and check this you will see what wget cannot connect to updates.oracle.com  .    Deep checking shows that this is because the SSL server cannot seem to handle TLS V1.2  - this is not a client side issue, even recompiling to the latest version of wget will not solve it.   The only way of doing this is to tell the wget client to downgrade its SSL protocol to TLSV1 only  - you can do that by adding --secure-protocol=TLSV1 and then it all works.

[oracle@ebscloud patches]$ sh dl.sh
[oracle@ebscloud patches]$ ls -lrt
total 53400
-rw-r--r-- 1 oracle oinstall 54484029 Nov 28 14:18 p6880880_111000_Linux-x86-64.zip
-rwxr-xr-x 1 oracle oinstall     1964 Jan  9 08:00 dl.sh
-rw-r--r-- 1 oracle oinstall     3329 Jan  9 08:00 download

[oracle@ebscloud patches]$

And now it has downloaded our patch ! 



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 ~]$