A little bit of OMB+ goes a long way
July 9th, 2007 by Borkur Steingrimsson
The other day I was doing some OWB work for a client. I had done some 60 mappings of the most basic kind, when I noticed that the mapping I had used as the basis (I use copy/paste a lot when working with OWB) had the ‘Maximum number of errors’ runtime parameter set to the ever-so-strange default value of ‘50′. Instead of click away through the field of mappings I had done, I came up with a tiny OMBPlus script to do the work for me. As I consulted with the client we agreed that the value should be ‘0′ for all the mappings in the repository. So I augmented the script to loop through all the projects and all the mappings.
set projectList [OMBLIST PROJECTS]
foreach projectName $projectList {
OMBCC '$projectName'
puts "Project: $projectName"
set moduleList [OMBLIST ORACLE_MODULES]
foreach moduleName $moduleList {
puts "Process: $moduleName"
OMBCC '$moduleName'
set mappingList [OMBLIST MAPPINGS]
foreach mappingName $mappingList {
puts "Altering: $moduleName/$mappingName"
OMBALTER MAPPING '$mappingName' SET PROPERTIES (MAXIMUM_NUMBER_OF_ERRORS) VALUES ('0')
}
OMBCC '..'
}
OMBCC '..'
}
OMBCOMMIT
August 23rd, 2007 at 3:08 pm
Borkur, just FYI, if you’re using OWB 10gR2, there is a nice utility on the OWB Exchange that lets you set properties for whole sets of any type of object (maps, tables, etc.) on the OWB Exchange. We use it all the time to set every table to parallel, etc.
Works great, and has a nice front end.
FYI, I’ve been doing OWB development for over a year now, and I’ve NEVER had to use OMB scripting. I’m still not sure why everyone does?
Thx,
Scott