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

Wednesday, October 23, 2013

Editing a Putty Session to always point at the correct AWS Instance.



Problem : Putty Sessions are in the registry.

So we want to edit the registry to insert the new public DNS name after we have started it.  ( our intent is to start and stop nightly so we are lazy about picking up the new DNS name )

We can get the dns name from the previous step.

Probably the best way to do this is write and execute a registry .reg file.

Relevant key is
HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions.


So.... if we do something along the line of exporting the relevant session hive and the substituting in the rest... i.e. like

aws ec2 describe-instances --filters "Name=instance-id,Values=i-xxxx" --quer
y "Reservations[*].Instances[*].{dz:PublicDnsName}" --output text  > pdn1.out
set /p myvar=type firstpart.in > update.reg
echo "HostName"="%myvar%" >> update.reg
type lastpart.in >> update.reg
C:\Users\Chris\.aws>

Sub in the relevant instance-id and then run update. reg .... also don't forget to edit the registry if you want to divert X window tunnels etc for Vnc desktop , you need the internal IP for that though so a slightly different call but should not be excessive.

If you wanted to make that easy you could run it up as a .bat with admin rights to avoid the UAC prompt but .. as I said... exercise for the reader !