Running scripts in OMB Plus with parameters. Is it possible?

Hi,
I know that we can run omb scripts from unix command line like >OMBPlus.sh test.tcl
My doubt is: Can we pass parameters? If yes, how can i treat them on the script?
Thank You,
Filipe

Hi,
After what's explained above you can do something like this in your script :
foreach module [OMBLIST ORACLE_MODULES] {
OMBCC '/your_project/${module}'
foreach mapping [OMBLIST MAPPINGS] {
puts "${mapping} is in the module '${module}'."
Regards,
Florent

Similar Messages

  • "Run Script" (F5) Flacky Behavior with CREATE PROCEDURE and PACKAGE

    When I have the following create statement in a SQL Worksheet and run the script using "Run Script" (F5), I get the "PROCEDURE bogus Compiled." message. Why does it not tell me that there was a compile error? The procedure is marked with a little red "X" in the connections pane.
    CREATE OR REPLACE PROCEDURE bogus IS
    BEGIN
      x := 1;
    END;
    /Also, when I have the following command in a SQL Worksheet and run the script using "Run Script" (F5), I get the "PROCEDURE bogus Compiled." message. The difference is that I removed the slash after the CREATE PROCEDURE command. I can go into that procedure in the database via the Connections pane, click on the compile button, and the procedure compiles with no errors. Why does it not compile in a script when missing the slash?
    CREATE OR REPLACE PROCEDURE bogus IS
    BEGIN
      NULL;
    END;I noticed the same flaky behavior with CREATE PACKAGE BODY as well. This is in version 1.0.0.14.67 on Windows XP. Has this been fixed in the latest version?
    Mike

    I found a number of earlier posts on this (going back to at least v804), but I cannot find a thread with a response from the SQL Developer team - see:
    Package compilation error
    Succesful compilation message and Compiling Invalid Objects
    Creating a stored procedure from a file does not show compilation errors
    Re: Syntax Error Feedback
    I assume that it is just a bug with SQL Developer that it does not check for compilation errors when determining the status message to display (ie "PROCEDURE bogus Compiled"). At least now we get the little red cross on the navigator to tell us it is invalid :)

  • Cron job not running - script uses rsync, ssh (with id_rsa)

    Does anyone know how to get cron to run a rsync/ssh script which uses id_rsa for passwordless logins?
    I have a backup script I have slaved for months over that works wonderfully when running it from the command line.
    It uses rsync and connects with SSH (passwordless using ssh keys). I have setup id_rsa and id_rsa.pub for passwordless logins (this is my user account, and connects using root@ to the server)
    As stated all works find when run from the command line. But when I setup a cron job to run this file (exact same line I run from the command line) it does not execute. Actually, it does run, as I have an email notifiction which sends to me. It is just the rsync/ssh part that does not run.
    I have spent days and days trying to figure it out. No error messages occur, nothing.  Took me a while to find out cron is emailing the user account on Lion the messages (not to a proper email address).
    The error shows a permission denied, which I believe to be the cron user cannot use the id_rsa/ssh connection.
    Cron is running the script as my user, the same I use on the command line. I even tried copying the id_rsa to the root user .ssh folder in case cron is running as root but that does not work either.
    So does anyone know how to get cron to run this rsync/ssh script which used id_rsa for passwordless logins?
    Thanks a lot

    YES! Got it working, finally!
    So the issue is indeed cron/launchd not being able to access the ssh-agent which holds the key.
    So this is the solution...
    Download keychain for Mac:
    http://www.funtoo.org/wiki/Keychain
    Then once its installed and configured, the script to run needs this added to the top:
    eval `keychain --noask --eval id_rsa` || exit 1
    Note I am using id_rsa whereas keychains instructions refer to id_dsa so I just changed it and it works OK.
    When the script runs the first time it asks for the key password. Then it works from then on.
    What I do not know yet is will I need to re-enter the password when I logoff/logon again. That will cause an issue as I auto restart the Mac every day which means if I am off for a few days backup will stop (can you see the madness in this issue!).

  • Running report from forms 10g with parameters

    db and dev 10g ,
    hi all , my report displays "sal and ename" columns of scott/tiger schema .
    i've seen a lot of articles talking about this but i want you to help me to get it :
    1- i want to run report by assigning a value to the "report other" property of the report object .
    i've tried it like so , i wrote sal = 800 or ename = 'SCOTT' in that property "report other" . and it did not work .
    2- and i want to how to do the same with "set_report_object('myrep',report_other,..........) ;
    3- i did it before with a parameter list by creating a parameter in the report builder called "p_sal" and p_ename then
    created a parameter list with :sal and :ename text_items as parameters then added the parameter list to
    run_report_object('myreport',pl) and it did not work too .
    please clarify these to me
    thanks a lot

    newbi_egy wrote:
    SET_REPORT_OBJECT_PROPERTY(ro,REPORT_OTHER, 'p_deptno='||:dept.deptno||'paramform=no');
         v := run_report_object(ro) ;
         web.show_document('http://rocky:8889/reports/rwservlet/getjobid'||substr(v,instr(v,'_')+1)||'?server=rocky','_blank') ;
         end ;
    when i press the button , FRM-41214 shows up in the form , and REP-52251 ,and i still can not run it .
    do i miss something ?
    by the way , when i typed this in the address bar :
    http://rocky:8889/reports/rwservlet/showjobs?server=rocky , then clicked "x" button , then
    i got this
    <br>REP-300: invalid number where deptno = : ==> p_deptno finished with error
    thanks
    Hi,
    You can not check the second link i provided where parameter passing issue is clearly mentioned. you should give space before all parameter.
    Check the second link, it will help you. And for your correction
    SET_REPORT_OBJECT_PROPERTY(ro,REPORT_OTHER, 'paramform=no p_deptno='||:dept.deptno);Hope you understand...
    Hamid

  • Xslt emitting functoid with parameters is it possible ?

    Hello,
    I am developing a functoid that emits xslt.
    We have a requirement to map a header and that map is rather complex and will occur frequently.
    By putting that complexity inside a single functoid that emist the xslt we now have a nice solution for this problem.
    Now we drag a functoid on the map and connect the single header element to the input and one to the output.
    Everything is working as expected and the functoid emits a large xslt into the map resulting in a mapped header.
    But now I need to add several input string to the functoid and use those inputs in my script…..
    The scripttype that is being emitted is inline xslt !
    So I need the input variabele and wrap it in xslt as a variable declaration. Like so:
    <xsl:variable name="var:v1" select="SomeFuntoidInputParameterValue" />
    But I see no way to get to the input variabeles inside the getscriptbuffer method…..
    Anybody ever did something like this and wants to share the info?
    Thanks
    Well0549, Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread

    Well.....
    You could consider my functoid and index functoid. All I want is to have a parameter added as a value in my script.
    If I Add 2 in the index functoid I see that reflected in the resulting declaration in xslt that is exactly what i want.
    But i can't seem to get to the parameters once i am in the scriptbuilder.....
    Well0549, Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread

  • Update the TCL-version used by OWB Scripting OMB Plus

    While implementing scripts under OMB Plus, I need to use/import some already existing TCL-libraries. This libraries need a TCL-version 8.2 or higher. But the TCL-version installed with the OracleWarehouseBuilder is 8.0.
    How can I update the TCL-version used by OWB Scripting (OMB Plus)?
    thanks

    Hi
    I would also like to know how to do this as on certain platforms some basic TCL commands don't work when run in scripts so upgrading the TCL version should hopefully fix this.
    Thanks In Advance
    Ian

  • 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

  • What is the best way to run a powershell script with parameters in the Task Scheduler?

    Hello, 
    Want to run the following from a scheduled task in the Task Scheduler on a server.  What is the best approach?
    .\pscript.ps1 -csvfile "\\Srv1\Share\File.txt"
    Thanks for your help! SdeDot

    Hi,
    To run a powershell script with parameters in the Task Scheduler:
    Program: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
    Add argument (optional): -Command "& c:\scripts\test.ps1 -par1 2 -par2 3"
    Hope the below two articles be helpful for you:
    Schedule PowerShell Scripts that Require Input Values
    https://blogs.technet.com/b/heyscriptingguy/archive/2011/01/12/schedule-powershell-scripts-that-require-input-values.aspx
    How to Schedule a PowerShell Script
    http://dmitrysotnikov.wordpress.com/2011/02/03/how-to-schedule-a-powershell-script/
    Regards,
    Yan Li
    Regards, Yan Li

  • 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

  • EEM CLI Script with parameters

    Hi all,
    I have a requirement to write an eem cli script that can be triggered using a pattern match and take parameters.
    Basically the user has to do many repetitive tasks reconfiguring interfaces regularly. So instead of having to go into each interface individually and run the config that they can write a one word command and give it params which would be for example a comma separated list of interface names and then within my script i could parse the interface names and iterate over them performing the config operation on them.
    so i'm just playing around with the cli policy.
    ::cisco::eem::event_register_cli occurs 1 pattern "nacdrop*" sync yes enter
    # Import Namespaces
    namespace import ::cisco::eem::*
    namespace import ::cisco::lib::*
    array set arr_einfo [event_reqinfo]
    set full_command $arr_einfo(msg)
    puts $full_command
    You can see here i want the command nacdrop to trigger this policy but when i try and run the command with arguments i get an error on the command line as its not a valid command and the policy doesnt trigger.
    Ideal scenario run command
    Router#nacdrop fastEthernet0/0,fastEthernet0/1,fastEthernet0/2
    the script would then perform a set of config tasks on each of the 3 interfaces.
    I thought the "enter" parameter to event_register_cli would do it as that is supposed to trigger the policy before the command is executed therefore before it determines it to be an invalid command. I do not have the latest version of eem however and suspect that the "enter" argument isn't being used as it isn't showing up as an option when i type ? to see what options are available although i don't get an error when registering the policy.
    So my question is what version off eem was this "enter" argument introduced and will it allow me to run the policy and get around the invalid command problem.
    Once i can run this policy and access the parameters to the cli command it opens up a lot for me in terms of automating repetitive tasks.
    Hope someone can help.
    Cheers,
    Joe.

    Cheer Joe. That's great. I've attached the first draft of a script i've written, maybe someone else can find it useful too.
    Basically it's for if you would like to perform the same operation on many interfaces you can use an alias and give it parameters
    E.G
    Router#vlanmove FastEthernet0/1-8,10,13-16
    Notice the params use '-' and ',' When you use dash it will perform the operation on all the interfaces in a range and then comma is just for an individual interface and as you can see above you can mix ranges with individual ones.
    The above example will give the output:
    Configuring Interface: FastEthernet0/1
    Configuring Interface: FastEthernet0/2
    Configuring Interface: FastEthernet0/3
    Configuring Interface: FastEthernet0/4
    Configuring Interface: FastEthernet0/5
    Configuring Interface: FastEthernet0/6
    Configuring Interface: FastEthernet0/7
    Configuring Interface: FastEthernet0/8
    Configuring Interface: FastEthernet0/10
    Configuring Interface: FastEthernet0/13
    Configuring Interface: FastEthernet0/14
    Configuring Interface: FastEthernet0/15
    Configuring Interface: FastEthernet0/16
    in the attached script just replace "puts "Configuring Interface: $interfaceName"
    with your configuration
    e.g.
    conf t
    interface $interfaceName
    switchport access vlan 2
    and it will perform that operation on all intefaces in a range. I might update the script later to take config commands as env variables too. That would make the script more generic. But at the moment this script is useful for us as we have to regularly reconfigure interfaces.
    Cheers,
    Joe.

  • 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

  • Error ORA-01460 warning ORA-01461 during running a mapping with parameters

    Oracle 10g release2(10.2.0.1.0), OWB 10.2.0.1.31, Workflow server 2.6.4
    I have a simple process flow ( start -> mapping -> end).
    The mapping consists of 4 input groups(3 ordinary tables<INGRP1, INGRP2, INGRP3> and 1 mapping input parameter operator <INGRP4>), a joiner, a filter, an expression operator and 1 output group.
    I want to use two variables in join condition, so I bound two mapping input parameters(<INGRP4.SRC_SYS_CDE> and <INGRP4.ADMIN_ORG_NUM>) with two parameters of the process flow's start activity.
    Those two mapping input parameters are of type char, one is 4-char long and the other is 2-char long. So I set both of the two parameters of the start activity as String, one as 08, another as 7504.
    My join condition is:
    INGRP1.ORGIDT = INGRP2.SOURCEORGANIZATIONNO AND
    INGRP2.SOURCESYSTEMCODE = INGRP4.SRC_SYS_CDE AND
    INGRP2.ADMINORGANIZATIONNO = INGRP4.ADMIN_ORG_NUM AND
    INGRP1.CURCDE = INGRP3.NUM(+)
    There are no errors and warnings in validation, generation and deployment process, but when I run the process flow, it always finishes blankly(zero insert) with no error and warning messages. It should insert more than 20,000 rows.
    When I run the mapping and set the parameters 08 and 7504 at the parameter prompt, then start, the following error and warning occurs.
    Error ORA-01460: unimplemented or unreasonable conversion requested
    Warning ORA-01461: can bind a LONG value only for insert into a LONG column
    So what's the problem? How can I fix it?

    The problem was mapping input parameter type.
    VARCHAR2-type mapping input parameter works with String-type PF parameter. But CHAR-type won't.

  • I am running Lightroom 6 in conjunction with 64 bit Photoshop CS6. I need to install Camera Raw 9 plus other relevan updates for the Adobe Design and Web Premium CS6 package. Running Adobe Application manager finds the relevant updates but won't download

    I am running Lightroom 6 in conjunction with 64 bit Photoshop CS6. I need to install Camera Raw 9 plus other relevan updates for the Adobe Design and Web Premium CS6 package. Running Adobe Application manager finds the relevant updates but won't download / install them. Clicking the update button results in an error message "Application Manager has stopped working". This is a windows system running 64 bit Windows 7

    update manually:
    pre cc updates:  http://www.adobe.com/downloads/updates/
    cc updates:  http://prodesigntools.com/adobe-cc-updates-direct-links-windows.html
    cc 2014 updates:  win (http://prodesigntools.com/adobe-cc-2014-updates-links-windows.html) / mac (http://prodesigntools.com/adobe-cc-2014-updates-links-mac.html)

  • How to run multiple scripts in sql*plus?

    I would like to run 2 scripts in sql*plus, how do I do this? I tried the following, but it won't run.
    create table student_new
    AS
    select *
    from student
    insert into student_new
    (last_name, first_name
    values
    (Crop, Jenny)
    The above are the two scripts I want to run, what am I doing wrong.
    Thanks

    Do you have a solution to run multiple scripts continuosly, one after the other as one script.
    Say I have file1.sql file2.sql, file3.sql.
    I want to create a script run.sql, where this will run file1.sql,file2.sql,file3.sql one after other without any one running one after the other like follows:
    run.sql should have
    begin
    @file1.sql
    @file2.sql
    @file3.sql
    dbms_output.put_line(select sysdate from dual);
    end;
    If I run run.sql all the three scripts should be executed successfully and then display the current time . All these files have update statements(50,000 updates each file).
    Very urgetn. Can some one hlpe, please.
    Thanks in advance.

Maybe you are looking for

  • Stock tables

    hi all, please advise in which tables following information unrestricted stock + valuation type project stock + valuation type quality stock + valuation type block stock  + valuation type

  • How to take a non metrics column from one fact to different subject area details level?

    I have a requirement in OBIEE , I have two fact tables W_AP_INV_DIST_F and W_PURCH_COST_F. In my subject area I am using all facts from W_AP_INV_DIST_F table, But I need one more column as per client's requirement. I searched the column RELEASE_NUM f

  • Macbook Pro Key issue

    I have a 13 inches macbook pro which is still under warranty. Unfortunately one of the keys came out and when i took it to the service centre i got a reply that the outer part of the key is damaged and cannot be replaced. I was told that it's a "phys

  • CRS-4639: Could not contact Oracle High Availability Services

    Hi Everyone, I have installed 11gR2 GRID and RAC on RHEL 6. With the installation when I ran the root.sh script I had to run the following command for the HAS to be able to start successfully: /bin/dd if=/var/tmp/.oracle/npohasd of=/dev/null bs=1024

  • IWeb Hosting or FTP???

    I am not sure where the question belongs or even how to ask. I have a site already hosted through Domains Priced Right which is somehow affiliated with GoDaddy. I want to use the site address that I have on Domains Priced Right with a site that I use