Saving You 15 Minutes: OEM Software Library and User Defined Provisioning – Deploying Scripts Across Your Estate Part 4

I mentioned in a previous post that I didn’t think that the UDPs picked up the latest revision of scripts even when this is selected as part of the procedure definition.  Turned out I was wrong….

Below is the screenshot from the UDPs (Revision 0.8):

Soft1

Then the script is updated (Revision 0.9):

Soft2

I then run the UDP and when I check the script it looks like it has picked up the latest revision:

Soft3

Happy Christmas Indeed!

Saving You 15 Minutes: 12c OEM Configuration Extension Errors and Max Characters 12.1.0.X

I have been revising a number of my configuration extensions recently and when they were first put in I was running 12.1.0.3 OEM and 12.1.0.3 agents.  Now we are on 12.1.0.4 with a mixture of 12.1.0.4 and 12.1.0.3 agents.  I noticed a couple of things…

12.1.0.3 OEM and 12.1.0.3 Agent

Unfortunately I never noted down the maximum number of characters you could have in a configuration extension (but I would assume it is restricted by the agent version and will therefore be the same as below) with this combination however, if you do hit the maximum limit you will receive a Java error in the console.  This behaviour changes in 12.1.0.4.

12.1.0.4 OEM and 12.1.0.3 Agent

Now from 12.1.0.4 onwards if there is an issue with your configuration extension and you preview you it via the console you won’t receive ANY errors.  The preview box will come back with ‘no data to display’.  If you take a look at the logs at the back end you will see the java collection error.  The maximum number of characters seems to be around 3700 in total.

12.1.0.4 OEM and 12.1.0.4 Agent

When you are running 12.1.0.4 OEM and agents it seems that the maximum character limit has been significantly increased, in fact increased to the point in which stopped testing, I got a bit bored at 17000 characters.  To give you an idea this is like 30 SQL statements like this:

select distinct(grantee) from dba_tab_privs where table_name in ('DBA_JOBS') 
and grantee not in ('SYS','SYSTEM','SYSMAN','DBA','WMSYS','DBSNMP','OUTLN','EXFSYS',
'APEX_030200','MDSYS','CTXSYS','OLAPSYS','ORACLE_OCM','OLAP_DBA','OWBSYS','OEM_MONITOR',
'SELECT_CATALOG_ROLE','EXP_FULL_DATABASE','FLOWS_030000','IMPDP','OEM_REPOSITORY',
'ORACLE','PERFSTAT','RMAN','SECAUDIT','SYSBACKUP','AQ_ADMINISTRATOR_ROLE','IMP_FULL_DATABASE',
'DATAPUMP_IMP_FULL_DATABASE','SCHEDULER_ADMIN','AUDITOR','SPATIAL_WFS_ADMIN_USR','SPATIAL_CSW_ADMIN_USR',
'ORDSYS','APEX_040100') group by grantee

If you are running on 12.1.0.3 and are thinking about using configuration extensions then it makes a lot of sense to move to 12.1.0.4 as you could probably store all your SQL in a single extension instead of spreading them across multiple extensions.

Saving You 15 Minutes: OEM Software Library and User Defined Provisioning – Deploying Scripts Across Your Estate Part 3

So we have configured the software library and defined a user provisioning process, so now all that is left is to do is run the procedure.

Running the procedure is very striaght forward, all you are doing is selecting the host and then adding in the location of where you would like the scripts to be provisioned to.

Enterprise > Provisioning and Patching > Procedure Library > Highlight UDP and Launch!

The screenshots cover this process.

UDPa

UDPb

UDPc

UDPd

Once you have launched the procedure you will be taken back to the ‘Procedure Activity’ tab of user defined provisioning.  From here you can then drill down into the UDP and the subsequent steps.  The output makes it easy to troubleshoot, ensure you tick ‘don’t clean up’ when defining the procedure, this will further help.

Here you can see the occurance of the Windows conversion issue mentioned eariler.

UDPe

If you go to the /tmp/JOB_xxx directory you can look at the properties file of the user defined provisioing process, this will only remain if you don’t clear up the job.  Also you can look at the scripts which were copied to the server, in this case logsweep.sh and cp5.sh

Directive.NAME_RunPrivileged=
Directive.NAME_ArgsList[0].NAME_ArgsPrefix=
Directive.NAME_ArgsList[0].NAME_ArgsName=dir_loc
Directive.NAME_ArgsList[0].NAME_ArgsSuffix=
Directive.NAME_Executor=SUB_Bash
Directive.NAME_CmdLineVars.dir_loc=/oracle/scripts
Directive.DirectivesCommandLineTypeId=
Directive.NAME_CmdLine=/oracle/scripts

To get around the issue with Windows conversion I re-uploaded the cp5.sh but from a Unix machine.  After re-running the job the output looked like this and the scripts appeared in the /oracle/scripts folder.

UDPf

In the next post we will look at some of the bugs and issues I ‘think’ I may have found in the UDP.

 

 

 

 

 

 

Saving You 15 Minutes: OEM Software Library and User Defined Provisioning – Deploying Scripts Across Your Estate Part 2

In this blog we will create the user defined provisioning procedure.  Once you have understood how the software library works then this part is relatively straight forward.

The wizard will guide you through the process.  For the tabs, target list and procedure variables there is nothing to add (in this example).  Go to the ‘procedure steps’ tab and add in a new step after the ‘Default Phase’.

SL9

SL10

This will take you to another wizard.

Here you select ‘step’ and a type of ‘Library Component’.  You can then go through the wizard and select the actual component (logsweep.sh) and the directive (CheckCopy) script.

SL11

Couple of things to notice.

  • When you are searching for components the search is case sensative
  • You will see all the revisions of that component in the software library
  • Take note of ‘use latest revision’ that is a good idea, but I think there is a bug on this feature, another blog…

SL12

Also worth nothing in the screen shot below certain revisions have been deleted out of your software library, revision 0.7 is missing.  When it comes to deleting components or directives from the software library it will only allow you to delete the last one.  Which is good but if you want to delete an entire component it seems you have to delete each revision rather than the whole thing.

SL13

When you come to the ‘Map Properties’ section check that the parameter defined in your directive (dir_loc) appears.  You can then set this to be a hard coded value during the provisioning procedure or you can specify it at runtime.  The other key box on this screen you might want to untick is the ‘perform cleanup’.

SL14

If the first time you run this procedure it fails then it will give you a chance to pick through the pieces.  This is vital if you start getting into more complex provisioning procedures.  You can review and save this user defined procedure and you’re ready to test..