Export mappings through OMB plus

Hi All,
We have developed 125 mappings across 10 modules. I wanted all mappings .Mdl files separately (E.g : we have mapping names are abc and xyz… we need to mdl file abc.mdl and xyz.mdl).
If I export mappings in Design Center mapping wise it will take alot of to complete/get individual scripts (.mdl)
I heard for time consuming and security wise we should use OMB plus.
Any one helps me to export mappings individually through OMB.
Is there any way to pass mapping name should export the mapping with log file?
Thanks and Regards
Venkat

OK, here is a script that you will be able to adapt get you to where you want to go. Bear in mind that it uses a config file to hold some variables, and library file which I shall also attach.
This script isn't exaclty what you are asking, but it's pretty close. The reason I made this script was to be able to create a clone of an existing project through OMB+ becuase in our corporate dev environment I couldn't lock down the repository in exclusive mode to do this in a simple copy/paste. The script uses a bit of a work-around because the MDL files include full path names, meaning if you export from project A it will want to import into project A. So if I want to import them into project B I take the existing project A, rename it to the desired new name (B), do the export (on a per-unit basis as you want), then rename the existing project back to what it was (A), create the new empty project (B) and import the objects now that the naming structures will match. (whew - did you catch all that?)
Anyway, here is the script. It uses standard TCL for a lot of the file stuff (glob etc), and for cycling through the modules and objects using the TCL foreach statement. Don't worry about the functions you don't recognize like exec_omb. They are in the library (coming up next), which just has to be colocated with the script for the script to reference at runtime:
# PVCS Version Information
#/* $Workfile:   create_deployment_mdl.tcl  $ $Revision:   2.1  $ */
#/* $Author:   michael.broughton  $
#/* $Date:   27 Nov 2008 10:00:04  $ */
# To run this script, start OMB Plus.
# Run this script providing the command (on Windows): source <path>/copy_owb_project.tcl
# e.g. source c:/owb/script/copy_owb_project.tcl
#  Get Current Directory and time
set dtstmp     [ clock format [clock seconds] -format {%Y%m%d_%H%M}]
set scrpt      [ file split [file root [info script]]]
set scriptDir  [ file dirname [info script]]
set scriptName [ lindex $scrpt [expr [llength $scrpt]-1]]
set cnfg_lib "$scriptDir/ombplus_config.tcl"
set owb_lib  "$scriptDir/omb_library.tcl"
#  Import Lbraries
#      Assumes that owb_config and omb_library are in the same directory as this
#      script.
#get config file
source $cnfg_lib
#get standard library
source $owb_lib
#  Set Logfile
#    This will overwrite anything set in the config file.
set    SPOOLFILE  ""
append SPOOLFILE $scriptDir "/log_"  $scriptName "_" $dtstmp ".txt"
# PROCEDURES SECTION
proc owb_export_object {PROJECT_NAME MODULE_NAME MDL_PATH LOG_PATH TYPE TYPELIST} {
   set print [OMBCC '$MODULE_NAME']
   set objList [OMBLIST $TYPELIST]
   foreach objName $objList {
        set objExportStatus [OMBEXPORT MDL_FILE '$MDL_PATH/$objName.mdl' PROJECT '$PROJECT_NAME'\
                               COMPONENTS ($TYPE '$MODULE_NAME/$objName')\
                               OUTPUT LOG '$LOG_PATH/$objName.log']
        puts "$objExportStatus"
   set print [OMBCC '..']
   puts "$print"
# MAIN SCRIPT SECTION
log_msg LOG  "This script is used to copy a minor version project into a major version project and to create a full project mdl file suitable for deployment. "
log_msg LOG  "WARNING: This will overwrite any existing metadata in the major version project. If you have metadata you wish to save, stop now and go take care of that first! "
puts -nonewline "Do you want to continue?(Y/N) "
set EXITEARLY [gets stdin]
if [string match N $EXITEARLY] {
   log_msg LOG  "Exiting...."
   return 0
} elseif [string match n $EXITEARLY] {
   log_msg LOG  "Exiting...."
   return 0
} else {
   log_msg LOG  "Continuing...."
puts -nonewline "Which project do you want to create a deployment file for? "
set CUR_PROJECT_NAME [gets stdin]
puts -nonewline "Under which final project name? "
set NEW_PROJECT_NAME [gets stdin]
puts -nonewline "Local temp directory to use for MDL generation: "
set MDL_PATH [gets stdin]
set LOG_PATH "$MDL_PATH/logs"
#set up the temp directory structure
if [catch { set retstr [file mkdir $MDL_PATH] } errmsg] {
    puts "Cannot create directory $MDL_PATH. due to error: $errmsg"
    puts "Exiting...."
    exit
} else {      
   #make the subdirectories
   file mkdir $LOG_PATH
   file mkdir $MDL_PATH/mappings
   file mkdir $MDL_PATH/transforms
   file mkdir $MDL_PATH/tables
   file mkdir $MDL_PATH/views
   file mkdir $MDL_PATH/sequences
#  Connect to repos
set print [exec_omb OMBCONNECT $OWB_DEG_USER/$OWB_DEG_PASS@$OWB_DEG_HOST:$OWB_DEG_PORT:$OWB_DEG_SRVC USE REPOSITORY '$OWB_DEG_REPOS']
if [omb_error $print] {
    exit_failure "Unable to connect to repository."
} else {
    log_msg LOG "Connected to Repository"   
#    Test given project names
set print [exec_omb OMBCC '$CUR_PROJECT_NAME']
if [omb_error $print] {
   exit_failure "Project $CUR_PROJECT_NAME does not exist. Nothing to copy...."
exec_omb OMBCC '..'
set print [exec_omb OMBCC '$NEW_PROJECT_NAME']
if [omb_error $print] {
   log_msg LOG "Confirmed project $NEW_PROJECT_NAME does not exist..."
} else {  
   log_msg LOG "Target project $NEW_PROJECT_NAME already exists. Dropping...."
   exec_omb OMBCC '..'
   set print [exec_omb OMBDROP PROJECT '$NEW_PROJECT_NAME']
   if [omb_error $print] {
       exit_failure "Unable to drop project $NEW_PROJECT_NAME. Exiting...."
   OMBSAVE
#    Begin export.
log_msg LOG "Temporarily renaming current project to new project name"
set print [exec_omb OMBALTER PROJECT '$CUR_PROJECT_NAME' RENAME TO '$NEW_PROJECT_NAME']
if [omb_error $print] {
   exit_failure "This account does not have alter privileges on this project"
OMBSAVE
OMBCC '$NEW_PROJECT_NAME'
set moduleList [OMBLIST ORACLE_MODULES]
foreach moduleName $moduleList {
   owb_export_object $NEW_PROJECT_NAME $moduleName $MDL_PATH/mappings $LOG_PATH MAPPING MAPPINGS
   owb_export_object $NEW_PROJECT_NAME $moduleName $MDL_PATH/transforms $LOG_PATH PROCEDURE PROCEDURES
   owb_export_object $NEW_PROJECT_NAME $moduleName $MDL_PATH/transforms $LOG_PATH FUNCTION FUNCTIONS
   owb_export_object $NEW_PROJECT_NAME $moduleName $MDL_PATH/tables $LOG_PATH TABLE TABLES
   owb_export_object $NEW_PROJECT_NAME $moduleName $MDL_PATH/views $LOG_PATH VIEW VIEWS
   owb_export_object $NEW_PROJECT_NAME $moduleName $MDL_PATH/sequences $LOG_PATH SEQUENCE SEQUENCES
puts "BACKUP PROCESS has been Completed."
OMBCC '..'
log_msg LOG "Renaming back to original project name"
set print [exec_omb OMBALTER PROJECT '$NEW_PROJECT_NAME' RENAME TO '$CUR_PROJECT_NAME']
log_msg LOG "Creating new project..."
set print [exec_omb OMBCREATE PROJECT '$NEW_PROJECT_NAME']
if [omb_error $print] {
   exit_failure "Unable to create project '$NEW_PROJECT_NAME'"
} else {
   log_msg LOG "Created Project '$NEW_PROJECT_NAME'"
   exec_omb OMBSAVE
   exec_omb OMBCC '$NEW_PROJECT_NAME'
log_msg LOG "Creating modules..."
foreach moduleName $moduleList {
    set print [exec_omb OMBCREATE ORACLE_MODULE '$moduleName']
OMBSAVE
log_msg LOG "Importing Tables..."
set mdl_maps [glob $MDL_PATH/tables/*mdl]
foreach mdl_map $mdl_maps {
     puts "importing TABLE module $mdl_map from MDL file"
     set print [OMBIMPORT MDL_FILE '$mdl_map' USE CREATE_MODE MATCH_BY NAMES]
     puts "$print"
OMBSAVE
log_msg LOG "Importing Sequences..."
set mdl_maps [glob $MDL_PATH/sequences/*mdl]
foreach mdl_map $mdl_maps {
     puts "importing SEQUENCE module $mdl_map from MDL file"
     set print [OMBIMPORT MDL_FILE '$mdl_map' USE CREATE_MODE MATCH_BY NAMES]
     puts "$print"
OMBSAVE
log_msg LOG "Importing Views..."
set mdl_maps [glob $MDL_PATH/views/*mdl]
foreach mdl_map $mdl_maps {
     puts "importing VIEW module $mdl_map from MDL file"
     set print [OMBIMPORT MDL_FILE '$mdl_map' USE CREATE_MODE MATCH_BY NAMES]
     puts "$print"
OMBSAVE
log_msg LOG "Importing PlSql..."
set mdl_maps [glob $MDL_PATH/transforms/*mdl]
foreach mdl_map $mdl_maps {
     puts "importing PLSql module $mdl_map from MDL file"
     set print [OMBIMPORT MDL_FILE '$mdl_map' USE CREATE_MODE MATCH_BY NAMES]
     puts "$print"
OMBSAVE
log_msg LOG "Importing Mappings..."
# import mappings from directory of MDL files
set mdl_maps [glob $MDL_PATH/mappings/*mdl]
foreach mdl_map $mdl_maps {
     puts "importing MAPPING module $mdl_map from MDL file"
     set print [OMBIMPORT MDL_FILE '$mdl_map' USE CREATE_MODE MATCH_BY NAMES]
     puts "$print"
OMBSAVE
log_msg LOG "Completed Import..."
log_msg LOG "Exporting complete project file...."
set objExportStatus [OMBEXPORT MDL_FILE '$MDL_PATH/$NEW_PROJECT_NAME.mdl' PROJECT '$NEW_PROJECT_NAME' OUTPUT LOG '$LOG_PATH/$NEW_PROJECT_NAME.log']
puts "$objExportStatus"
log_msg LOG "Cleaning up temp directory..."
file delete -force $MDL_PATH/mappings
file delete -force $MDL_PATH/transforms
file delete -force $MDL_PATH/tables
file delete -force $MDL_PATH/views
file delete -force $MDL_PATH/sequences
file delete -force $LOG_PATH
OMBDISCONNECT And here is my standard helper library:
# PVCS Version Information
#/* $Workfile:   omb_library.tcl  $ $Revision:   2.9  $ */
#/* $Author:   michael.broughton  $
#/* $Date:   10 Mar 2009 11:04:50  $ */
# Default logging function.
#  Accepts inputs: LOGMSG - a text string to output
proc log_msg {LOGTYPE LOGMSG} {
   #logs to screen and file
   global SPOOLFILE
   if {![info exists SPOOLFILE]} {
       puts "LOGFILE UNDEFINED! :-> $LOGTYPE:-> $LOGMSG"
   } else {
       set fout [open "$SPOOLFILE" a+]     
       puts $fout "$LOGTYPE:-> $LOGMSG"
       puts "$LOGTYPE:-> $LOGMSG"
       close $fout
proc log_msg_file_only {LOGTYPE LOGMSG} {
    #logs to file only
    global SPOOLFILE
    if {![info exists SPOOLFILE]} {
       puts "LOGFILE UNDEFINED! :-> $LOGTYPE:-> $LOGMSG"
    } else {
       set fout [open "$SPOOLFILE" a+]     
       puts $fout "$LOGTYPE:-> $LOGMSG"
       close $fout
proc exit_failure { msg } {
   log_msg ERROR "$msg"
   log_msg ERROR "Rolling Back....."
   exec_omb OMBROLLBACK
   log_msg ERROR "Exiting....."
   # return and also bail from calling function
   return -code 2
proc exec_omb { args } {
   log_msg_file_only OMBCMD "$args"
   # the point of this is simply to return errorMsg or return string, whichever is applicable,
   # to simplify error checking using omb_error{}
   if [catch { set retstr [eval $args] } errmsg] {
      log_msg OMB_ERROR "$errmsg"
      log_msg "" ""
      return $errmsg
   } else {
      log_msg OMB_SUCCESS "$retstr"
      log_msg "" ""
      return $retstr
proc omb_error { retstr } {
   # OMB and Oracle errors may have caused a failure.
   if [string match OMB0* $retstr] {
      return 1
   } elseif [string match ORA-* $retstr] {
      return 1
   } elseif [string match java.* $retstr] {
      return 1
   } elseif [string match Error* $retstr] {
      return 1
   } else {
      return 0
proc ers_omb_connect { OWB_USER OWB_PASS OWB_HOST OWB_PORT OWB_SRVC OWB_REPOS } {
   # Commit anything from previous work, otherwise OMBDISCONNECT will fail out.
   catch { set retstr [ OMBSAVE ] } errmsg
   log_msg LOG "Checking current connection status...."
   #Ensure that we are not already connected.
   if [catch { set discstr [ OMBDISCONNECT ] } errmsg ] {
      set discstr $errmsg
   # Test if message is "OMB01001: Not connected to repository." or "Disconnected."
   # any other message is a showstopper!
   if [string match Disconn* $discstr ]  {
      log_msg LOG "Success Disconnecting from previous repository...."
   } else {
      # We expect an OMB01001 error for trying to disconnect when not connected
      if [string match OMB01001* $discstr ] {
          log_msg LOG "Disconnect unneccessary. Not currently connected...."
      } else {
          log_msg ERROR "Error Disconnecting from previous repository....Exiting process."
          exit_failure "$discstr"
   set print [exec_omb OMBCONNECT $OWB_USER/$OWB_PASS@$OWB_HOST:$OWB_PORT:$OWB_SRVC USE REPOSITORY '$OWB_REPOS']
   if [string match *Connected* $print] {
      return $print
   } else {
      return "OMB0-Unknown Error connecting. Validate connection settings and try again"
proc ers_omb_drop_mapping { MAPNAME } {
    set mplst [OMBLIST MAPPINGS]
    if {[string match *$MAPNAME* $mplst]} {
       log_msg LOG "Mapping $MAPNAME Exists."
       log_msg LOG "Un-Deploying: $MAPNAME"
       set print [ exec_omb OMBCREATE TRANSIENT DEPLOYMENT_ACTION_PLAN 'DEPLOY_PLAN' ADD ACTION 'MAPPING_DEPLOY' SET PROPERTIES (OPERATION) VALUES ('DROP') SET REFERENCE MAPPING '$MAPNAME' ]
       if [omb_error $print] {
           exit_failure "Unable to create Deployment plan for '$MAPNAME'"
       set print [ exec_omb OMBDEPLOY DEPLOYMENT_ACTION_PLAN 'DEPLOY_PLAN' ]
       if [omb_error $print] {
           exit_failure "Error on execute of Deployment plan for '$MAPNAME'"
       exec_omb OMBDROP DEPLOYMENT_ACTION_PLAN 'DEPLOY_PLAN'
       exec_omb OMBSAVE
       set print [exec_omb OMBDROP MAPPING '$MAPNAME']
       if [omb_error $print] {
           exit_failure "Failed attempt to drop existing version of this mapping. Exiting."
proc ers_omb_refresh_object { OBJTYPE OBJNAME } {
   # prompts for refresh of object if exists, except for sequence which do not structurally change.
   # VALID FOR SEQUENCES, TABLES, AND VIEWS ONLY
    global ORA_MODULE_NAME
    set l_objtype [string tolower $OBJTYPE]
    set OBJTYPES $OBJTYPE
    append OBJTYPES "S"
    set tblst [OMBLIST $OBJTYPES]
    if {[string match *$OBJNAME* $tblst]} {
         log_msg LOG "$l_objtype $OBJNAME already exists."
         if [string match SEQUENCE $OBJTYPE] {
             # Sequences don't need refreshing!
            log_msg LOG "No need to refresh sequence..."
            return
         puts -nonewline "Do you want to re-import the $l_objtype?(Y/N) "
         set EXITEARLY [gets stdin]
         log_msg_file_only LOG "Do you want to re-import the $l_objtype?(Y/N) $EXITEARLY"
         if {[string match Y $EXITEARLY] || [string match y $EXITEARLY]} {
            log_msg LOG  "Re-importing $OBJNAME...."
            exec_omb OMBDROP $OBJTYPE '$OBJNAME'
            exec_omb OMBSAVE
            exec_omb OMBCC '..'
            set print [exec_omb OMBCREATE TRANSIENT IMPORT_ACTION_PLAN 'IMPORT_PLAN' ADD ACTION 'IMPORT_ACTION' SET REF SOURCE $OBJTYPE '$OBJNAME' SET REF TARGET ORACLE_MODULE '$ORA_MODULE_NAME']
            if [omb_error $print] {
                exit_failure "Failed attempt to create import plan this  $l_objtype. Exiting."
            set print [exec_omb OMBIMPORT FROM METADATA_LOCATION FOR IMPORT_ACTION_PLAN 'IMPORT_PLAN']
            exec_omb OMBDROP IMPORT_ACTION_PLAN 'IMPORT_PLAN'
            if [omb_error $print] {
                exit_failure "Failed attempt to import this  $l_objtype. Exiting."
            } elseif [string match *Failure* $print] {
                #A failure to create second-class objects will not be caught with omb_error()
                log_msg ERROR "An error prevented proper import. I recommend re-trying import through the GUI, and "
                log_msg ERROR "then re-running this script but answering 'N' to re-import for this  $l_objtype."
                exit_failure "Failed attempt to import this  $l_objtype. Exiting."
            if [string match TABLE $OBJECTTYPE] {
             if [string match I_APLCTN_DTL_DSB_ELGBL_CHLDRN $OBJNAME] {
                set SHDWNAME I_APLCTN_DSB_ELGBL_CHLDRN
             } elseif [string match F_RPTD_ENTLMNT_MNTHLY_SNPSHT $OBJNAME] {
                set SHDWNAME F_RPTD_ENTLMNT_SNPSHT
             } elseif [string match U_PROG_BNFT_PRVSN_ADMS_MAP $OBJNAME] {
                set SHDWNAME U_PROG_BNFT_PRVSN_ADM_MAP
             } elseif [string match U_PROG_BNFT_PRVSN_LGCY_MAP $OBJNAME] {
                set SHDWNAME U_PROG_BNFT_PRVSN_LGC_MAP
             } elseif [string match U_BNFCRY_CMBND_DBL_ENTLMNT $OBJNAME] {
                set SHDWNAME U_BNFCRY_CMBND_DB_ENTLMNT
             } else {
                set SHDWNAME $OBJNAME
                if [catch { set retstr [ OMBALTER TABLE '$OBJNAME' SET PROPERTIES (SHADOW_TABLE_NAME) VALUES ( 'ERR\$_$SHDWNAME')] } errmsg] {
                   log_msg ERROR "Unable to set shadow table name for table $OBJNAME"
                   log_msg ERROR "$errmsg"
            exec_omb OMBCC '$ORA_MODULE_NAME'
         } else {
           log_msg LOG  "Skipping  $l_objtype re-import...."
    } else {
         log_msg LOG " $l_objtype $OBJNAME Does not exist."
         log_msg LOG  "Importing $OBJNAME...."
         exec_omb OMBCC '..'
         set print [exec_omb OMBCREATE TRANSIENT IMPORT_ACTION_PLAN 'IMPORT_PLAN' ADD ACTION 'IMPORT_ACTION' SET REF SOURCE $OBJTYPE '$OBJNAME' SET REF TARGET ORACLE_MODULE '$ORA_MODULE_NAME']
         if [omb_error $print] {
             exit_failure "Failed attempt to create import plan this  $l_objtype. Exiting."
         set print [exec_omb OMBIMPORT FROM METADATA_LOCATION FOR IMPORT_ACTION_PLAN 'IMPORT_PLAN']
         exec_omb OMBDROP IMPORT_ACTION_PLAN 'IMPORT_PLAN'
         if [omb_error $print] {
             exit_failure "Failed attempt to import this  $l_objtype. Exiting."
         } elseif [string match *Failure* $print] {
             #A failure to create second-class objects will not be caught with omb_error()
             log_msg ERROR "An error prevented proper import. I recommend re-trying import through the GUI, and "
             log_msg ERROR "then re-running this script but answering 'N' to re-import for this  $l_objtype."
             exit_failure "Failed attempt to import this  $l_objtype. Exiting."
         exec_omb OMBCC '$ORA_MODULE_NAME'
}    And the config file:
# PVCS Version Information
#/* $Workfile:   ombplus_config.tcl  $ $Revision:   2.0  $ */
#/* $Author:   gerry.hunt  $
#/* $Date:   28 Nov 2008 08:37:12  $ */
# This version of the Config file differs from the standard owb_config.tcl
# used by the deployment script. It requires TWO repository configurations
# (Corporate Design Repository and Deployment location runtime repository)
# and does not require some of the logging / file location info used by the
# install script.
# GLOBAL VARIABLE DECLARATION SECTION
#CORPORATE DESIGN REPOSITORY  CONNECTION INFORMATION
# Login info for the design repository owner
set OWB_DEG_USER    michael_broughton
set OWB_DEG_PASS    my_password
set OWB_DEG_HOST    123.4.5.6
set OWB_DEG_PORT    1628
set OWB_DEG_SRVC     ORCL
set OWB_DEG_REPOS   owb_mgr
# RUNTIME CONTROL CENTER AND LOCATION DECLARATION SECTION
set CONTROL_CENTER_NAME        ERS_CTL_DEVR1000_1T
set CONTROL_CENTER_SCHEMA      owb_mgr
set CONTROL_CENTER_PASS        owb_mgr_PWD
#Connection info to ers_etl_app deployment schema
set DATA_LOCATION_NAME         ERS_DEVR1000_1T
set DATA_LOCATION_VERS         10.2
set DATA_LOCATION_USER         ERS_ETL_APP1T
set DATA_LOCATION_PASS         ERS_ETL_APP1T
set DATA_LOCATION_HOST         host001
set DATA_LOCATION_PORT         1554
set DATA_LOCATION_SRVC         orcl
# PROJECT,MUDULE AND DIRECTORY DECLARATION SECTION
set PROJECT_NAME       ERS_DM_R7_0C6_02
set ORA_MODULE_NAME    ERS_ETL_APPDang... that's a lot of stuff. But it should get you well on your way to what you need.
Cheers,
Mike

Similar Messages

  • Deployment of mappings other than OMB Plus

    I have a question regarding deployment of mappings via OMB Plus. The deployment staff is facing problem in using OMB Plus. I want to ask is there anyother way to deploy mappings other than deploying them via OMB plus. I tried to generate the pl/sql of the mapping and run this sql script in the same schema of other enivornment, but it gave me following error.
    ORA-01403: no data found
    ORA-06512: at "REPOSITORY_SCHEMA.WB_RT_MAPAUDIT_UTIL", line 1027
    ORA-06512: at "STAGING_SCHEMA.MAPPING_01", line 2664
    ORA-06512: at line 4
    I believe that by deploying it from OMB Plus, some audit entries are logged in Repository schema which can not be done by executing the package script simply in sqlplus.
    Can anyone suggest me any other way for deployment of mappings ?

    IMHO, the answer is no. The problem is OWB runtime needs in repository information about installed runnable objects,
    but there is no any public information about structure of OWB repository or public API for deploying except OMBPlus and OWB Client.
    Look at this threads
    Problem Running Process Flow When Database Objects Deployed Outside of OWB
    Deploying without Deploy
    As you can see from second link Jwvandij (Jaap) user explored method of deployment with direct modification of OWB repository for old OWB release.
    Regards,
    Oleg

  • MDL1254: Error occurred exporting mappings.

    Recieved this error when trying to export a project
    MDL1254: Error occurred exporting mappings. See below for more details:
    Detailed Error Message:
    Error in SQL Statement: null. Please contact Oracle Support with the stack trace and details on how to reproduce it.
    Help needed.
    Venu

    Hi,
    what's the version of your OWB Design Repository and your OWB Design Client?
    Validate your complete project to see if there's something strange in it. And try to export only one component, to see if that works.
    Furthermore try to export your project using OMB*Plus (if needed, see commando's below or check the OWB Scripting Reference)
    Cheers!
    Remco
    1. Start OMB*Plus
    2. Logon to your Design Repository
    OMBCONNECT username/password@host:port:service_name USE REPOSITORY 'repository_name'
    3. Export project
    OMBEXPORT TO MDL_FILE 'file_name' FROM PROJECT 'project_name' OUTPUT LOG TO 'log_name'
    ----------

  • How to stop a scheduled job using OMB*Plus ?

    Hello everyone,
    I use a OMB*Plus script to deploy a project in various environments. This includes scheduled jobs.
    In this context, I need to stop the schedules of the previous versions to avoid a script crash.
    I found the OMBSTOP command thad could do, but I need to retrieve the job ID of the schedule I want to stop. And I don't know how to get the Job ID.
    I could get it from a previous launch and save it somewhere, but it wouldn't work if the schedule was manually stopped and restarted. Maybe is there a command that lists the running / scheduled jobs and their IDs? I didn't find it.
    Thanks in advance for your help.
    Cedric.

    Frankly, I cannot see where this is available via pure OMB+, however you could back-door it if if you can figure out how to get these values from the public views (I would guess from the "Scheduling Views" section at http://download-east.oracle.com/docs/cd/B31080_01/doc/owb.102/b28225/toc.htm).
    Then you could use my SQL library from OMB+ to get these values and stop the schedules before deploying. you can save this file as omb_sql_library.tcl and then just "source /path/to/omb_sql_library.tcl in your own script to make the functions available in your script.
    {code}
    package require java
    # PVCS Version Information
    #/* $Workfile: omb_sql_library.tcl $ $Revision: 1.0 $ */
    #/* $Author: $
    #/* $Date: 03 Apr 2008 13:43:34 $ */
    proc oracleConnect { serverName databaseName portNumber username password } {
    # import required classes
    java::import java.sql.Connection
    java::import java.sql.DriverManager
    java::import java.sql.ResultSet
    java::import java.sql.SQLWarning
    java::import java.sql.Statement
    java::import java.sql.CallableStatement
    java::import java.sql.ResultSetMetaData
    java::import java.sql.DatabaseMetaData
    java::import java.sql.Types
    java::import oracle.jdbc.OracleDatabaseMetaData
    # load database driver .
    java::call Class forName oracle.jdbc.OracleDriver
    # set the connection url.
    append url jdbc:oracle:thin
    append url :
    append url $username
    append url /
    append url $password
    append url "@"
    append url $serverName
    append url :
    append url $portNumber
    append url :
    append url $databaseName
    set oraConnection [ java::call DriverManager getConnection $url ]
    set oraDatabaseMetaData [ $oraConnection getMetaData ]
    set oraDatabaseVersion [ $oraDatabaseMetaData getDatabaseProductVersion ]
    puts "Connected to: $url"
    puts "$oraDatabaseVersion"
    return $oraConnection
    proc oracleDisconnect { oraConnect } {
    $oraConnect close
    proc oraJDBCType { oraType } {
    #translation of JDBC types as defined in XOPEN interface
    set rv "NUMBER"
    switch $oraType {
    "0" {set rv "NULL"}
    "1" {set rv "CHAR"}
    "2" {set rv "NUMBER"}
    "3" {set rv "DECIMAL"}
    "4" {set rv "INTEGER"}
    "5" {set rv "SMALLINT"}
    "6" {set rv "FLOAT"}
    "7" {set rv "REAL"}
    "8" {set rv "DOUBLE"}
    "12" {set rv "VARCHAR"}
    "16" {set rv "BOOLEAN"}
    "91" {set rv "DATE"}
    "92" {set rv "TIME"}
    "93" {set rv "TIMESTAMP"}
    default {set rv "OBJECT"}
    return $rv
    proc oracleQuery { oraConnect oraQuery } {
    set oraStatement [ $oraConnect createStatement ]
    set oraResults [ $oraStatement executeQuery $oraQuery ]
    # The following metadata dump is not required, but will be a helpfull sort of thing
    # if ever want to really build an abstraction layer
    set oraResultsMetaData [ $oraResults getMetaData ]
    set columnCount [ $oraResultsMetaData getColumnCount ]
    set i 1
    #puts "ResultSet Metadata:"
    while { $i <= $columnCount} {
    set fname [ $oraResultsMetaData getColumnName $i]
    set ftype [oraJDBCType [ $oraResultsMetaData getColumnType $i]]
    #puts "Output Field $i Name: $fname Type: $ftype"
    incr i
    # end of metadata dump
    return $oraResults
    # SAMPLE CODE to run a quick query and dump the results. #
    #set oraConn [ oracleConnect myserver orcl 1555 scott tiger ]
    #set oraRs [ oracleQuery $oraConn "select name, count(*) numlines from user_source group by name" ]
    #for each row in the result set
    #while {[$oraRs next]} {
    #grab the field values
    # set procName [$oraRs getString name]
    # set procCount [$oraRs getInt numlines]
    # puts "Program unit $procName comprises $procCount lines"
    #$oraRs close
    #oracleDisconnect $oraConn
    {code}
    So you would want to connect to the control center, query for scheduled jobs, stop them, and then continue on with your deployment. I assume that you also need to pause and check that an scheduled job in mid-run has time to exit before moving ahead. You could do a sleep loop querying against system tables looking for active sessions running mappings and waiting until they are all done or something if you really want to bulletproof the process.
    Hope this helps,
    Mike

  • Execute process flow with OMB*Plus

    Hello,
    somebody know how to execute a process flow designed with OWB 9.0.4.8.21 within OMB*Plus?
    Thanks,
    Pedro

    Currently it is not possible to execute Process Flows or Mappings from OMB. OMB is to be used mostly as a metadata manipulation and processing platform, not for run-time management.
    What you could do is to put OMB metadata operation commands and runtime execution commands one after the other in a shell script and then run everything from this shell script (if this is what you are trying to do).
    Regards:
    Igor

  • OMB Plus Script for creating a project

    Hi,
    I am totally new to this OMB Plus.
    Ok. My concern over here is we have been working on some new Mappings. However now for the testing purpose these Maps would be deployed on some other schema with pure Deployment process.
    So i found that while importing the Maps it encountered me an error, the reason was that it was trying to find a project which doesnot exists as its new Source. Ideally importing the Mpas would have created the project automatically but it gave me error.
    Now, to overcome this i thought why not use the OMB Plus script in order to overcome this issue. So i want to creat a .tcl script which will run and will create a project and then once created i may able to import the maps or the complete project without any error.
    So could you please help me with some commands, because on the internet nowhere is mentioned how to create a project or to import a non-existing project.
    Please Help!!!!

    Hi Experts,
    I tried the above link it is really usefull.
    However, when i execute the below statement i m getting an error at the step 2.
    Step1:
    OMBCONNECT <USER_NAME>/<PASSWORD>@<HOST NAME>:<PORT NO>:<SERVICE NAME>
    Step2:
    OMBCREATE PROJECT 'CPP_CPEPLUS'
    Error: oracle.wh.repos.sdk.exceptions.WBException: OWB_NS_FATAL_ERROR100ORA-01403: no data found
    PS: I successfully connected the Step1.
    Please Help!!!!
    Regards,
    BB

  • OMB Plus to set CDC properties of Oracle Module

    Hi,
    Does anybody know if it is possible to set the CDC properties of an Oracle Module using OMB Plus?
    I was thinking in the lines of
    OMBALTER ORACLE_MODULE 'MY_CDC_MODULE' SET PROPERTIES (CDC_CODE_TEMPLATE) VALUES ('PUBLIC_PROJECT/BUILT_IN_CT/JCT_10G_CONSISTENT_MINER')
    but this does not work, and I can't see any appropriate properties in the documentation.
    In addition to setting the CDC template I would like to be able to choose the tables to include in CDC using a script as well. Any help would be appreciated
    Roald
    Edited by: roheie on Oct 12, 2010 12:17 AM

    Hi Oleg,
    I think I may need to clarify my question. I am no trying to alter a template mapping, I am trying to alter the properties of the Oracle Module that is the source for the CDC template mappings
    What I am trying to do in the script is the same operation as you do in the Design Center when you expand Databases->Oracle and then double click your 'CDC_SOURCE_SYSTEM' (example name) module to get to the properties wizard. In there you can set 'Metadata Location', 'Data Location', 'CDC Code Template', and 'CDC tables'. The first two of these I am already setting in my script, what I am asking is how I can set the last two of these properties
    Regards,
    Roald

  • OMB plus Creating Locations Modules And Importing the Metadata?

    Hi All,
    First of all I would like to thank you all of you in advance for all your time and concern. I have serious of questions and I will ask them in 3 different portions as they are slightly different.
    How can I implement the steps below using OMB plus? If you could provided sample script and notation it will be highly appreciated.
    -- Creating an Oracle Location for a Schema and Registering it
    -- Creating an Module and relating it to the location that was created.
    -- Importing the metadata for all the objects in this Schema in to this module.
    For example,
    You have a schema called ORACLE_SRC. I need to create the location and module for this schema and tie them each other. Then I need to import all the metadata for all the objects in this ORACLE_SRC schema. During this import all the preserve statements should be unchecked. And I need to accomplish all these using OMB plus and TCL scripting.
    -- Creating an Non Oracle (SQL server 2005) Location for a database and Registering it
    -- Creating an Module and relating it to the location that was created.
    -- Importing the metadata for all the objects in this Schema in to this module.
    For example,
    You have a schema called SQLSERVER_SRC. I need to create the location and module for this schema and tie them each other. Then I need to import all the metadata for all the objects in this SQLSERVER_SRC schema. During this import all the preserve statements should be unchecked. And I need to accomplish all these using OMB plus and TCL scripting.
    -- Creating an Flat File Location for a folder structure and Registering it
    -- Creating an Module and relating it to the location that was created.
    For example,
    You have a schema called FLATFILE_SRC. I need to create the location and module for this schema and tie them each other.
    Thanks again for all your help and concern!
    Kind Regards,
    Mike

    In addition to the performance issue above I have faced an extremely more important problem. When I have used the same logic for importing Materialized views I am getting an error at the last step of the script. It is exactly the same case also for EXTERNAL_TABLE objects. TABLE and VIEW objects are fine. OMBIMPORT command throw the error message below.
    PUB04201: Encountered an internal fatal error during processing of oracle module XXX_DMY_DWPROD_TST: unsupported obj type.
    I would like to mention that MATERIALIZED_VIEW is the object name I took from OWB scripting Reference guide. I have tried couple other naming conventions too but it didn't work.
    Strange thing is If I were to change MATERIALIZED_VIEW to TABLE it works but the materialized view gets imported into 'Tables' folder under the module.
    Please help?
         #IMPORT FOR MATERIALIZED VIEWS STARTS
    #pull the names of the object inthe schema
         set MVIEWLIST {}
         set sqlStr "select distinct Mview_Name from all_mviews where owner = upper('$DbNm') order by Mview_Name"
         #execute the query
         set oraRs [oracleQuery $oraConn $sqlStr]
         #Loop through the list of objects
         while {[$oraRs next]} {
              set mvwName [$oraRs getString Mview_Name]
              lappend MVIEWLIST $mvwName
         #and close the query
         $oraRs close
         set listCntr 0
         set listTotal [llength $MVIEWLIST]
         set mviewName [lindex $MVIEWLIST $listCntr]
         #First object
         OMBALTER IMPORT_ACTION_PLAN 'IMPORT_ALL' ADD ACTION 'MAT_VIEWS' SET REF SOURCE MATERIALIZED_VIEW '$mviewName' SET REF TARGET ORACLE_MODULE '$ModNm'
         OMBCOMMIT
         puts "$mviewName is being imported"
         incr listCntr
         while {$listCntr<$listTotal} {     
              #Rest of the objects
              set mviewName [lindex $MVIEWLIST $listCntr]
              incr listCntr
              OMBALTER IMPORT_ACTION_PLAN 'IMPORT_ALL' MODIFY ACTION 'MAT_VIEWS' SET REF SOURCE MATERIALIZED_VIEW '$mviewName' SET REF TARGET ORACLE_MODULE '$ModNm'
              OMBCOMMIT
              puts "$mviewName is being imported"
         set listCntr 0
         set listTotal 0     
         #IMPORT FOR MATERIALIZED VIEWS ENDS
              OMBIMPORT FROM METADATA_LOCATION FOR IMPORT_ACTION_PLAN 'IMPORT_ALL'
              OMBDROP IMPORT_ACTION_PLAN 'IMPORT_ALL'

  • Inserting sql scripts in OWB 10g using OMB PLUS

    Hey burleson, thanks for the reply..
    Infact i am new to OWB and my question can be very silly to you.
    Infact i have 1 source table in OWB named 'SALGRADE' which contains data and i have 1 target table named 'TARGET_SALGRADE' which has the same structure as the source table.
    The script i have run and tested is as such :
    INSERT INTO TARGET_SALGRADE
    (GRADE,
    LOSAL,
    HISAL)
    SELECT
    GRADE,
    LOSAL,
    HISAL
    FROM SCOTT.SALGRADE;
    I have tested it in sqlplus and the update has been done.
    Can you please tell me how do i proceed in OMB PLUS and how do i write the script there??
    Regards,
    Amrish

    You can run SQL scripts using the SQLPLus activity in a process flow.
    But the traditional mechanism to move data in OWB is using mappings. The post below might be interesting if you know SQL to understand how mappings are constructed;
    http://blogs.oracle.com/warehousebuilder/2007/08/sql_and_owb_accelerated_map_co.html
    Cheers
    David

  • OWB PRO out there : is it possible SQL to execute OMB*PLUS from Database ?

    Hi,
    With 11g out : is there any expert who sucessfully integrate pl/sql routine to call OMB. Here's the point : You have an APEX application and you design your stuff and at one point you wish you just have to press a button and generate a first draft of your design in the OWB repository, and then developpers can have a frame to start designing from your perspective.
    Also, imagine you have an APEX form to approve the testing of a design or process flow or both, and when you press the i approve button, you get call an OMB*Plus routine that do all the export->import reconcile and deploy thing!
    I don't think i'm alone to need this kind of stuff. So since OWB is Java, and Oracle database speek Java : is it possible to think of a quick solution ?
    Thank you all.
    Message was edited by:
    bpaquet

    Hi bpaquet,
    As you know OMB+ is TCL extension, and as i know OMB is not integrated into RDBMS.
    I think, there can be several solutions.
    1. Execute shell scripts from db using dbms_pipe package.
    2. Execute shell scripts using some java external procedure.
    3. Create some OS scheduled job (crontab), which will check some values in DB and execute OMB scripts.
    Regards

  • OMB Plus Scripts

    Hi all,
    I am a newbie to OWB.I have some trouble in doing OMBCC MAPPING_NAME command.
    This is the exact thing which i got.
    OMB*Plus: Release 11.1.0.6.0
    Copyright (c) 2000, 2007, Oracle. All rights reserved.
    OMB+> OMBCONNECT rep_owner/[email protected]:1521:erepos USE WORKSPACE 'DE
    V_WORKSPACE'
    Connected.
    OMB+> OMBLIST PROJECTS
    DWH_EREPOS EREPOS MARC_EREPOS MY_PROJECT PUBLIC_PROJECT STG_TO_PROSPECT_CONTACT
    OMB+> OMBCC 'DWH_EREPOS'
    Context changed.
    OMB+> OMBLIST ORACLE_MODULES
    DWH_PROSPECT DWH_PROSPECT_STG STG_TO_PROSPECT
    OMB+> OMBCC 'DWH_PROSPECT_STG'
    Context changed.
    OMB+> OMBLIST MAPPINGS
    M_API M_BTCUSTPREFERRED_STG M_DNCHANGE_REQUEST M_INPUT_FEEDFILE_NAD M_SRC_MOVE_F
    ILE_BAT M_STG_CONSENT_CRF M_STG_CONTACT_CRF_V2 M_STG_CONTACT_CRF_V_SHOW_TELL
    OMB+> OMBCC 'M_API'
    OMB01051: Path M_API must include a folder as the last step.
    Could anyone tell me where i went wrong....
    Thank you...

    Hi
    OMBCC is only for folder objects (such ad projects and modules), mappings are not folders. If you want to get mapping details you can use OMBRETRIEVE MAPPING command.
    For example;
    OMBRETRIEVE MAPPING 'M_API' GET TABLE OPERATORS
    See doc for more details;
    http://download.oracle.com/docs/cd/E11882_01/owb.112/e14406/chap19015.htm#FFHHAEHC
    Cheers
    David

  • What is the diffrence between OMB plus command and OMB command

    what is the diffrence between OMB plus command and OMB command?
    are they both TCL command?

    Hi Alena,
    Welcome to SDN.
    Check this
    EXIT in Loops and Modularization Units
    Basic form
    EXIT.
    Effect
    Within a loop structure:
    Terminates looop processing (DO, WHILE, LOOP, SELECT).
    Within subroutines and other modularization units (but not in a loop structure):
    Leaves the subroutine or modularization unit (FORM, MODULE, FUNCTION, TOP-OF-PAGE, END-OF-PAGE).
    Outside loop structures and modularization units (report processing):
    Terminates report processing and triggers list display.
    But not sure about
    atexit() .. ,may use in Object Oriented Programming.
    (C++)
    "At exit-command in module pool."
    Mohinder
    Edited by: Mohinder Singh Chauhan on Aug 1, 2008 8:06 AM

  • How can I get TV shows viewed through Hulu Plus on the Apple TV 3 to show as widescreen with black bands above and below the screen shot instead of chopping off the sides on my non-widescreen TV?

    I just bought a new Apple TV 3 today so I can watch shows from Hulu Plus without having to physically plug in separate audio and video cables from my Macbook Air to the TV every time. I have a non-widescreen TV and when I normally watch Hulu Plus on the TV (though Safari on my plugged in Macbook Air as mentioned above), the entire wide screen shot is shown with black bands above and below the sceen shot since I am watching a widescreen program on a non-widescreen TV.
    However, I noticed that when I watch the same show through Hulu Plus on my new Apple TV 3, the left and right edges of the shot are chopped off to make the program fill my non-widescreen TV. This bothers me because I would like to see the full shot and not just the chopped off middle portion. This is a real bummber because watching Hulu Plus without having to plug in my laptop is the only reason I bought the Apple TV. Is there anything I can do about this?
    Thanks!
    (FYI: I have the very first Macbook Air that is not capable of mirroring)

    How are you actually connected to the TV?  Does it have HDMI?  Most non-widescreen TVs would not.
    I would suspect a converter is either not outputting properly, your TV not interpreting the signal properly or you have some form of Zoom setting enabled on the TV.
    How does your TV handle widescreen from say cable or terrestrial TV sources ?
    Unfortunately AppleTV is not designed to be used with non-widescreen TVs so there's no setting on AppleTV to tweak.
    AC

  • OMBCREATE LOCATION hangs (OMB*Plus 11.1.0.7)

    My try to create a file location in OMBPlus failed.
    OMBCONNECT <ConnectString> USE WORKSPACE 'RUNTIME' USE MULTIPLE_USER_MODEConnected.
    OMBCONNECT CONTROL_CENTER <ConnectString> USE WORKSPACE 'OWNER.RUNTIME'Control Center connected.
    OMBCREATE LOCATION 'LOC_FILE' SET PROPERTIES (TYPE, ROOTPATH) VALUES ('FILE_SYSTEM', '/tmp')Even after several minutes there is no return of the last command !
    Info: The location already exist, OMB*Plus is 11.1.0.7
    Any ideas how to solve that issue?
    Beat

    user12086319 wrote:
    Hi EdStevens,
    Following the instructions in previous post, I can connect with SQL plus (the database is on the same box* as your sqlplus client); I just enter sqlplus in windows console.
    In addition, i am still curious about how SQL plus connect to a remote* box. Could you shed more light on that?SQLPlus connects to a remote db the same way any other app does. After all, sqlplus is just another client app.
    It's all in the connect string. So say, at a command prompt you enter
    $> sqlplus scott/tiger@mydbso in the above example, 'scott' is the user, 'tiger' is the password, and 'mydb' is the tns service name. Of course, the OS passes all that to sqlplus as a command line parameter. Internally, sqlplus makes a call to the tns layer and passes it the connect information it has. TNS will take a look at the tnsnames.ora file and find an entry for 'mydb', and from there it will get the name or ip address of the host server, a port number, and a service name. That information will be passed on down the network stack for routing. (If a name was provided instead of an ip address, the OS network stack will use whatever means are at its disposal - a hosts file, a dns lookup, or whatever, to get an ip address). The request will arrive at the specified host and placed on the specified port. If everything was configured correctly, there will be an oracle listener process monitoring that port. It will pick up the request and see if it recognizes the service name. If it does, it will spawn a user server process on a different port to complete the connection, then get out of the way and continue listening for more requests.
    This is how it happens most of the time. There are a lot of other variants, but that's the gist of it.
    More information can be found in the fine documentation at tahiti.oracle.com.

  • Installing OMB Plus in Oracle JDeveloper

    Hello
    I have JDeveloper 11.1.1.3.0, and I like to enable the IDE for OMBPlus development.
    I followed the guide at http://download.oracle.com/docs/cd/B28359_01/owb.111/b31279.pdf (appendix Installing OMB Plus in Oracle JDeveloper)
    1. Drop shiphome/owb/lib/int/OMBPlus_jdev.jar in the JDeveloper
    installation directory/lib/ext directory.
    2. Start JDeveloper.
    3. From the Tools menu, select Preferences, OMBPlus, and then OMBPlus
    Installation to set the Warehouse Builder installation directory. For example,
    c:\oracle\ora81. Do not include the Warehouse Builder directory at the end
    of this path.
    4. Restart JDeveloper.
    Repeat steps 3 and 4 each time you change the Warehouse Builder installation
    directory.
    However I do not get a OMBPlus menu in the Preferences window.
    Can you please help me?
    /kasper

    kasper,
    There is a bug report in support.oracle.com with the exact same symptoms - I could find no documentation about the version of JDev supported by OMBPlus, but I'm strongly guessing that JDev 11 isn't supported. In fact, I guarantee it.
    I've cracked open OMBPlus.jar and had a look at the extension manifest - it's for JDev 9.0.x, which isn't available to download any more. Your best bet would probably be to file a support request to see what they have to say.
    John

Maybe you are looking for

  • Windows 8.1 dual boot rEFInd

    Hi Everyone, Here's what I have done with my Intel NUC. I have a 480 GB mSATA SSD and 1 TB 2.5" SATA HDD and this is my partition layout NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 931.5G 0 disk └─sda1 8:1 0 931.5G 0 part sdb 8:16 0 447.1G 0 di

  • Support Chinese Character

    Hi, I have some problems on handling Chinese Character. I pass Chinese words to CFC and then do the SELECT search in DB. However, I find it cannot find Chinese words correctly. When I try to prompt (  alert(#trim(URLDecode(search_tenderee_name))#)  )

  • BOM Change - Delete an item(s) and insert new line items

    Hi, We need to mass update BOMs like for some of the existing BOM's we need to delete some line items and insert new line items. We want to use the BOMMAT04 IDOC in LSMW but I'd like to know couple of things before I go ahead with that approach For i

  • Error message F5 726 in MIRO

    Hi, I have a problem, in MIRO when a have a subsequent debit or a invoice with price difference exceeds the defined limit of tolerance in SPRO,  i have a error message F5 726 i'm not understand why? I am launching a invoice/subsequent debit in the pe

  • Automatic service setup with network accounts

    Hi all, I'm having terrible trouble getting automatic service (e.g. iCal, iChat, etc.) setup to work with network accounts, either with network home directories or local home directories, and I can't work out what I'm doing wrong. When I log in as a