Using OMBPlus to deploy a series of mappings
After working with Oracle Warehouse Builder 10g R2 for several months, I’m now back to working with OWB 9.2. One sometimes frustrating feature of version 9.2 is the inability to deploy objects and edit objects at the same time (in one instance of OWB). As deploying mappings takes too long due to temporary performance issues, I looked into OMBPlus scripts to improve my efficiency, as OMBPlus scripts run independent of OWB.
Below you see a OMBPlus script that will deploy mappings in a given project and module. It is assumed that all mappings are in one and the same module of one and the same project. A parameter needs to be entered to select which mappings will be deployed. Either sum up the mappings using a space as a separator (eg. MAP1 MAP2) or state one name that includes a wildcard (e.g. MAP&). Of course, the script can be altered to deploy any type of objects.
proc deploy_mappings {} {
# Connect to the repository
OMBCONNECT user/password@DB USE REPOS 'repos'
#Change context to the desired project.
OMBCC 'YOUR_PROJECT'
# Change context to the desired module.
OMBCC 'YOUR_MODULE'
# Connect to the runtime repository
OMBCONNECT RUNTIME 'runtime' USE PASSWORD 'xxx'
#
puts "What mapping(s) do you want to deploy? "
puts "Give either one mapping name (which can contain wildcards) "
puts "or sum up all the mappings to deploy"
puts -nonewline "Mapping(s)? "
gets stdin mappings
set mystring [string first " " $mappings]
if {$mystring != -1} {set mapList $mappings} else {set mapList [ OMBLIST MAPPINGS '$mappings.*' ]}
puts mapList
set J 1
foreach mapName $mapList {
puts [concat "Deploying" $mapName "at" [clock format [clock seconds] ] ]
OMBCREATE TRANSIENT DEPLOYMENT_ACTION_PLAN 'DEPLOY_PLAN' \
ADD ACTION 'DEPLOY_MAP' SET PROPERTIES (OPERATION) \
VALUES ('CREATE') SET REFERENCE MAPPING \
'$mapName'
OMBDEPLOY DEPLOYMENT_ACTION_PLAN 'DEPLOY_PLAN'
OMBDROP DEPLOYMENT_ACTION_PLAN 'DEPLOY_PLAN'
OMBCOMMIT
incr J
}
puts " "
puts [concat "Deployment finished succesfully at" [clock format [clock seconds] ] "." ]
puts [concat [expr $J - 1] "mapping(s) have been deployed." ]
OMBDISCONNECT
}
I hope this example shows it’s relatively easy to use the OMBPLus scripting language. For more information, see Oracle Warehouse Builder 10g Scripting Language – Home Page for more information. Please note that the information is also valid for OWB 9.2.
Comments: (0)
Blogs
- 26 Jul
- 10 Jun
- 02 Jun
- 26 Mar
- 25 Feb
-
05 Nov
Some tips & tricks on migrating SOA Suite 10g to 11g – Part 2
- 04 Nov
- 02 Nov
- 25 Oct
- 20 Oct
- Best practices 2 - Web Services
- Fault handling in Oracle SOA Suite 11g - Part II
- Fault handling in Oracle SOA Suite 11g
- Migrating Web Services from JDeveloper 10g to 11g
- Migrating EJB 3 applications from OC4J to WebLogic
- Best practices for BPM, SOA and EDA
- Some tips & tricks on migrating SOA Suite 10g to 11g - Part 2
- Logging messages in Oracle SOA Suite 11g using OWSM
Loading ...