Executing an OWB mapping from sqlplus

Hi
I am trying to run an OWB mapping using the OWB provided script sqlplus_exec_template.sql. Here is the syntax I use:
@Script\sql\sqlplus_exec_template.sql OWB_RUN_OWNER CODE_LOC PLSQL MAPPING_TI "," ","
I am able to successfully execute my task when I use the above script. However, when the account pertaining to 'CODE_LOC' is locked, the script fails and gives me an error message that the account is locked.
Our security standards expect the CODE_LOC account to be locked. Is there a way around it ? When the mapping is executed, does the Runtime repository owner lookup the task from the Code location or attempts to connect to the account ?
Can someone advise me on whether I can successfully execute a mapping that is deployed to a locked account ?
Thanks

Hi
The only way I can think of is when the account X is locked, to have granted execute on the packages for the map to schema Y which is unlocked and execute the package MAIN procedure/function from schema Y.
Cheers
David

Similar Messages

  • How to Execute a OWB Mapping or a Process from SQLPLUS editor?

    I need to know how can we execute a OWB mapping from SQLPLUS editor or from a Stored Procedure.

    Hi,
    You can use the MDL export/import utility for this, but as you are importing into the same repository you will end up with importing into the same project again.
    So for this you can follow the workaround as:
    ->Take export of the required mapping from the project OWB_B
    -> Rename the Project OWB_B to some thing like OWB_B_1(or any other name), note that you have to rename both logical and physical name of the project
    -> Rename the project OWB_A to OWB_B and if you import the MDL all the objects will be imported to OWB_B then you can rename back the project to OWB_A
    -> Finally rename the project OWB_B_1 to OWB_B (to its original name).
    Regards,
    Pnreddy

  • Executing a mapping from sqlplus in OWB 904

    I have used the below syntax to execute OWB 902 mappings as below:
    sqlplus / <<*sql*
    Execute MAP_SOMETHING.MAIN();
    sql
    I deployed the same mapping with new version of OWB 904.. it did not work. What is new syntax to execute the mapping from sqlplus?

    From OWB 9.0.4 on, you must use the execution template to execute your mappings from sql. The template file, that has a brief doc section in its heading is:
    <OWB installation directory>/owb/rtp/sql/sqlplus_exec_template.sql
    Regards:
    Igor

  • Regarding default select clauses executing during OWB Mapping execution -

    All-
    While observing the statements executing during an OWB(11gR2) Mapping execution,by monitoring the session using SQL Developer
    Iam finding the following statements executing multiple times and possibly consuming more of the mapping execution time:-
    SELECT MAX(EXECUTION_AUDIT_ID) FROM ALL_RT_AUDIT_MAP_RUNS WHERE MAP_NAME = :B1
    SELECT SYS_CONTEXT('owb_workspace' , 'workspaceID' ) FROM DUAL
    SELECT nvl2(translate(20040101, 'A1234567890','A'), 'F', 'T') FROM DUAL
    SELECT USER FROM SYS.DUAL
    These statements have no relation to be business logic being implemented.And seem to be generated by OWB default settings.
    Can anyone please let me know how to reduce the frequencey of the above mentioned statements or if possible remove them from the OWB mapping execution.
    So that the mapping would run more faster

    Hi,
    these statement are required to set the runtime audit data. Usually, they do not really impact the performance of a mapping so there is not need to bother about them.
    What causes performance problems is usually the business logic part of the mappings.
    You may purge old runtime metadata manually. Look at the script
    %ORACLE_HOME%\owb\rtp\jrtaudit\owbsys\purge_audit_tables.sqlDocumentation is included.
    Regards,
    Carsten.

  • Strange problem with executing PL/SQL procedure from sqlplus.

    Hello,
    basicly, I'm strugling with executing a procedure written in PL/SQL from sqlplus.
    It's all because I convert a data in procedure by other function.
    SELECT partition_name
    INTO strpartition
    FROM user_tab_partitions
    WHERE table_name = tablename_in
    and substr(partition_name, -8, length(partition_name)) = (SELECT F_CONVERT_DATE(tablename_in,p_date) from dual);
    /tablename_in and p_date are input parameters/
    Function F_CONVERT_DATE looks more less like :
    select
    TO_CHAR(TRUNC(NEXT_DAY(ADD_MONTHS(substr(partition_name, -8, length(partition_name)), -3), 'MONDAY')-7), 'YYYYMMDD')
    END
    AS p_date
    INTO v_okr
    FROM user_tab_partitions
    where substr(partition_name, -8, length(partition_name)) = p_date;
    Well, the thing is that procedure is executable from TOAD without any errors !! But when I try to execute it straight from sqlplus it returns:
    ORA-01861: literal does not match format string
    ORA-06512: at "F_CONVERT_DATE", line 13
    ORA-06512: at "NAME_OF_PROCEDURE", line 17
    Tip: When I don't use functions ADD_MONTHS, NEXT_DAY and TO_CHAR in function F_CONVERT_DATE sqlplus can execute it. But only when I use them it returns an error.
    Anybody has a clue how to solve it?
    Regards !

    Hi, Nodex,
    Avoid implicit conversions.
    For example:
    TO_CHAR(TRUNC(NEXT_DAY(ADD_MONTHS(substr(partition_name, -8, length(partition_name)), -3), 'MONDAY')-7), 'YYYYMMDD')ADD_MONTHS expects a DATE as its first argument.
    SUBSTR returns a VARCHAR2, so you're calling ADD_MONTHS with a VARCHAR2 where it expects a DATE.
    For good or ill, the system tries to avoid raising an error in this case by implicitly converting the VARCHAR2 to a DATE. Exactly how it does that depends on
    (a) the tool you are using (SQL*Plus or Toad, for example),
    (b) the version (Oracle 10 behaved quite different form Oracle 9),
    (c) environmental settings (such as NLS_DATE_FORMAT), which in turn may depend on initialization parameneters, and
    (d) who knows what else.
    When you have to convert, do so explicitly.
    You can convert a VARCHAR2 to a DATE using TO_DATE, like this:
    TO_CHAR ( TRUNC ( NEXT_DAY ( ADD_MONTHS ( TO_DATE ( SUBSTR ( partition_name
                                                       , -8
                                          , LENGTH (partition_name)
                                     , 'YYYYMMDD'     -- or whatever
                             , -3
                      , 'MONDAY'
              - 7
         , 'YYYYMMDD'
         )

  • Problems running owb 10gr2 package (mapping) from sqlplus

    not sure what i'm doing wrong.
    here is how i am trying to do it:
    1 declare
    2 out1 varchar2(100);
    3 begin
    4 entity_map.main( p_status => out1
    5 , P_MAX_NO_OF_ERRORS => '50'
    6 , P_COMMIT_FREQUENCY => '1000'
    7 , P_OPERATING_MODE => 'SET_BASED'
    8 , P_BULK_SIZE => '50'
    9 , P_AUDIT_LEVEL => 'AUDIT_COMPLETE'
    10 , P_PURGE_GROUP => 'WB'
    11 );
    12 dbms_output.put_line('Result = '||out1);
    13* end;
    SQL> /
    entity_map.main( p_status => out1
    ERROR at line 4:
    ORA-06550: line 4, column 1:
    PLS-00306: wrong number or types of arguments in call to 'MAIN'
    ORA-06550: line 4, column 1:
    PL/SQL: Statement ignored
    here is the procedure spec:
    PROCEDURE Main(p_status OUT VARCHAR2, "TRUNCATE_LOAD" IN VARCHAR2
    DEFAULT 'false', "AW_EXECUTE_RESULT" OUT NOCOPY VARCHAR2,
    p_max_no_of_errors IN VARCHAR2 DEFAULT NULL,
    p_commit_frequency IN VARCHAR2 DEFAULT NULL,
    p_operating_mode IN VARCHAR2 DEFAULT NULL,
    p_bulk_size IN VARCHAR2 DEFAULT NULL,
    p_audit_level IN VARCHAR2 DEFAULT NULL,
    p_purge_group IN VARCHAR2 DEFAULT NULL)
    any ideas?

    nevermind..i needed to pass in another variable for "AW_EXECUTE_RESULT"

  • How do we migrate the OWB mapping from one server to another server?

    Here is my situation.
    Source server
    ================
    Project name : SOURCEOWB
    Under this project, we have two module(MBTSOURCE, MBTTARGET).
    In connection explorer, the locations are DW_MBT_SR, DW_MBT_TR.
    We have 15 mappings on this project.
    Source schema name is TXMBT_DW.
    Target schema name is MBTTX_DW.
    I want to migrate the whole thing to new server.
    Here are the info about target location. After migrating to new server, i need to rename
    as below.
    Project name : CA_SOURCEOWB
    Under this project, we have two module(CA_MBTSOURCE, CA_MBTTARGET).
    In connection explorer, the locations are CA_DW_MBT_SR, CA_DW_MBT_TR.
    Source schema name is CA_TXMBT_DW
    Target schema name is CA_MBTTX_DW
    Here are my steps i followed.
    ===============================
    1. Created the source and target schemas in new machine.
    2. Create a new workspace
    3. Export the mapping with dependent objects from source server and imported in new server.
    4. changed the source and target location successfully.
    5. Renamed the project namd, module names as i needed successfully.
    But only issue is, i am not table to change the location name.
    Again, i tried the below steps.
    1. uninstall the workspace and create the workspace
    2. create source and target locations as i needed(CA_DW_MBT_SR,CA_DW_MBT_TR).
    3. import only mapping
    4. Able to register the mapping
    Here i am not able to configure the module for newly created locations.
    I right clicked on module and click Configure, go to Stream Administrator and not able to find
    the source and target locations over there.....
    How do we resolve this?
    My data warehouse is runing for each state. I want to copy one state mapping and import into
    another state and customize the mapping. I have hard time to change the location name. Because,
    location name has state code. I can not use the same location name for all other state.
    Any help is highly appreciated.

    Hello Oleg, Thanks for your input.. It helps... but the problem is not completly solved.
    let me explain my whole steps. Plesae review and let me know if i missed anything.
    1. Created new workspace. the workspace is successfully created.
    2. Login to new workspace.
    3. Go to Locations, create source location(entered host name,username, password etc)
    4. Created target location(entered host name,username, password etc), go to db connector on target location, created new db connector and linked the source location here.
    5. Exported mapping and import into new workspace.(I can not use the location name in the exported workspace).
    6. Renamed the project name, module name as i needed.
    7. Double click the module name under Oracle and changed the meta data location and data locations.
    8. Right click on soure and target module and click configure, change the the location and streams administrator.
    9. Right click on mapping and go to configure, go to table operators and change the location as i need.
    10.Right click on target module(under oracle), click generate. On this step, i get the below error
    VLD-1141: Internal error during mapping generation.
    Java.lang.ArrayIndexOutOfBoundsExeception
    11. Go to control center, register the source and targert and followed the step 10. I get the same error.
    I am almost close to complete this task. But i got stuck in the last step.

  • Logging OWB mapping execution in Shell script

    Hi,
    I am executing a OWB mapping from a shell script like this
    $OWB_SQLPLUS MY_WAREHOUSE plsql MY_MAPPING "," ","
    I want to log this mapping execution process into a file.
    Please let me know if this will work:
    $OWB_SQLPLUS MY_WAREHOUSE plsql MY_MAPPING "," "," >> LOGFIL.log
    I will just be using this log file to track all the execution and use it for logging purpose.
    If this wont work, please tell me the proper way to do this...
    Thanks.

    Avatar,
    ">>" is the Unix operator that will redirect output and append to a particular file, so what you have should work if you're executing it from the shell prompt. Although I don't know specifically what OWB_SQLPLUS and MY_WAREHOUSE are.
    In my company, we have the call to the owb script inside another script. For example, file x contains the following line:
    sqlplus repository_user/pwd@database @sqlplus_exec_template.sql repository_owner location task_type task_name custom_params system_params
    Then at the prompt, we enter:
    nohup x > x.log &
    And the mapping or workflow executes.
    Jakdwh,
    Are you redirecting your output to a file so you can see why it's returning a '3'? The log file will usually tell you where the error occurred. I don't know what your input parameters for your mapping is, but the script is pretty picky about the date format. Also, even if you don't have any input parameters, the "," still has to be sent into the script.
    Hope this helps,
    Heather

  • Invoking a mapping from another DB in a process flow

    Hi experts, have anyone try to invoke/execute an OWB mapping from another database in a process flow? Is it possible to do that?
    My process flow (in the Staging db) scenario is to execute several OWB mapping in the Staging db, then the final step is to execute an OWB mapping which is created in the warehouse db.
    Is that possible?
    Edited by: wwardana on Apr 5, 2009 9:09 PM

    Look at this thread
    [Calling WB_RT_API_EXEC.RUN_TASK over database link|http://forums.oracle.com/forums/thread.jspa?threadID=775938]
    Regards,
    Oleg

  • Execute main function created by OWB mapping

    Hi,
    If any one has sample code to run the main function created by OWB mapping?
    I try to execute the mapping from sqlplus. But I don't know how to compose the WB_RT_MAPAUDIT.WB_RT_NAME_VALUES input parameter.
    Thanks for your help.
    William

    Please refer to the sql_exec_template.sql file which can be found under the <owb_install>\owb\rtp\sql directory.
    Regards:
    Igor

  • Execute Mapping from OMBPlus (TCL Scripting)

    Hi Experts,
    I was going through OMB Plus Commands. However could not find the option to execute OWB Mapping. I am planning to execute an OWB Map of whose name i will send as a parameter to the script and it will execute only that particular Map.
    Could you please help me with this.
    Regards,+
    Ravi R+

    Try this:
    OMBSTART MAPPING '$mapname' IN '$targetlocation'

  • SQL Query of an OWB map (row based)

    If I trace a session, execute an OWB map (row based), will the trace file contain the actual SQL query ?
    The problem with me is that when I am executing this row -based OWB map, it is throwing me an error CursorFetchMapTerminationRTV20007 BUT ( plus taking a long time) when I am taking out the intermediate SQL insert query,it is working fine ( and also within a very short period of time)
    Execution status = COMPLETE
    message text = ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    message text = CursorFetchMapTerminationRTV20007
    No. task errors = 0
    No. task warnings = 2
    No. errors = 1
    Since this OWB map (Truncate Insert)  is row based hence I cannot cannot get the back end query from the OWB generated pl/sql package so wondering if I trace the session, check the trace file, may be I will able to see the exact SQL query generated. But wanted to confirm the same.

    Yes, the actual SQL run in the session will be in the trace file.

  • Unable to execute Map from Database link

    Hi
    Been trying to research this issue but have had no luck in finding an answer. Here is the situation:
    We have an apex application that resides on database "A"
    Our OWB Design Repository (11.1.0.7) and Runtime Environment both exist on database "B"
    Maps exists and execute under normal procedures as the "ETL" user on database "B", However we would like to allow the "APEX" user to execute a map from database "A" across a database link to a user that can execute the map without any issue.
    When we try to execute the map across the database link from toad or sqlplus we get no error returned, the procedure runs and kicks off a map execution (as seen in ALL_RT_AUDIT_EXECUTIONS) or from the control center executions. However the Map execution immediately fails with no explanation as to why??
    what makes even less sense is that the user on database "B" that the database link connects to.. can execute the same procedure all day long if logged directly into database "B".. but the moment you try to call it across the database link.. it errors with no message as to why.
    We are calling the "WB_WORKSPACE_MANAGEMENT.SET_WORKSPACE".. so that is not the issue.. I am assuming this is either a bug.. or we are missing an additional call/privilege. The user for the database link is a registered user in the workspace, obviously this works since the database link user can run the procedure if logged in locally to database "B"
    Any thoughts???

    Figured out our problem..
    Found RETURN_CODE column in ALL_RT_AUDIT_EXECUTIONS table.. point to -2064 which is an ora-2064
    NOTE 1026597.6 - CALLING REMOTE PACKAGE RECEIVES ORA-2064 explains that a commit is issued in a coordinated session from an RPC procedure call with OUT parameters or function call. Action: simplify remote update statement.
    The problem here is that "Commit Control" was set to Automatic for the mappings we were calling. Oracle does not like when a transaction is initiated on database "A" and has a commit issued on database "B" from the map.
    Makes sense.. we switched the commit control to "Manual" and are able to process correctly by issuing a commit from the session on database "A"
    Hope this helps anyone that runs into this issue themselves..

  • Execute mapping thro sqlplus - parameters

    Dear all,
    I am new to owb
    I have a mapping with two input parameters(MAPPING_NAME & MODULE_NAME), if i execute from control center it is executing
    i want to execute it from sqlplus
    the command i am using to execute from unix prompt is
    sqlplus username/password@connectstring @/opt/oracle/product/10.2.0.1-OWB
    /owb/rtp/sql/sqlplus_exec_template.sql repouser mapping_location PLSQL mappingname , MAPPING_NAME=mappingname,MODULE_NAME=HRMS
    Log file after execution
    Stage 3: Overriding Parameters
    | MAPPING_NAME%CUSTOM='mappingname'
    | MODULE_NAME%CUSTOM='HRMS'
    Stage 4: Executing Task
    | l_audit_result=3 (FAILURE)
    Stage 5: Closing Task
    Stage 6: Processing Result
    | exit=3
    how to give the mapping parameters
    Thanks in advance
    S. Sathish Kumar

    For string parameters In 10.2, you need to use four apostrophes on both sides.
    sqlplus username/password@connectstring @/opt/oracle/product/10.2.0.1-OWB
    /owb/rtp/sql/sqlplus_exec_template.sql repouser mapping_location PLSQL
    mappingname MAPPING_NAME=''''mappingname'''',MODULE_NAME=''''HRMS''''

  • Error while running OWB mapping package from sql prompt

    hi all,
    i have deployed my owb mapping in oracle. Now i want to execute this from the sql prompt. the foolowing error is giving when i try to run.
    SQL> DECLARE
    2 RetVal NUMBER;
    3 P_ENV WB_RT_MAPAUDIT.WB_RT_NAME_VALUES;
    4 BEGIN
    5 RetVal := TEST1.TEST_MAP.MAIN ( P_ENV );
    6 END;
    7 /
    RetVal := TEST1.TEST_MAP.MAIN ( P_ENV );
    ERROR at line 5:
    ORA-06550: line 5, column 19:
    PLS-00302: component 'TEST_MAP' must be declared
    ORA-06550: line 5, column 3:
    PL/SQL: Statement ignored
    pls help me for finding the solution.
    -Regards
    Raj Kumar

    You need to split your data and create (at least 5) worksheet targets.
    For example if you have a ROW_NUMBER column you can use for instance a
    Conditional Split for something like:
    ROW_NUMBER % 5 == 0 for Case 1 (excel 1)
    ROW_NUMBER % 5 == 1 for Case 2 (excel 2)
    ROW_NUMBER % 5 == 2 for Case 3 (excel 3)
    ROW_NUMBER % 5 == 3 for Case 4 (excel 4)
    ROW_NUMBER % 5 == 4 for Case 5 (excel 5)

Maybe you are looking for