Mapping Execution error in PL/SQL

Hi,
We are using OWB Cleint 9.2.0.3.0 and 9.2.0.2.0 Repository for our DWH project.And we execute the Mapping from Pl/SQL Block. And Pre-Mapping is used get the Map-Run Id based on the Mapping Name and the output of this Pre Mapping is used store an unique value for CRTD_USR in our target Table. This function works fine for all mappings except two. The Mapping works without this Pre-Mapping Process. but fails if I add this operator.
The following is the error message that we get whiel calling from PL/SQL Block.
DECLARE
ERROR at line 1:
ORA-20000: ORU-10028: line length overflow, limit of 255 chars per line
ORA-06512: at "SYS.DBMS_OUTPUT", line 35
ORA-06512: at "SYS.DBMS_OUTPUT", line 133
ORA-06512: at line 99
Can anyone give clarifications to the above problem ?
Thanks,
Jagadish.

Hi Jean,
I would like to through more light on teh problem.
We execute the Mapping using an Unix wrapper script which invokes the anonymous Pl/SQL block.
The output for a successful run is :
TEST_MAP1 - Tue May 18 10:16:45 CEST 2004
This program does not require a restart
TEST_MAP1 Started
Start Time : Tue May 18 10:16:45 CEST 2004
Before Deleting Child Records...
After Deletion of Child Records !
Extraction From 01.01.1900 To 10.10.2003.
SUCCESSFULLY RUN...!
PL/SQL procedure successfully completed.
TEST_MAP1 Completed
End Time : Tue May 18 10:16:54 CEST 2004
TEST_MAP1 Shell Completed
The same Program does not run for different dates.
TEST_MAP1 - Tue May 18 10:22:12 CEST 2004
This program does not require a restart
TEST_MAP1 Started
Start Time : Tue May 18 10:22:12 CEST 2004
Before Deleting Child Records...
After Deletion of Child Records !
Extraction From 01.01.1900 To 10.10.2004.
DECLARE
ERROR at line 1:
ORA-20000: ORU-10028: line length overflow, limit of 255 chars per line
ORA-06512: at "SYS.DBMS_OUTPUT", line 35
ORA-06512: at "SYS.DBMS_OUTPUT", line 133
ORA-06512: at line 99
TEST_MAP1 ERROR:
See /opt/home/ucsuxadm/dwh/spool/OBJEKT.out
End Time : Tue May 18 10:22:16 CEST 2004
TEST_MAP1 Shell Completed
Please noet that there are no other DBMS_OUTPUT lines in by PL/SQL Block. And other mappings for the same date parameters works fine.
Can you please simulate and guide me to resolve this problem.
Thanks
Jagadish.

Similar Messages

  • MDM Database command execution error. A SQL statement failed to execute

    Hi,
    When we tried to execute an MDM Java query modify/create, we get the following dump.
    Is this anything to do with the parameters that we pass or is it something to do with the database ?
    We have checked the code and we do not find anything wrong with the code at all.
    We are using Java API 5.5.63.73 and calling MDM API's using WebDynpro for Java.
    I have noticed this issue has been raised here as well :
    Database command execution error. (While mounting a repository)
    com.sap.mdm.commands.CommandException:
    com.sap.mdm.internal.protocol.manual.ServerException: Database command execution error. A SQL
    statement failed to execute. The actual error may have been written to a log file. at
    com.sap.mdm.data.commands.ModifyRecordCommand.execute(ModifyRecordCommand.java:163) at
    Regards,
    Subramanian V.
    Edited by: Subramanian Venkateswaran on Dec 10, 2008 8:11 PM

    Hi Subramanian  ,
    The error looks more like a problem with the data base or MDM system rather than the java code.
    Which is the underlying database you are using with MDM? As some users have faced some difficulties when working with the DB2 Data base,If this is the data base you too are working upon then may be the issue could be similar,if possible try using the Oracle or SQL data base as these databse show more compatibility than a DB2 when working with MDM .
    Also check the MDM users autorization and authentication to modifyor create recordrs in MDM.try given the user the ADMIN rights,and tehn try and see if teh user is able to modify/Create the mdm records.
    Lastly you can check the database instance and listener configuration correctly.try restarting the Database service form the system if possible.
    Hope It Helped
    Thanks & Regards
    Simona Pinto

  • Mapping execution error

    hello everyone,
    I got a message error while executing mapping but I really don't know how to solve it. (ora-04063 and ora-06508 ora-06512)
    You'll find below the message (I traslated it in english)
    ora-04063: package body "wks_owner1.mapping_agence" has errors
    ora-06508: PL/SQL: unit of program named: " wks_owner1.mapping_agence " not found
    ora-06512: line 1
    Thanks

    Hello,
    Check if you "Rename" something and forgot to update later on. Try making a copy of the map and re-run it.
    Thanks
    Har

  • Database command execution error. (While mounting a repository)

    Hello,
    I am trying to mount 'Customer Master' repository in Console
    But it is giving me the following error.
    'Database command execution error. A SQL statement failed to execute. The actual error may have been written to a log file.'
    Can any1 throw some light as to how do i solve this problem.
    And where to check this log file?
    Also i am able to mount any other repository without this error.
    Regards,
    Roshani

    Hi Roshni,
    It could be that the repository tables were not correctly created in the Oracle Database.
    Try restarting the oracle services ,also check the Oracle listener configurations are correct.
    If you have an archieve of this repository then try mounting the archieve with a different name.
    Also try restarting the MDM server.
    Hope It Helped
    Thanks & Regards
    Simona Pinto

  • SQL execution error, ORA-01843: not a valid month

    Im using ASP/VBScript and its my first time starting to use Oracle as a DB provider.
    Just having an issue with a statement that I have.
    Heres my statement:
    SELECT T592_NOON.SHIP_CODE, T592_NOON.REPORT_DATE, T592_NOON.L_B, T592_NOON.AVERAGE_SPEED, T592_NOON.SEASTATE, T592_NOON.DISTANCE, T592_NOON.WIND_DIRECTION, T592_NOON.IFO_MAIN, T592_NOON.IFO_BOILER, T592_NOON.IFO_AUXENGINE FROM T592_NOON WHERE (((SHIP_CODE)='S271') AND (REPORT_DATE BETWEEN to_date('08/02/2004 13:00:00', 'DD-MON-YYYY HH24:MI') and to_date('28/02/2004 18:15:00', 'DD-MON-YYYY HH24:MI')))
    Whenever I run it it errors and returns:
    SQL execution error, ORA-01843: not a valid month
    Can anyone tell why this wouldnt work?
    REPORT_DATE type is DATE
    REPORT_DATE Sample data: 2003-04-28-12.00.00.000000

    Changing the format of the date seemed to fix it.
    Incorrect: '08/02/2004 13:00:00'
    Correct: '08-FEB-2004 13:00'

  • Error in Mapping Execution

    Hi Experts,
       I am doing the dat file to RFC scenario.. development has been done.
       While testing i am facing the problem with mapping execution. I have tested with single record structure and multiple record structure.. but getting the same error.. pls see the below error.
    <!--  Request Message Mapping
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>Application</SAP:Category>
      <SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>
      <SAP:P1>com/sap/xi/tf/_MM_DATA2RFC_</SAP:P1>
      <SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException:</SAP:P2>
      <SAP:P3>Fatal Error: com.sap.engine.lib.xml.parser.ParserE</SAP:P3>
      <SAP:P4>xception: Invalid char #0x0 (:main:, row:5, col:2~</SAP:P4>
      <SAP:AdditionalText />
      <SAP:Stack>Runtime exception occurred during application mapping com/sap/xi/tf/_MM_DATA2RFC_; com.sap.aii.utilxi.misc.api.BaseRuntimeException:Fatal Error: com.sap.engine.lib.xml.parser.ParserException: Invalid char #0x0 (:main:, row:5, col:2~</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    I have maintained FCC in configuration...
    can any one suggest what would be the problem.
    Thanks,
    Swetha

    Hi Stefen,
      You are absolutely right/correct.. i have saved file in another editor with ANSI.. and triggered the interface but now i am facing the problem with message mapping.. pls see the below error.
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Request Message Mapping
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>Application</SAP:Category>
      <SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>
      <SAP:P1>com/sap/xi/tf/_MM_EMFDATA2RFC_</SAP:P1>
      <SAP:P2>com.sap.aii.mappingtool.tf7.MessageMappingExceptio</SAP:P2>
      <SAP:P3>n: Runtime exception when processing target-field</SAP:P3>
      <SAP:P4>mapping /ns1:Z_H_EMF_RFC/IPFILE1/item[2]/TRMDA; r~</SAP:P4>
      <SAP:AdditionalText />
      <SAP:Stack>Runtime exception occurred during application mapping com/sap/xi/tf/_MM_EMFDATA2RFC_; com.sap.aii.mappingtool.tf7.MessageMappingException: Runtime exception when processing target-fieldmapping /ns1:Z_H_EMF_RFC/IPFILE1/item[2]/TRMDA; r~</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    can you pls suggest abt the above error.
    Thanks,
    Swetha

  • Unexpected error during mapping execution

    Hello,
    we are implementing business intelligence for Siebel 8.1. Having one strange issue and hoping anybody could help us out.
    We are using OWB 10.2.0.1. Certain error appears during mapping execution LOAD_SR which basically loads service requests from Siebel DB to data warehouse.
    The mapping is using two tables as input (S_SRV_REQ and S_SRV_REQ_X) which are joined by S_SRV_REQ.ROW_ID = S_SRV_REQ_X.PAR_ROW_ID (+) using Joiner operator, because I always need extension table (S_SRV_REQ_X) rows either filled either containing only nulls (when there is no corresponding extension row). Sadly, this does not work, during execution it generates:
    Error:
    ORA-00997: illegal use of LONG datatype
    ORA-06512: at "DWH_ADM.LOAD_SR", line 32
    ORA-06512: at "DWH_ADM.LOAD_SR", line 3507
    ORA-06512: at "DWH_ADM.LOAD_SR", line 4553
    ORA-06512: at "DWH_ADM.LOAD_SR", line 9984
    ORA-06512: at line 1
    Warning:
    ORA-00997: illegal use of LONG datatype
    In summary, these join conditions generate same error as above:
    S_SRV_REQ.ROW_ID = S_SRV_REQ_X.PAR_ROW_ID (+)
    S_SRV_REQ.ROW_ID (+) = S_SRV_REQ_X.PAR_ROW_ID (+)
    S_SRV_REQ.ROW_ID = S_SRV_REQ_X.PAR_ROW_ID
    Strangely, when I use join condition S_SRV_REQ.ROW_ID (+) = S_SRV_REQ_X.PAR_ROW_ID, it works. But then right join is used and some records get rejected by joiner operation (those who do not have corresponding rows in extension table).
    Could someone help me with this issue?
    Any feedback would be greatly appreciated. Thank you for your time reading this!
    Edited by: user8872556 on Sep 28, 2011 2:21 AM
    Edited by: user8872556 on Sep 28, 2011 2:23 AM
    Edited by: user8872556 on Sep 28, 2011 2:23 AM

    We still were not able to solve this issue, would greatly appreciate any effort to help us out.

  • Mapping Deployment Error: recursive SQL Level 1

    Hi,
    I am facing a serious problem while deploying my map. Previously while deploying, it had a error in a SQL Expression. After that was resolved, and I deployed again.., deployment falied with the error:
    error at recursive SQL Level 1
    cannot insert NULL into SYS.OBJ$
    with correponding ORA numbers..
    Its very urgent..pls help
    Thanks and Regards.

    I dont know why such error came.
    To know what is wrong Generate the query and run the query in the sql editor. If this doesnt help then look into the repository Browser. There you will get the detailed error description.
    I hope this helps.
    Regards
    Vibhuti

  • Logging start & end time of map execution

    Hello,
    I want to log start & end time of execution of my map (OWB 11g), so I've created a table for this purpose and I used it in every map that I want to log time, twice; First for logging start time, and second for end time.
    I pass a constant with SYSTIMESTAMP value through my log table and also name of my map. but the problem is, both of my records' time (start & end) are very near to each other (difference is in milliseconds!) however my map takes time for more than 2 minutes! So, I've changed my map Target Load Order to: [log table for start time] + [Main tables of my map] + [log table for end time]. I've set my map Use Target Load Ordering option True, too.
    Why it doesn't work? Is there any better solution for logging every map execution time in a table, or not?
    Please help me ...
    Thanks.

    To do that, I have created a view that lists all processes that are running or finished. The view contains fields:
    process_name
    process_type (plsqlmap, plsqlprocedure, processflow, etc)
    run_status (success, error, etc)
    start_time
    end_time
    elapse_time
    inserted
    updated
    deleted
    merged
    You could insert into your log table using select x from this view after every map, or, how I do it, is to insert into log table after every process flow. That is, after my process flow is complete I then select all of the details for the maps of the process flow and insert those details into my log table.
    Here is the SQL for my view. This is for 10.2.0.3. For
    CREATE OR REPLACE FORCE VIEW BATCH_STATUS_LOG_REP_V
    AS
    (SELECT PROCESS_NAME,
    PROCESS_TYPE_SYMBOL,
    (CASE
    WHEN RUN_STATUS_SYMBOL IN ('COMPLETE_OK', 'COMPLETE') THEN 'SUCCESS'
    WHEN RUN_STATUS_SYMBOL IN ('COMPLETE_FAILURE') THEN 'ERROR'
    WHEN RUN_STATUS_SYMBOL IN ('COMPLETE_OK_WITH_WARNINGS') THEN 'WARNINGS'
    ELSE 'NA'
    END
    ) RUN_STATUS_SYMBOL,
    START_TIME,
    END_TIME,
    ELAPSE_TIME,
    NUMBER_RECORDS_INSERTED,
    NUMBER_RECORDS_UPDATED,
    NUMBER_RECORDS_DELETED,
    NUMBER_RECORDS_MERGED
    FROM OWB_RUN.RAB_RT_EXEC_PROC_RUN_COUNTS
    WHERE TRUNC (START_TIME) >= TRUNC (SYSDATE) - 3)
    ORDER BY START_TIME DESC;

  • 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

  • Execution Error while using a trigger

    Hi all,
    I have written the following trigger.<br><br>
    <b>SQL></b> CREATE OR REPLACE TRIGGER update_publisher_trgr <BR>
    AFTER INSERT OR UPDATE <BR>
    ON tinku.book_publishers <BR>
    FOR EACH ROW <BR>
    BEGIN <BR>
              IF INSERTING THEN <BR>
              INSERT INTO scott.publishers <BR>
              VALUES(:new.p_id,:new.name,:new.token_id,:new.is_reg);<BR>
    <B>ELSIF UPDATING THEN -----(9 th row) </B><BR>
    UPDATE scott.publishers <BR>
              SET is_reg=:new.is_reg <BR>
              WHERE publisher_id=:old.p_id; <BR>
              IF(:new.is_reg==0) THEN <BR>
                   DECLARE <BR>
                   CURSOR book_id_cursor IS <BR>
                        SELECT book_index <BR>
                        FROM books <BR>
                   WHERE publisher_id=:old.p_id; <BR>
    BEGIN <BR>
                   FOR i IN book_id_cursor LOOP <BR>
                        INSERT INTO scott.publisher_details <BR>
                   VALUES (updates_id_seq.NEXTVAL,i.book_index,12); <BR>
                        END LOOP; <BR>
                   COMMIT; <BR>
    END; <BR>
         END IF; <BR>
              END IF; <BR>
         END update_publisher_trgr;     <BR>
    SQL> / <br>
    Warning: Trigger created with compilation errors.<br>
    SQL> show errors; <br>
    Errors for TRIGGER UPDATE_PUBLISHER_TRGR:<br><br>
    LINE/COL ERROR <br>
    -------------- -----------------------------------------------------------------<br>
    9/32 PLS-00103: Encountered the symbol "=" when expecting one of the<br>
    following:<br>
    ( - + all mod null <an identifier><br>
    <a double-quoted delimited-identifier> <a bind variable> any<br>
    avg count current max min prior some sql stddev sum variance<br>
    execute forall time timestamp interval date<br>
    <a string literal with character set specification><br>
    <a number> <a single-quoted SQL string><br>
    <br><br>
    How can I avoid this error.<br>
    <br>
    Please help me in this regard,<br>
    <br>
    Thanks in Advance,<br>
    <br>
    Trinath Somanchi,<br>
    Hyderabad.<br>
    <br>

    hi,
    I have created the procedure in scott schema and the trigger in tinku schema.<br>
    the procedure is created with no errors but trigger is created with compilation errors.
    <br>
    the procedure created in scott schema:<br><br>
    CREATE OR REPLACE PROCEDURE populate_pub_dtls(pPublisherId Number)<br>
    IS <br>
    CURSOR book_id_cursor IS <br>
    SELECT book_index <br>
    FROM books <br>
    WHERE publisher_id=pPublisherId; <br>
    <br>
    next_val NUMBER;<br>
    BEGIN <br>
    FOR i IN book_id_cursor LOOP <br>
    SELECT updates_id_seq.NEXTVAL INTO next_val FROM dual;<br>
    INSERT INTO scott.publisher_details <br>
    VALUES (next_val,i.book_index,12); <br>
    END LOOP; <br>
    COMMIT;<br>
    END; <br>
    <br>
    the Trigger created in Tinku schema is:<br>
    <br>
    CREATE OR REPLACE TRIGGER update_publisher_trgr <br>
    AFTER INSERT OR UPDATE <br>
    ON tinku.book_publishers <br>
    FOR EACH ROW <br>
    BEGIN <br>
    IF INSERTING THEN <br>
    INSERT INTO scott.publishers <br>
    VALUES(:new.p_id,:new.name,:new.token_id,:new.is_reg);<br>
    ELSIF UPDATING THEN<br>
    UPDATE scott.publishers <br>
    SET is_reg=:new.is_reg <br>
    WHERE publisher_id=:old.p_id; <br>
    IF(:new.is_reg=0) THEN <br>
    scott.populate_pub_dtls ( :old.p_id );<br>
    END IF; <br>
    END IF; <br>
    END update_publisher_trgr; <br>
    <br>
    but this trigger on execution is giving the following errors:<br>
    <br>
    LINE/COL ERROR <br>
    -------- -----------------------------------------------------------------<br>
    3/8 PLS-00201: identifier 'PUBLISHERS' must be declared <br>
    3/8 PL/SQL: SQL Statement ignored <br>
    6/6 PLS-00201: identifier 'PUBLISHERS' must be declared <br>
    6/6 PL/SQL: SQL Statement ignored <br>
    10/28 PLS-00201: identifier 'SCOTT.POPULATE_PUB_DTLS ' <br>
    must be declared <br><br>
    10/28 PL/SQL: Statement ignored <br>
    <br>
    but scott.publishers is existing.<br>
    <br>
    how can i get rid of this error.<br>
    <br>
    Please help me in this regard,<br>
    <br>
    Thanks in Advance;<br>
    <br>
    Trinath Somanchi,
    <br>
    Hyderabad.
    <br>

  • Concurrent manager encountered an error while running sql*plus for your concurrent request create internal order

    Hi
    We have a big problem, We can't create internal orders, when I run the CREATE INTERNAL ORDER, it finish with ERROR:
    Concurrent Manager encountered an error while running SQL*Plus for your concurrent request 134980682.
    Review your concurrent request log and/or report output file for more detailed information.
    this is the log:
    +---------------------------------------------------------------------------+
    Purchasing: Version : 12.0.0
    Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.
    POCISO module: Create Internal Orders
    +---------------------------------------------------------------------------+
    Current system time is 26-JUL-2013 09:21:09
    +---------------------------------------------------------------------------+
    +-----------------------------
    | Starting concurrent program execution...
    +-----------------------------
    +---------------------------------------------------------------------------+
    Start of log messages from FND_FILE
    +---------------------------------------------------------------------------+
    Begin create internal sales order
    Updating Req Headers
    14 Reqs selected for processing
    Top of Fetch Loop
    Source Operating Unit: 82
    Selecting Currency Code
    Currency Code : MXP
    Selecting Order Type
    Order Type ID:1001
    Selecting Price List from Order Type
    Deliver To Location Id: 196
    Inserting Header : 3908784
    Getting the customer id
    Getting the customer id: 15334
    Unhandled Exception : ORA-01403: no data found
    +---------------------------------------------------------------------------+
    End of log messages from FND_FILE
    +---------------------------------------------------------------------------+
    Concurrent Manager encountered an error while running SQL*Plus for your concurrent request 134980682.
    Review your concurrent request log and/or report output file for more detailed information.
    +---------------------------------------------------------------------------+
    Executing request completion options...
    Output file size:
    78
    Output is not being printed because:
    The print option has been disabled for this report.
    Finished executing request completion options.
    +---------------------------------------------------------------------------+
    Concurrent request completed
    Current system time is 26-JUL-2013 09:21:14
    +---------------------------------------------------------------------------+
    Some suggestion for resolve it??
    Thanks & Regards.

    In the document 294932.1 Section 4 there are no pre-installation patches or update for OS RedHat LinuxAS4.
    When I type echo $LD_ASSUME_KERNEL it doesn't display any value so do I need to set the LD_Assume_Kernal value manually.
    If yes, please let me know the path and command to set the kernel value.
    Thanks
    Amith

  • OWB11gR2: Mapping execution in a process flow not visible in OWB Browser

    When a mapping is executed inside a process flow, execution details are not visible in OWB Repository Browser (Control Center reports) - rows processed, errors etc. Mapping row is missing in a log, like it never happened (but it did).
    This auditing information is very important for monitoring reasons (to our customers also) and I just don't get it how this functionality is lost with this version. Another serious bug?

    Hi David,
    I was rather tired and frustrated last evening, so today I noticed some things I didn't yesterday. Your reply gave me a new motivation.
    The conclusion is - a mapping execution in a process flow is logged, but the way activities are displayed in OWB Browser are now different than in previous versions. If I click on 'Execution Job Report' on a process flow, I see all the activities listed except mappings (transformations, assign, file exists, subprocess etc.). If I want to see mapping execution row, I must click on a plus (expand) sign.
    This kind of behavior will make processes with a complex hierarchy (usually we have more than 5 levels of subprocesses) rather vast to monitor. In 10gR2, a drilling down was accomplished by opening a new browser tab (Execution Job Report link) for each subprocess/mapping activity. Now it shall remain on one huge screen (list) that keeps expanding.
    But, if that is the new feature, we shall live with that. If our customers won't like it, they will have to get used to it.
    Thank you for your reply!

  • How to get digital signature for Google Map geocoding V3 in PL/SQL?

    Hi, Gurus:
        Could anyone provide me an example about how to generate digital signature for Google Maps service v3 in PL/SQL? We tried to upgrade our program using Google maps service from v2 to v3. We are using PL/SQl on background to send request to Google for geocoding. We found some sample code to register with digital signature, but none of them is based on PL/SQl. Notice I used Google business client ID "gme-XXX" and wallet.
    https://developers.google.com/maps/documentation/business/webservices/auth#digital_signatures
    Google Maps API - more URL signing samples
    Here is my code for V2. I notice in order to get signature, I need to use HMAC-SHA1 algorithm.
    procedure Get_Geocoding(P_s_Address in varchar2, P_s_Geocoding out varchar2, P_n_accuracy out number, P_b_success out boolean) is
      l_address varchar2(4000);
      l_url varchar2(32000);
      l_response varchar2(3200);
      n_first_comma number;
      n_second_comma number;
      n_level_length number;
    BEGIN
      /* TODO implementation required */
      l_address:=APEX_UTIL.URL_ENCODE(P_s_Address);
      l_address := replace(l_address,' ','+');
      l_url := 'http://maps.google.com/maps/geo?q='||l_address||'&'||'output=csv'||'&'||'client=gme-XXX';
    l_response := utl_http.request(l_url, APEX_APPLICATION.G_PROXY_SERVER, '/u02/app/oracle/admin/apexsb/wallet', 'XXXXXXXX');
      n_level_length:=0;
      n_first_comma:=instr(l_response,',',1,1);
      n_second_comma:=instr(l_response,',',1,2);
      n_level_length:=n_second_comma-n_first_comma-1;
      P_n_accuracy:=0;
      if n_level_length>0 then
      P_n_accuracy:=to_number(substr(l_response,n_first_comma+1, n_level_length));
      end if;
      l_response:=substr(l_response,instr(l_response,',',1,2)+1);
      --dbms_output.put_line('In function: l_response ='||l_response);
      P_s_Geocoding:=l_response;
      if (P_s_Geocoding<>'0,0') then
      P_b_success:=true;
      --dbms_output.put_line('true');
      else
      P_b_success:=false;
      --dbms_output.put_line('false');
      end if;
    END;
    Thanks!

    Hi, guys:
        I tried to generate digital signature for Google map service
         Maps for Business: Generating Valid Signatures - YouTube
        Generating an HMAC-SHA-1 Signature Using Only PL/SQL
          OAuth and the PL/SQL | Data Warehouse in the Cloud
       but I got error message from Google:
    Unable to authenticate the request. Provided 'signature' is not valid for the provided client ID. Learn more: https://developers.google.com/maps/documentation/business/webservices/auth
       I think there is something wrong with my code to generate signature, as if I remove the part regarding client and signature, it will work, can anyone help me on this problem?
    /*Procedure Get_Geocoding is used to get geocoding with accuracy level for V3 business account, you can find Google map digital signature descrirption from
    https://developers.google.com/maps/documentation/business/webservices/auth#digital_signatures
    if geocoding is 0,0, procedure returns false to indicate failure of get geocoding*/
    procedure Get_Geocoding2(P_s_Address in varchar2, P_s_Geocoding out varchar2, P_n_accuracy out number, P_b_success out boolean) is
      --private key for Google business account, this is provided by Google with client name.
      l_private_key_src varchar2(200):='xxxxxxxxxxxxxxxxxxx';
      l_private_key_b64_alter varchar2(200):= translate(l_private_key_src,'-_','+/');
      l_private_key_bin raw(2000);
      l_client_name varchar2(100):='gme-xxx';
      l_signature_mac raw(2000);
      l_signature_b64 varchar2(200);
      l_signature_b64_alter_back varchar2(200);
      l_Google_service_domain varchar2(200):='http://maps.googleapis.com';
      l_address varchar2(4000);
      l_url varchar2(32000);
      l_path varchar2(32000);
      l_response varchar2(32000);
      l_page UTL_HTTP.HTML_PIECES;
      n_actual_length number;
      json_obj json;
      json_tempobj json;
      jl_listOfValues json_list;
      json_geom_obj json;
      json_loc json;
      l_lat  VARCHAR2(40);
      l_lng  VARCHAR2(40);
      l_status VARCHAR2(255);
      json_accuracy json;
      --temp_string varchar2(10000);
      n_first_comma number;
      n_second_comma number;
      n_level_length number;
      BEGIN
    /* TODO implementation required */
    l_private_key_bin := utl_encode.base64_decode(UTL_I18N.string_to_raw(l_private_key_b64_alter, 'AL32UTF8'));
    l_address:=APEX_UTIL.URL_ENCODE(P_s_Address);
    --dbms_output.put_line(l_address);
    l_address := replace(l_address,' ','+');
    l_path := '/maps/api/geocode/json?address='||l_address||'&'||'sensor=true';
    dbms_output.put_line(l_path);
    l_signature_mac :=DBMS_CRYPTO.mac(UTL_I18N.string_to_raw(l_path, 'AL32UTF8'), DBMS_CRYPTO.hmac_sh1,l_private_key_bin);
    l_signature_b64:= UTL_RAW.cast_to_varchar2(UTL_ENCODE.base64_encode(l_signature_mac));
    l_signature_b64_alter_back:=translate(l_signature_b64,'+/','-_');
    dbms_output.put_line(l_signature_b64_alter_back);
    --get response from Google map service
    l_url:=l_Google_service_domain||l_path||'&client='||l_client_name||'&signature='||l_signature_b64_alter_back;
    --l_url:=l_Google_service_domain||l_path;
    dbms_output.put_line(l_url);
    l_page:=utl_http.request_pieces( l_url, 99999);
    for i in 1..l_page.count loop
    l_response:=l_response||l_page(i);
    end loop;
    n_actual_length:=length(l_response);
    dbms_output.put_line(n_actual_length);
    dbms_output.put_line(l_response);
    --parse JSON result
    json_obj:=new json(l_response);
    l_status := json_ext.get_string(json_obj, 'status');
    IF l_status = 'OK' then
    jl_listOfValues := json_list(json_obj.get('results'));
    json_tempobj := json(jl_listOfValues.get(1));
    json_geom_obj := json(json_tempobj.get(3));
    json_loc := json_ext.get_json(json_geom_obj, 'location');
    l_lat := to_char(json_ext.get_number(json_loc, 'lat'));
    l_lng := to_char(json_ext.get_number(json_loc, 'lng'));
    P_s_Geocoding:=l_lat||','||l_lng;
    dbms_output.put_line('##########'||P_s_Geocoding);
    case json_ext.get_string(json_geom_obj, 'location_type')
    when 'ROOFTOP' then P_n_accuracy:=9;
    when 'RANGE_INTERPOLATED' then P_n_accuracy:=7;
    when 'GEOMETRIC_CENTER' then P_n_accuracy:=5;
    else P_n_accuracy:=3;
    end case;
    P_b_success:=true;
    else
    P_b_success:=false;
    P_n_accuracy:=0;
    P_s_Geocoding:='0,0';
    end if;
      END;

  • Skipping mapping execution in process flow

    I have a process flow that calls multiple mappings. Based on some condition I want a mapping not to execute, E.g. when rerunning the process flow in case of failure. Currently I keep track of mapping execution and store the status in a control table. When a mapping has completed, it updates the status as completed. When I need to rerun, in the SQL of the tables join in the mapping, I have a where clause that returns 0 rows (mapping_completed = N) . So mapping is excuted but no rows added/updated.
    The flip side of the approach is when using a complex join specially using views, the SQL takes a long time to run only to return 0 rows. So logic is okay but I want to save time by avoiding the execution of the mapping it self.
    I would like to know how others are implementing this scenario.
    Regards
    Sandeep

    Can you not have two different mappings one for running it first time and one which you can run on failure...
    In your process flow you can have a param i.e 'F for failure and 'I' for intial and based on this condition you can decide which mapping to invoke and hte path to be followed.

Maybe you are looking for