Thursday, December 13, 2007

Patch 6501312 - BPEL Repository spring cleaning

A new patch with id 6501312 creates a purge_instances procedure in the oraclebpel schema that you can use to delete your old BPEL Process instances.

Currently (Thu Dec 13 15:36:56 CET 2007) there seemes to be a problem with the paths for this patch in unix so I installed it using the following procedure:

1 Copy the files in 6501312/files/bpel\system\database\scripts to $ORACLE_HOME/bpel/system/database/scripts

2. Run the sqlplus scrip to create index and create the procedure "purge_instances".

Example:

bash$ sqlplus /nolog
SQL*Plus: Release 10.1.0.5.0 - Production on Thu Dec 13 10:19:06 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> connect orabpel@instance
Enter password:
Connected.
SQL> @upgrade_6501312_oracle.sql
SQL> commit;
SQL> @purge_instances_oracle.sql

After this you may start your spring cleaning:

BEGIN
purge_instances(to_timestamp('2007-12-13 10:30:25','YYYY-MM-DD HH24:MI:SS'));
COMMIT;
END;

Happy cleaning!

Sphere: Related Content

[Error ORABPEL-10902]: compilation failed, XML parsing failed because ""

ORABPEL-10902 shows up from time to time to annoy any BPEL developer.

It could be (I think) somthing like:

  1. General namespace errors
  2. Incorrect variable errors
  3. Variables that you try to access "out-of-scope"

The error message "" is not that helpful in any case, but if we change the 'verbose' setting to true in the ant build.properties file we get better information.

deployment tasksverbose = true

Thanks to Marc Kelderman, I can't wait until I get the next ORABPEL-10902!

Today we saw an ORA-600 when we added a diskgroup into our ASM instance... but that is a different story.

Sphere: Related Content

Wednesday, December 12, 2007

Trick Question - "good but expensive" vs "quick and dirty"

Your project manager has asked you to estimate the difference in cost between the "good but expensive", "quick and dirty" path or solution!

What should you do?

Steve McConnells answer in this blogentry is that you should ask three more questions:

1.How much it will cost to backfill the good path after you've already gone down the quick path?
2.If you choose the quick path now, how much does that slow down other work until you're able to retrofit the good path?
3.Is there a path that is quicker than the good path and that won't affect the rest of the system?

Steves Bottom line: When facing the prospect of taking on technical debt, be sure to generate more than two design options.

Sphere: Related Content

10.1.3.3.1 deployment

After deploying 10.1.3.3.1 I got the following startup errors (even if I followed the README to the point)

--------
07/12/11 22:10:41 Start process--------
07/12/11 22:11:39 log4j:WARN No appenders could be found for logger (wsif).
07/12/11 22:11:39 log4j:WARN Please initialize the log4j system properly.¨

07/12/11 22:11:44 WARNING: Application.setConfig Application: orabpel is in failed state as initialization failed. java.lang.InstantiationException: Error initializing ejb-modules: error in opening zip file; nested exception is: java.util.zip.ZipException: error in opening zip file
07/12/11 22:11:44 WARNING: Application.setConfig Application: hw_services is in failed state as initialization failed. java.lang.InstantiationException: Error initializing ejb-modules: [hw_services:hw_services_ejb:RemoteWorklistService] - Unable to load ejb-class oracle.tip.pc.services.hw.worklist.RemoteWorklistServiceBean, see section 23.2 of the EJB 2.1 specificationoracle.classloader.util.AnnotatedClassNotFoundException:
Missing class: oracle.tip.pc.services.hw.worklist.RemoteWorklistServiceBean
Dependent class: com.evermind.server.ejb.deployment.BeanDescriptor Loader: oc4j:10.1.3 Code-Source: /oracle/product/soa_10.1.3/j2ee/home/lib/oc4j-internal.jar Configuration: in META-INF/boot.xml in /oracle/product/soa_10.1.3/j2ee/home/oc4j.jar
This load was initiated at hw_services.root:0.0.0 using the Class.forName() method.
The missing class is available from the following locations:
1. Code-Source: /oracle/product/soa_10.1.3/bpel/system/services/lib/bpm-services.jar (from in /oracle/product/soa_10.1.3/j2ee/oc4j_soa/config/server.xml) This code-source is available in loader oracle.bpel.common:10.1.3. This shared-library can be imported by the "hw_services" application.

07/12/11 22:11:50 Initializing B2BDiscoveryServlet07/12/11 22:11:54 Finished initializing B2BDiscoveryServlet07/12/11 22:11:56 Oracle Containers for J2EE 10g (10.1.3.3.0) initialized


I then tried to redeploy BPEL services by using the $ORACLE_HOME/config/deploy_bpel.sh script.

This script gave me the following error:

config>> ./deploy_bpel.sh
BUILD FAILED/oracle/product/soa_10.1.3/bpel/system/services/install/ant-tasks/redeploy.xml:33: The following error occurred while executing this line:/oracle/product/soa_10.1.3/bpel/system/services/install/ant-tasks/redeploy.xml:66: Error while expanding /oracle/product/soa_10.1.3/bpel/system/services/lib/workflow_javadoc.jar


I then commeted out the workflow_javadoc.jar from bpel/system/services/install/ant-tasks/redeploy.xml, and then the redeploy works again!

Sphere: Related Content

Tuesday, December 11, 2007

10.1.3.3.1 Patchset Release now available!

Patchset 10.1.3.3.1 for 10.1.3.3.0 is avaliable as Patchid 6492514.

For more information see the BPEL home page.

Sphere: Related Content

Monday, November 26, 2007

Teamwork: Feedback

In software development teams it is important to be open and give feedback. I have been trained to give feedback with my feelings, instead of my thoughts, and to focus on a behaviour in a "I" perspective (Not "the group thinks ").

The structure of the feedback is:

When you ...
I feel that ...
This causes ...
I wish that ...

The "I Feel" makes it hard to argue is a true statement...

I also think that it is important to educate my team on feedback reactions.

The Feedback reaction staircase looks likes follows (I guess i neeed an image for this )

___________________
___________|Continue or Change
________|Understand
_______|Explain
_______|Defend
Reject|

The idea here is that it is important to be able to "catch" feedback in the two uppermost steps, ie it is better to Understand the feedback than to Reject, Defend or Explain your behaviour. It is very,very easy to start explaining your behaviour.

Examples:

Change – ”I think that was good feedback, I will try to change my behaviour, could you help?"
Continiue – ”I think I have undersood your feedback but I will continue as before because ... "
Understand – ”Yes I understand. Could you explain a bit further.."
Explain – ”Yes, but it was because I was tired”
Defend – ”No, you misunderstood”
Reject – ”I Do not care!"

(This is from the ugl.biz courses)

Sphere: Related Content

Thursday, November 22, 2007

Purging runtime documents in B2B

The Oracle B2B purge utilities are used as :

%. setenv.sh (b2b env)
% java -ms1024M -mx1024M oracle.tip.repos.purge.PurgeManager purgeRuntime -start 01-JAN-2007 -end 20-AUG-2007 STATUS
Execution context started.
Purge started, please wait...
Purge completed.

Or with PL/SQL
exec purge_runtime('01-JAN-2007',20-AUG-2007','STATUS')

Where STATUS := Invalid or Error or Complete

Sphere: Related Content

B2B and Tracking Messages in AQ

This thread on Tracking Messages in AQ in the Oracle forums is intresting

Ramesh Nittur Anantharamaiah suggests the following to for a status overview:
SELECT a.queue_table, a.name, b.waiting, b.ready, b.expired
FROM dba_queues a, v$aq b
WHERE a.qid = b.qidAND owner = 'B2B'


Martien van den Akker suggests the following query to be able to see the message ids easily:

SELECT qtb.queue,
qtb.msg_id,
qtb.msg_state,
qtb.enq_time,
qtb.delay,
qtb.user_data.msg_id,
qtb.user_data.inreplyto_msg_id b2b_inreplyto_msg_id,
decode(instr(qtb.user_data.inreplyto_msg_id, ':'), 0, qtb.user_data.inreplyto_msg_id, SUBSTR(qtb.user_data.inreplyto_msg_id, 1, instr(qtb.user_data.inreplyto_msg_id, ':') -1)) inreplyto_msg_id,
decode(instr(qtb.user_data.inreplyto_msg_id, ':'), 0, NULL, SUBSTR(qtb.user_data.inreplyto_msg_id, instr(qtb.user_data.inreplyto_msg_id, ':') + 1)) conversation_id,
qtb.user_data.from_party,
qtb.user_data.to_party,
qtb.user_data.action_name,
qtb.user_data.doctype_name,
qtb.user_data.doctype_revision,
qtb.user_data.msg_type,
qtb.user_data.payload,
qtb.user_data.attachment,
qtb.consumer_namefrom aq$ip_qtab qtb
ORDER BY enq_time DESC;

I also noted that if you have GridControl 10.2 you can create a UDM based on the following query (reference to IOUG Collaborate 07: Oracle 10g Grid Control ) :
select q.owner '.'q.name queue_name, s.readyfrom v$aq s, dba_queues q where s.qid = q.qidand q.owner IN ('B2B')

And then set alert levels as you wish:
Warning "B2B.IP_OUT_QUEUE:50;B2B.IP_IN_QUEUE:50"
Error "B2B.IP_OUT_QUEUE:100;B2B.IP_IN_QUEUE:100"

And then create create error messages such as "Queue %key% contains %value% unattended messages."

Today I also use this query to have a peek in the actual messages and "DUMP" the contents to be able to try to understand a charachter set issue:

SELECT qtb.queue,
qtb.msg_id,
DBMS_LOB.SUBSTR(qtb.user_data.payload,4000,1),
DUMP (DBMS_LOB.SUBSTR(qtb.user_data.payload,4000,1),16)
FROM aq$ip_qtab qtb
WHERE MSG_ID = '3989F49C24206660E0440003BAE85389';


To list the consumers registrated for the B2B in and out queues one may use the following SQL:

SELECT *
FROM aq$ip_qtab_s

Sphere: Related Content

Oracle OpenWorld SOA presentations

Is avaliable here.

Enjoy!

Sphere: Related Content

Tuesday, October 30, 2007

Extending the Oracle BPEL Error Hospital with custom Java Actions

Sjoerd Michels on Extending the Oracle BPEL Error Hospital with custom Java Actions

Sphere: Related Content

Tuesday, October 23, 2007

More Oracle BPEL 10.1.3.3 Fault Policy Management

I looked in the Technote SOA Suite 10.1.3.3.0 New Features again and suddenly there is a new chapter Fault Management Framework in there.. nice!

This new section contains the following topics:
■ Fault Management Framework Overview
■ Designing a Fault Policy
■ Fault Management Framework Use Case
■ Java Action Fault Policy

Sphere: Related Content

Monday, October 22, 2007

Oracle SOA Suite 10.1.3.1+ Cluster ?

Stellan asks "what do you mean with cluster" in his article What is an Oracle SOA Suite 10.1.3.1+ Cluster?

That is an good article!

I ask: What is an Oracle SOA Suite 10.1.3.1 + Oracle Integration B2B 10.1.2 cluster ??

Sphere: Related Content

Wednesday, October 03, 2007

Rameshs Oracle Fusion Middleware B2B Blog

I noticed Ramesh Nittur Anantharamaiah's blog today, nice of Ramesh to share his thought outside of the Oracle Forums.

Sphere: Related Content

Monday, September 10, 2007

Oracle BPEL 10.1.3.3 Fault Policy Management

IT-eye has a good article on Oracle BPEL 10.1.3.3 Fault Policy Management

I have not found any information on what is possible to do in the "test" tag within a condition, but this article sorts part of that out, the below example does "ora-terminate" for the "INVALID_WSDL" fault code.

<condition>
<test>$fault.code/code="INVALID_WSDL"</test>
<action ref="ora-terminate"/>
</condition>

Today however I saw a fault code = "null" from an JCA adapter so I need to have a look at what happens when the fault code is null.

Sphere: Related Content

SOA Suite 10.1.3.3.0 New Features Technote

Oops, I missed this new Technote SOA Suite 10.1.3.3.0 New Features

From the list of contents:

  • Deploying a Custom Worklist Application and Enabling SSO
  • Changing Workflow Standard View Definitions
  • New Database Views for Oracle Workflow
  • File/FTP Adapter New Features
  • MQSeries Adapter New Features
  • Database Adapter New Features
  • AQ Adapter New Features
  • JMS Adapter New Features
  • Oracle ESB Singleton Behavior for Inbound Adapter Endpoints
  • Decision Service Support for Ilog JRules

Sphere: Related Content

Saturday, September 01, 2007

BPEL 10.1.3.3 Debug "keepGlobalVariables"

In our build platform we use three diffent bpel.xml files to be able to use different settings in each environemnt, ie right now we have a dev, test and prod environment so we have three different files.

  • bpel-dev.xml
  • bpel-test.xml
  • bpel-prod.xml

One setting that we usually use set to true in the development environment and false in the others is the keepGlobalVariables property. In BPEL 10.1.3.3. this is not set to true by default.

If thes variable is set to false you will not be able to see variable data in the BPEL Debugger window for BPEL instances that have compleated and the variable is out-of-scope.

To set the keepGlobalVariables property to true add a problerty with the name keepGlobalVariables as follows:

<BPELSuitcase>
<!-- .... -->
<BPELProcess src="test.bpel" id="test">
<configurations>
<property name="keepGlobalVariables">true</property>
</configurations>
</BPELProcess>
<!-- .... -->
</BPELSuitcase>

Sphere: Related Content

Wednesday, August 29, 2007

BPEL 10.1.3.3 Optimizes Assigns

One thing that "noobs" to 10.1.3.3 (including me) is surprised by is that 10.1.3.3 optimizes assigns and transforms. Ie assigns that are in the same scope and directly after each other is coalesced to one since assign.
For instance the following BPEL scope in Jdeveloper:

Is suddenly a single assign in the BPEL console:


It looks to me that the assign activity is named by the first assign in the series, so you should give a good name to that first assign, and remember assign - transform - assign will show up as just a single assign.

Sphere: Related Content

Saturday, August 25, 2007

JDeveloper BPEL Assigns messes with your head ?

Have you ever wondered why the BPEL Assigns are "inline" by default? :

Is it because you should not be able to see the contents of the assign without going to the source code?

As we all know the default can be changed to regular dialogs by changing the "Use inline editors" in the "Diagram Properties" dialog:


Still however the dialog does not remember how you resized it the last time so it always pops up in its default size:When I really wanted:


This is really annoying and time consuming, even one of my first hacks saved the state of the window when the application was closed down.

ZMover to the rescue

Since I think this behaviour is really annoying I use ZMover (thanks to Michael M @ Kentor for the tip) to rearange any "Edit Assign" that pops up. So I suggest that you try it out too if you are frustrated with the "Edit Assigns". Sadly it cannot rearrange the spacing of the columns, so that is left as homework (each time you open a large assign).

Sphere: Related Content

Using Oracle Clusterware for Non-RAC Purposes

Kevin Closson blogs avout Using Oracle Clusterware for Non-RAC Purposes, it seemes that we need to run our protected FTP servers on our Oracle RAC nodes

Sphere: Related Content

Wednesday, August 15, 2007

SOA Suite 10.1.3.3 - Remote fault policies

Prior to SOA Suite 10.1.3.3 one could specify the partnerlink properties retryMaxCount and retryInterval for retrying remote partner link faults within the bpel.xml file:

<partnerLinkBinding name="mypartnerlink">
<property name="wsdlLocation">theWSDL.wsdl</property>
<property name="retryMaxCount">4</property>
<property name="retryInterval">60</property>
</partnerLinkBinding>


In 10.1.3.3 Oracle decided to add a "aspect oriented" fault managment policy framework to ease fault management and to keep it in a central location.

In 10.1.3.3, the the partnerlink properties retryMaxCount and retryInterval are thenfore ignored and the new fault management policies needs to be used instead of the old setup.

The fault managment setup consists of the following files:

  • %ORACLE_HOME%\bpel\domains\\config\fault-bindings.xml
  • %ORACLE_HOME%\bpel\domains\\config\fault-policies\*.xml

Note: If you create a new domain you will need to create the files manually since they are not created by default.

Here "fault-bindings" refers to policies defined in the "fault-polices" folder. That is the fault-bindings file defines which policies that are to be appliced to which processes/partnerlinks.

The XML Schema definitions for the fault policy settings are avaliable in the XMLLIB location:

  • %ORACLE_HOME%\bpel\system\xmllib\fault-policy-binding.xsd and
  • %ORACLE_HOME%\bpel\system\xmllib\fault-policy.xsd

Fault bindings
The fault bindings file defines that fault policy for a specific file so it basically just sets a default policy or specifies fault policies for a specific process:



The example fault bindings file has the following contents:

<?xml version="1.0" encoding="UTF-8"?>
<faultPolicyBindings version="2.0.1" xmlns="http://schemas.oracle.com/bpel/faultpolicy" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<!-- Enabling this will cause all processes in this domain to use this
fault policy -->

<process faultPolicy="DefaultPolicy"/>

<!-- DefaultPolicy is defined in ./fault-policies/DefaultPolicy.xml -->
<partnerLink faultPolicy="DefaultPolicy">

<!-- Enabling this will cause all invoke faults at partner link
name of "creditRatingService" to use fault policy with
id id = DefaultPolicy -->

<name>creditRatingService</name>

<!-- all invoke faults at partner link below port type use fault policy
with id = DefaultPolicy

The following entry covers the samples/tutorials/122.DBAdapter/InsertWithCatch sample. -->

<portType xmlns:db="http://xmlns.oracle.com/pcbpel/adapter/db/insert/">db:insert_plt</portType>
</partnerLink>
</faultPolicyBindings>

Fault policies

The fault polices file defines the action that will occur when a fault binding triggers. An action is defined as:

(Open image in the browser)

The actions provided are:

  1. retry - retry the operation "retryCount" times pausing "retryInterval" seconds between each iteration. If exponentialBackoff is set the "retryInterval" will be increased exponantially. "retryFailureAction" specifies what will happen if the retry operation fails and "retrySuccessAction" specifies an action to take if the retry operation is successful.

  2. rethrowFault - bubble up the fault to the closest "catch" handler

  3. humanIntervention - mark the work item to be "pending recovery from the BPEL console

  4. abort - terminate the instance

  5. replayScope - replay scope fault

  6. javaAction - execute a custom java function

A condition is used to "select" the appropriate action to be taken.


The example and default "DefaultPolicy.xml" file has the following contents:


<?xml version="1.0" encoding="UTF-8"?>
<faultPolicy version="2.0.1" id="DefaultPolicy" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.oracle.com/bpel/faultpolicy" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">



<!-- This section describes fault conditions. Build more conditions with faultName, test and action -->



<Conditions>
<!-- Fault if wsdlRuntimeLocation is not reachable -->
<faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension" name="bpelx:remoteFault">
<condition>



<action ref="ora-retry"/>
</condition>
</faultName>
<!-- Fault if location port is not reachable-->
<faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension" name="bpelx:bindingFault">
<condition>



<action ref="ora-rethrow-fault"/>
</condition>
</faultName>
</Conditions>
<Actions>



<!-- This action will attempt 8 retries at increasing intervals of 2, 4, 8, 16, 32, 64, 128, and 256 seconds. -->



<Action id="ora-retry">
<retry>
<retryCount>8</retryCount>
<retryInterval>2</retryInterval>
<exponentialBackoff/>
</retry>
</Action>




<!-- This is an action will cause a replay scope fault-->
<Action id="ora-replay-scope">
<replayScope/>
</Action>



<!-- This is an action will bubble up the fault-->
<Action id="ora-rethrow-fault"> <rethrowFault/>
</Action>



<!-- This is an action will mark the work item to be "pending recovery from console"-->
<Action id="ora-human-intervention">
<humanIntervention/>
</Action>



<!-- This action will cause the instance to terminate-->
<Action id="ora-terminate">
<abort/>
</Action>
</Actions>
</faultPolicy>

Sphere: Related Content

Oracle names 11g Database price

The Register has a post that Oracle has revieled the 11g Server pricing schema. Here is the Oracle pressrelease.

Oracle options for 11g are: Oracle Real Application Testing, Advanced Compression, Total Recall and Active Data Guard.

Pricing for Oracle Database 11g editions and existing options remains unchanged. The following new Oracle Database 11g Enterprise Edition options are priced as follows:

  • Oracle Real Application Testing -- $10,000 per processor or $200 per named user
  • Oracle Advanced Compression -- $10,000 per processor or $200 per named user
  • Oracle Total Recall -- $5,000 per processor or $100 per named user
  • Oracle Active Data Guard -- $5,000 per processor or $100 per named user.

Oracle's complete technology price list is available at: http://www.oracle.com/corporate/pricing/pricelists.html .

Sphere: Related Content

Patch 10.1.3.3 for SOA Suite status

We have now run the Patch 10.1.3.3 for SOA Suite for two weeks and all tests show that’s better for us. Logging seems much better especially for the BAM sensors and error messages for JDeveloper.

Sphere: Related Content

Thursday, June 28, 2007

Patch 10.1.3.3 for SOA Suite

Patch 10.1.3.3 is now avaliable from metalink.oracle.com as patch number 6148874. As we run Sun Solaris we will need to wait 20-30 days for the patch I guess...

More information is located in the following Metalink Notes:

Oracle Application Server 10g Release 3 (10.1.3) Support Status and Alerts Note:397022.1

Note 435108.1 Oracle Application Server 10g Release 3 (10.1.3.3) Patch Set Notes Addendum

Note 437825.1 Fixed Bugs List - 10.1.3.3 Patchset for Oracle Application Server 10g Release 3

Sphere: Related Content

Tuesday, June 19, 2007

BPEL / SOA 10.1.3.3 Patchset is expected this weekend.

Good news, a Metalink SR post from 13-JUN-07 tells me that 10.1.3.3 Patchset is expected this weekend.

Hopfully some of the quirks will be fixed in this new release. (And the 120+ patched merged )

Sphere: Related Content

Thursday, May 10, 2007

XML parser benchmarks

This article on XML parsing performence is intresting. The Oracle parser is NOT the fastest one as of now it seemes.

Sphere: Related Content

Thursday, April 19, 2007

Good BAM Dashboard design

Recently I have been involved in constructing Oracle BAM dashboards. Usability is a important think when designing BAM dashboards and I found the book Information Dashboard Design very intresting.

In his book Information Dashboard Design, Stephen Few list common mistakes and design patterns for good Dashboards.

The book is avaliable online via Safari and here is the Amazon link





Information Dashboard Design
by Stephen Few
Publisher: O'Reilly
Pub Date: January 2006
Print ISBN-10: 0-596-10016-7
Print ISBN-13: 978-0-59-610016-2
Pages: 223







Book Description (From Oreilly Safari)

Dashboards have become popular in recent years as uniquely powerful tools for communicating important information at a glance. Although dashboards are potentially powerful, this potential is rarely realized. The greatest display technology in the world won't solve this if you fail to use effective visual design. And if a dashboard fails to tell you precisely what you need to know in an instant, you'll never use it, even if it's filled with cute gauges, meters, and traffic lights. Don't let your investment in dashboard technology go to waste.

This book will teach you the visual design skills you need to create dashboards that communicate clearly, rapidly, and compellingly. Information Dashboard Design will explain how to:

  • Avoid the thirteen mistakes common to dashboard design
  • Provide viewers with the information they need quickly and clearly
  • Apply what we now know about visual perception to the visual presentation of information
  • Minimize distractions, cliches, and unnecessary embellishments that create confusion
  • Organize business information to support meaning and usability
  • Create an aesthetically pleasing viewing experience
  • Maintain consistency of design to provide accurate interpretation
  • Optimize the power of dashboard technology by pairing it with visual effectiveness
Stephen Few has over 20 years of experience as an IT innovator, consultant, and educator. As Principal of the consultancy Perceptual Edge, Stephen focuses on data visualization for analyzing and communicating quantitative business information. He provides consulting and training services, speaks frequently at conferences, and teaches in the MBA program at the University of California in Berkeley. He is also the author of Show Me the Numbers: Designing Tables and Graphs to Enlighten. Visit his website at www.perceptualedge.com.

Sphere: Related Content

Sunday, April 08, 2007

Using Windows Powershell with ORACLE on Windows

Oracle Powershell is a free shell from Microsoft for Windows. As a scripting fan I thought I would take a look at it, when I needed a script to start and stop all Oracle services on a test instance.

PowerShell provides access to WMI objects such as WMI:win32_servies and Services "cmdlets" for querying and manipulating Windows Services, among them New-Service, Set-Service, and Get-Service.

The following script lists all information of services

$colItems = get-wmiobject -query "select * from win32_service where name like 'Oracle%'"

foreach ($objItem in $colItems) {

write-host "Display Name: " $objItem.DisplayName
write-host "Accept Pause: " $objItem.AcceptPause
write-host "Accept Stop: " $objItem.AcceptStop
write-host "Caption: " $objItem.Caption
write-host "Checkpoint: " $objItem.CheckPoint
write-host "Creation Class Name: " $objItem.CreationClassName
write-host "Description: " $objItem.Description
write-host "Desktop Interact: " $objItem.DesktopInteract
write-host "Error Control: " $objItem.ErrorControl
write-host "Exit Code: " $objItem.ExitCode
write-host "InstallationDate: " $objItem.InstallDate
write-host "Name: " $objItem.Name
write-host "Path Name: " $objItem.PathName
write-host "Process ID: " $objItem.ProcessId
write-host "Service Specific Exit Code: " $objItem.ServiceSpecificExitCode
write-host "Service Type: " $objItem.ServiceType
write-host "Started: " $objItem.Started
write-host "Start Mode: " $objItem.StartMode
write-host "Start Name: " $objItem.StartName
write-host "State: " $objItem.State
write-host "Status: " $objItem.Status
write-host "System Creation Class Name: " $objItem.SystemCreationClassName
write-host "System Name: " $objItem.SystemName
write-host "Tag ID: " $objItem.TagId
write-host "Wait Hint: " $objItem.WaitHint
write-host


}

Starting and stopping dependent services was not as easy as I initially thought as there seemes to be no access to information about dependent services. (or?)

However the following script starts all services except any DBConsoles

$colItems = Get-Service -include "Oracle*" -exclude "*DBConsole"

write-host "Starting ORACLE Services"
foreach ($objItem in $colItems) {
if( $objItem.Status -eq "Running") {
write-host "Service " $objItem.DisplayName " already started"
} else {
write-host "Starting service " $objItem.DisplayName "."
Start-Service -displayName $objItem.DisplayName
}
}

Get-Service -include "Oracle*"

The script produces the folowing output when run:

PS C:\Documents and Settings\Administrator> & 'C:\Documents and Settings\Administrator\stoporacle.ps1'
Stopping ORACLE Services
Stopping service OracleASMService+ASM .
Stop-Service : Cannot stop service 'OracleASMService+ASM (OracleASMService+ASM)' because it has dependent services. It
can only be stopped if the Force flag is set.
At C:\Documents and Settings\Administrator\stoporacle.ps1:10 char:29
+ Stop-Service <<<< -displayName $objItem.DisplayName Stopping service OracleCSService . Stop-Service : Cannot stop service 'OracleCSService (OracleCSService)' because it has dependent services. It can only b e stopped if the Force flag is set. At C:\Documents and Settings\Administrator\stoporacle.ps1:10 char:29 + Stop-Service <<<< -displayName $objItem.DisplayName Stopping service OracleDBConsoleORCL . WARNING: Waiting for service 'OracleDBConsoleORCL (OracleDBConsoleORCL)' to finish stopping... WARNING: Waiting for service 'OracleDBConsoleORCL (OracleDBConsoleORCL)' to finish stopping... WARNING: Waiting for service 'OracleDBConsoleORCL (OracleDBConsoleORCL)' to finish stopping... WARNING: Waiting for service 'OracleDBConsoleORCL (OracleDBConsoleORCL)' to finish stopping... WARNING: Waiting for service 'OracleDBConsoleORCL (OracleDBConsoleORCL)' to finish stopping... WARNING: Waiting for service 'OracleDBConsoleORCL (OracleDBConsoleORCL)' to finish stopping... WARNING: Waiting for service 'OracleDBConsoleORCL (OracleDBConsoleORCL)' to finish stopping... WARNING: Waiting for service 'OracleDBConsoleORCL (OracleDBConsoleORCL)' to finish stopping... WARNING: Waiting for service 'OracleDBConsoleORCL (OracleDBConsoleORCL)' to finish stopping... WARNING: Waiting for service 'OracleDBConsoleORCL (OracleDBConsoleORCL)' to finish stopping... WARNING: Waiting for service 'OracleDBConsoleORCL (OracleDBConsoleORCL)' to finish stopping... WARNING: Waiting for service 'OracleDBConsoleORCL (OracleDBConsoleORCL)' to finish stopping... WARNING: Waiting for service 'OracleDBConsoleORCL (OracleDBConsoleORCL)' to finish stopping... WARNING: Waiting for service 'OracleDBConsoleORCL (OracleDBConsoleORCL)' to finish stopping... WARNING: Waiting for service 'OracleDBConsoleORCL (OracleDBConsoleORCL)' to finish stopping... WARNING: Waiting for service 'OracleDBConsoleORCL (OracleDBConsoleORCL)' to finish stopping... WARNING: Waiting for service 'OracleDBConsoleORCL (OracleDBConsoleORCL)' to finish stopping... Stopping service OracleOraDb10g_home1TNSListener . Stopping service OracleServiceORCL . WARNING: Waiting for service 'OracleServiceORCL (OracleServiceORCL)' to finish stopping... WARNING: Waiting for service 'OracleServiceORCL (OracleServiceORCL)' to finish stopping... WARNING: Waiting for service 'OracleServiceORCL (OracleServiceORCL)' to finish stopping... WARNING: Waiting for service 'OracleServiceORCL (OracleServiceORCL)' to finish stopping... WARNING: Waiting for service 'OracleServiceORCL (OracleServiceORCL)' to finish stopping... WARNING: Waiting for service 'OracleServiceORCL (OracleServiceORCL)' to finish stopping... WARNING: Waiting for service 'OracleServiceORCL (OracleServiceORCL)' to finish stopping... WARNING: Waiting for service 'OracleServiceORCL (OracleServiceORCL)' to finish stopping... Stopping service OracleASMService+ASM . WARNING: Waiting for service 'OracleASMService+ASM (OracleASMService+ASM)' to finish stopping... Stopping service OracleCSService . Stopping service OracleDBConsoleORCL . Stopping service OracleOraDb10g_home1TNSListener . Stopping service OracleServiceORCL . Status Name DisplayName ------ ---- ----------- Stopped OracleASMServic... OracleASMService+ASM Stopped OracleCSService OracleCSService Stopped OracleDBConsole... OracleDBConsoleORCL Stopped OracleJobSchedu... OracleJobSchedulerORCL Stopped OracleOraDb10g_... OracleOraDb10g_home1TNSListener Stopped OracleServiceORCL OracleServiceORCL The following script stops all services that has a name starting with "Oracle"

$colItems = Get-Service -include "Oracle*"

write-host "Stopping ORACLE Services"
foreach ($objItem in $colItems) {
if( $objItem.Status -eq "Stopped") {

} else {
write-host "Stopping service " $objItem.DisplayName "."
Stop-Service -displayName $objItem.DisplayName
}
}

foreach ($objItem in $colItems) {
if( $objItem.Status -eq "Stopped") {
} else {
write-host "Stopping service " $objItem.DisplayName "."
Stop-Service -displayName $objItem.DisplayName -force
}
}


Get-Service -include "Oracle*"


PS C:\Documents and Settings\Administrator> & 'C:\Documents and Settings\Administrator\startoracle.ps1'
Starting ORACLE Services
Starting service OracleASMService+ASM .
WARNING: Waiting for service 'OracleASMService+ASM (OracleASMService+ASM)' to finish starting...
WARNING: Waiting for service 'OracleASMService+ASM (OracleASMService+ASM)' to finish starting...
WARNING: Waiting for service 'OracleASMService+ASM (OracleASMService+ASM)' to finish starting...
WARNING: Waiting for service 'OracleASMService+ASM (OracleASMService+ASM)' to finish starting...
WARNING: Waiting for service 'OracleASMService+ASM (OracleASMService+ASM)' to finish starting...
WARNING: Waiting for service 'OracleASMService+ASM (OracleASMService+ASM)' to finish starting...
WARNING: Waiting for service 'OracleASMService+ASM (OracleASMService+ASM)' to finish starting...
Starting service OracleCSService .
Starting service OracleDBConsoleORCL .
WARNING: Waiting for service 'OracleDBConsoleORCL (OracleDBConsoleORCL)' to finish starting...
WARNING: Waiting for service 'OracleDBConsoleORCL (OracleDBConsoleORCL)' to finish starting...
WARNING: Waiting for service 'OracleDBConsoleORCL (OracleDBConsoleORCL)' to finish starting...
WARNING: Waiting for service 'OracleDBConsoleORCL (OracleDBConsoleORCL)' to finish starting...
WARNING: Waiting for service 'OracleDBConsoleORCL (OracleDBConsoleORCL)' to finish starting...
WARNING: Waiting for service 'OracleDBConsoleORCL (OracleDBConsoleORCL)' to finish starting...
WARNING: Waiting for service 'OracleDBConsoleORCL (OracleDBConsoleORCL)' to finish starting...
WARNING: Waiting for service 'OracleDBConsoleORCL (OracleDBConsoleORCL)' to finish starting...
WARNING: Waiting for service 'OracleDBConsoleORCL (OracleDBConsoleORCL)' to finish starting...
WARNING: Waiting for service 'OracleDBConsoleORCL (OracleDBConsoleORCL)' to finish starting...
WARNING: Waiting for service 'OracleDBConsoleORCL (OracleDBConsoleORCL)' to finish starting...
WARNING: Waiting for service 'OracleDBConsoleORCL (OracleDBConsoleORCL)' to finish starting...
WARNING: Waiting for service 'OracleDBConsoleORCL (OracleDBConsoleORCL)' to finish starting...
WARNING: Waiting for service 'OracleDBConsoleORCL (OracleDBConsoleORCL)' to finish starting...
WARNING: Waiting for service 'OracleDBConsoleORCL (OracleDBConsoleORCL)' to finish starting...
WARNING: Waiting for service 'OracleDBConsoleORCL (OracleDBConsoleORCL)' to finish starting...
WARNING: Waiting for service 'OracleDBConsoleORCL (OracleDBConsoleORCL)' to finish starting...
Starting service OracleJobSchedulerORCL .
Start-Service : Service 'OracleJobSchedulerORCL (OracleJobSchedulerORCL)' cannot be started due to the following error:
Cannot start service OracleJobSchedulerORCL on computer '.'.
At C:\Documents and Settings\Administrator\startoracle.ps1:10 char:30
+ Start-Service <<<< -displayName $objItem.DisplayName
Starting service OracleOraDb10g_home1TNSListener .
Starting service OracleServiceORCL .
WARNING: Waiting for service 'OracleServiceORCL (OracleServiceORCL)' to finish starting...
WARNING: Waiting for service 'OracleServiceORCL (OracleServiceORCL)' to finish starting...
WARNING: Waiting for service 'OracleServiceORCL (OracleServiceORCL)' to finish starting...
WARNING: Waiting for service 'OracleServiceORCL (OracleServiceORCL)' to finish starting...
WARNING: Waiting for service 'OracleServiceORCL (OracleServiceORCL)' to finish starting...
WARNING: Waiting for service 'OracleServiceORCL (OracleServiceORCL)' to finish starting...
WARNING: Waiting for service 'OracleServiceORCL (OracleServiceORCL)' to finish starting...
WARNING: Waiting for service 'OracleServiceORCL (OracleServiceORCL)' to finish starting...
WARNING: Waiting for service 'OracleServiceORCL (OracleServiceORCL)' to finish starting...
WARNING: Waiting for service 'OracleServiceORCL (OracleServiceORCL)' to finish starting...
WARNING: Waiting for service 'OracleServiceORCL (OracleServiceORCL)' to finish starting...
WARNING: Waiting for service 'OracleServiceORCL (OracleServiceORCL)' to finish starting...
WARNING: Waiting for service 'OracleServiceORCL (OracleServiceORCL)' to finish starting...
WARNING: Waiting for service 'OracleServiceORCL (OracleServiceORCL)' to finish starting...
WARNING: Waiting for service 'OracleServiceORCL (OracleServiceORCL)' to finish starting...
WARNING: Waiting for service 'OracleServiceORCL (OracleServiceORCL)' to finish starting...
WARNING: Waiting for service 'OracleServiceORCL (OracleServiceORCL)' to finish starting...
WARNING: Waiting for service 'OracleServiceORCL (OracleServiceORCL)' to finish starting...
WARNING: Waiting for service 'OracleServiceORCL (OracleServiceORCL)' to finish starting...
WARNING: Waiting for service 'OracleServiceORCL (OracleServiceORCL)' to finish starting...

Status Name DisplayName
------ ---- -----------
Running OracleASMServic... OracleASMService+ASM
Running OracleCSService OracleCSService
Running OracleDBConsole... OracleDBConsoleORCL
Stopped OracleJobSchedu... OracleJobSchedulerORCL
Running OracleOraDb10g_... OracleOraDb10g_home1TNSListener
Running OracleServiceORCL OracleServiceORCL

Sphere: Related Content

Tuesday, March 06, 2007

BPEL PM Java tuning & 64 Bit setup

I recently updated the JVM and added 64 bit support to a Solaris T1 box, this are the instructions:

1. Download the correct Solaris installation from http://java.sun.com/javase/downloads/index_jdk5.jsp

I used Java JDK 1.5.0_11 in this case.

The two files to download are:

32 bit version - jdk-1_5_0_11-solaris-sparc.sh
64 bit plugin - jdk-1_5_0_11-solaris-sparcv9.sh

2. CD to $ORACLE_HOME for the application server

3. Unpack the installations by running the installation programs,

Command lines:

sh /oracle/install/java/jdk-1_5_0_11-solaris-sparc.sh
sh /oracle/install/java/jdk-1_5_0_11-solaris-sparcv9.sh

4. Verify that the install was done in the correct place:

bash$ ls -ald jdk*
drwxr-xr-x 9 oracle oinstall 512 Feb 16 18:15 jdk
drwxr-xr-x 9 oracle oinstall 512 Feb 19 11:54 jdk1.5.0_11

5. Create a backup of the OPMN configuration $ORACLE_HOME/opmn/opmn.xml

cd $ORACLE_HOME/opmn/conf
cp opmn.xml opmn.xml_`date "+%y%m%d%H%M%S"`

6. Edit $ORACLE_HOME/opmn/conf/opmn.xml

Find the XML Element with the content process-type id="oc4j_soa"
and edit the bold sections (three changes in bold):
(libumem and -D64 is optional of course)

<process-type id="oc4j_soa" id="OC4J" status="enabled">
<environment>
<variable id="LD_PRELOAD_64" value="/usr/lib/64/libumem.so.1">
</environment>
<module-data>
<category id="start-parameters">
<data id="java-bin" value="/oracle/product/soa_10.1.3/jdk1.5.0_11/bin/java">
<data id="java-options" value="">-d64</strong> -server -Xmx2g -Xms1g -XX:PermSize=256m -XX:NewRatio=3 -XX:MaxTenuringThreshold=3 -XX:SurvivorRatio=6 -XX:-UseParallelOldGC -Djava.security.policy=$ORACLE_HOME/j2ee/oc4j_soa/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false -Doraesb.home=/oracle/product/as/as_10.1.3/integration/esb -Dhttp.proxySet=false -Doc4j.userThreads=true -Doracle.mdb.fastUndeploy=60 -Dorabpel.home=/oracle/product/as/as_10.1.3/bpel -Xbootclasspath^/p:/oracle/product/as/as_10.1.3/bpel/lib/orabpel-boot.jar -Dhttp.proxySet=false"/> </category>

The variable LD_PRELOAD_64 means that a different memory allocator called lubumen is used. This memory allocaor is designed for multi-cpu and multi-core processors.
It is recommended by Sun here and here for T1 machines.

For more information on libumem and similar Linux allocator see my link collection here.

7. Save the file and validate the change with opmnctl.

% opmnctl validate opmn.xml

8. Restart the application server.

Also se metalink note:368973.1.

Sphere: Related Content

Tuesday, February 06, 2007

How do I create a new user in Oracle SOA Suite and give it permission to domain xyz.

Based on the documentation avaliable here we need to perform the following steps, if we have a "standard" soa suite advanced install:

  1. Create the domain xyz
  2. Create a group/role "BPMxyzDomainAdmin"
  3. Create a user "myxyzuser" and grant the role "BPMxyzDomainAdmin" to the user
  4. Assign the domain admin permission to the "BPMxyzDomainAdmin" role by running
    cd ORACLE_HOME\j2ee\oc4j_soa
    java -Xbootclasspath/a:c:\oracle\soa\bpel\lib\orabpel-boot.jar -jar ..\home\jazn.jar -grantperm jazn.com -role BPMxyzDomainAdmin com.collaxa.security.DomainPermission xyz all
  5. Restart
  6. Done - now the user should be able to login to the xyz domain but not any other domain
    http://host:7777/BPELConsole/xyz/index.jsp

Important to note in step 4 is that we "cd" to the oc4j_soa OC4J container before we run the command, this way the jazn files in that domain is updated.

Edit 080225: Note that the users still need admin permission for deployment/undeployment to work from ant scripts and the like. Eg: you need to grant oc4j-administrators etc

Sphere: Related Content

Friday, January 26, 2007

New data object in BPEL 10.1.3 for getVariableData

In 10.1.2 we could use the following to get variable data in bpelx:exec and custom xpaths:

Element ssn = (Element)getVariableData("input","payload","/tns:ssn");
But this seemes to have changed in 10.1.3 to

import oracle.xml.parser.v2.XMLNode
firstName = ((XMLNode) getVariableData("inputVariable","payload","/client:TestCaseProcessRequest/client:SurName")).getText();

I guess this means that the XML parser has been changed to the Oracle XDK, which is good news since it is a lot (10x) faster than the old OSS parer.

Sphere: Related Content