JDBC: send batch of SQL commands as anonymous PL/SQL block

Hi All,
I did a little measurement to see if I can improve jdbc
applications by batching dissimilar SQL commands into one
anonymous PL/SQL block and execute it once. To my surprise, for
a batch of 5 SQL commands, it take 60% more time than execute
each of the 5 SQL commands separately.
The same JDBC code, using similar SQL text batching, running
against Sybase or MSSQL shows 60%-300% improvement.
Is there any other way to batch dynamic dissimilar SQL commands
in Oracle other than using anonymous PL/SQL block? Here is an
example of how the "text-batching" PL/SQL block looks like:
"begin insert into testtab1(col1, col2) values(1, 'row1');
insert into testtab2(col1, col2) values(100, 1);....; end;"
Thanks,
Nam Nguyen
null

If you do:
declare
l_sql varchar2(32767);
l_value varchar2(32767);
begin
select query_sql into l_sql from lov where lov_id = 100;
dbms_output.put_line(l_sql);
end;
You'll see something like that:
SELECT
l.DESCRIPTION || decode(l2.DESCRIPTION,null,'',l2.description, '-' || l2.description) || decode(a.DT,'Y',' - Distributed Training','N',null,null) as value1
FROM ACTIVITY a
,MOUNTAINEERING m
,LOV l
,LOV l2
WHERE a.JSATFA_ID = 82
AND a.SPECIFIC_ACTIVITY_LOV_ID = l.LOV_ID
AND m.ACTIVITY_ID(+) = a.ACTIVITY_ID
AND m.CLASSIFICATION_LOV_ID = l2.LOV_ID(+);
you need to duplicate the '
you can do many things like:
CTH@> select * from sqls;
C
select first_name || ' ' || last_name as value1 from employees where rownum=1
1 fila seleccionada.
CTH@>
CTH@> ;
1 declare
2 l_sql varchar2(32767);
3 l_value varchar2(32767);
4 type generic_cursor is ref cursor;
5
6 c generic_cursor;
7
8 begin
9 select replace(c, ''', ''''') into l_sql from sqls;
10
11 execute immediate l_sql into l_value;
12 dbms_output.put_line(l_value);
13* end;
CTH@> /
Ellen Abel
Procedimiento PL/SQL terminado correctamente.
CTH@>

Similar Messages

  • UTL_HTTP, different error codes: APEX SQL Commands vs. Oracle SQL Developer

    Hi, omniscient all!
    I have a code sample where I try to request some URL from an inactive server:
    declare
      l_text varchar2(32000);
    begin
      l_text := utl_http.request('http://inactive.url:7777');
    exception
      when others then
        declare
          l_errcode number := utl_http.get_detailed_sqlcode;
        begin
          dbms_output.put_line(l_errcode);
          dbms_output.put_line(sqlerrm(l_errcode));
        end;
    end;
    /When I run it in Oracle SQL Developer it shows:
    anonymous block completed
    -12541
    ORA-12541: TNS:no listenerWhen I run it in the APEX 4.0 SQL Commands window it shows:
    -29263
    ORA-29263: HTTP protocol error
    Statement processed.The question is: why?
    In real world, I need to make a HTTP POST request (no problem) and catch some exceptions. But instead of the usual ORA-12541 error APEX throws an ORA-29261 one.

    Any thoughts?

  • SQL Command to Start/Stop SQL services for multiple server

    From Central server I want to Start/Stop SQL services and SQL Agent service. Is there any SQL command which I can execute on query analyzer which can Start/Stop SQL services?
    Rahul

    See command line options here using net start
    http://msdn.microsoft.com/en-IN/library/hh403394.aspx
    You can invoke them using xp_cmdshell from management studio as
    ie like below for default instance
    EXEC xp_cmdshell 'net start MSSQLSERVER'
    EXEC xp_cmdshell 'net start SQLSERVERAGENT'
    etc
    and below for named instance
    EXEC xp_cmdshell 'net start MSSQLSERVER$instancename'
    EXEC xp_cmdshell 'net start SQLSERVERAGENT$instancename'
    etc
    and use net stop for stopping services
    EXEC xp_cmdshell 'net start MSSQLSERVER' EXEC xp_cmdshell 'net start SQLSERVERAGENT' etc
    EXEC xp_cmdshell 'net start MSSQLSERVER' EXEC xp_cmdshell 'net start SQLSERVERAGENT' etc
    EXEC xp_cmdshell 'net start MSSQLSERVER' EXEC xp_cmdshell 'net start SQLSERVERAGENT' etc
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • SQL command date parameters breaking SQL code

    Hello,
    I have an SQL statement that executes without error against Oracle 10g.  I've created a command in Crystal Reports 2008 for it.  It uses a date range.  When I parametrize the date range, and select 'Date' as my value type for the parameter, it breaks the SQL with the following error:
    "Failed to retrieve data from the database.
    Details: ORA-00907: missing right parenthesis
    [Database Vendor Code: 907]"
    Here is a sample SQL statement that breaks:
    SELECT *
    FROM gift g
    WHERE g.gift_date_of_record BETWEEN to_date ('{?GiftDateStart}', 'mm/dd/yyyy')
      AND to_date ('{?GiftDateEnd}', 'mm/dd/yyyy')
    Has anyone else experienced this problem or know a work-around?
    Thanks in advance!

    Hi,
    Do it like this
    SELECT *
    FROM gift g
    WHERE g.gift_date_of_record BETWEEN to_date ('{?GiftDateStart}', 'dd/mm/yyyy')
    AND to_date ('{?GiftDateEnd}', 'dd/mm/yyyy')
    I hope this will help you.
    Regards,
    Misra P

  • SQL Commands - ORA-00900: instruction SQL non valide

    Hi everyone,,
    i have installed Oracle Xe on a Centos 5.5 host yesteday.
    Installation was Ok, i can connect to the web interface on "http://127.0.0.1:8080/apex/".
    But when i want to use sql comands, what ever the command entered ,i have the "ORA-00900: instruction SQL non valide" message.
    I can enter "Show all" command, for exemple, in an terminal view after SQL> prompt , it works... but not in the web interface...
    I've tried to import .sql script also, trought the web interface, no much result, no display in the window.
    Someone can help me,
    thanks,

    I'had no error messages during installation, so.. i thing everything is ok.
    i try simple commande like "Show all" , this command works on terminal view.
    Maybe i could try to reinstall or upgrade the version i use ( oracle-xe-10.2.0.1-1.0.i386.rpm )
    .. but tomorrow, it's 2AM in Paris , i need to sleep :-)

  • Operating System Command in JDBC Sender

    Hello everybody,
    I'm trying to find some syntax to execute an operating system command on Windows Server 2003, but the commands don't seem to work I'm actually trying to generate a directory, now the problem is that I can't find syntax examples on how to do this I tried something like MKDIR TEST, now is the syntax of the command lines as you write them in Command Prompt, or maybe there is my error, thanks in advance.
    Regards,

    Confirmed.
    JDBC sender also support OS command.
    Refer to note 841704 if you face any issue while executing OS command in JDBC adapter.
    Note: OS Command execute when processing in database executed successfully. It is even independent on OS command Errors.
    Thanks
    Farooq
    Edited by: Farooq Farooqui on Jan 16, 2009 11:36 AM

  • JDBC Sender Error

    Hi,
    We have a JDBC Sender adapter configured to pull data from the SQL database. This pulls data for every one hour.
    Some times we are getting the below error on the communication channel -
    Database-level error reported by JDBC driver while executing statement 'select * from HR_ExitEvents'. The JDBC driver returned the following error message: 'com.microsoft.sqlserver.jdbc.SQLServerException: An exception occurred during the DBComms.receive method. Operation:Connection reset. Context:(12) [XI JDBC2XI[CC_JDBC_out_HRExitEvents/EMSSQLServer2005/]_15550, IO:a82f3, Dbc:9b28b]. PktNum:0. TotalReceived:0. PktSize:4,096.'. For details, contact your database server vendor.
    Please help.

    Hi Sudeer
    This is a general error message that is raised whenever the SQL server forcibly closes the TCP/IP connection for any of a number of reasons while the driver is waiting for a response to a query.
    This error indicates that the connection with the server has been reset for some reason. The actual cause of the failure could be anything from network (hardware) issues to a problem in either SQL Server or the JDBC driver or any software in between like firewall
    Thanks
    Abhishek

  • Fundamnental question on jdbc sender adapter

    Hi ,
    I have a scneario like
    DB System „³ JDBC Adapter „³ XI  -„³ RFC Adapter „³ SAP R/3 --„³ True „³ response thru same RFC adapter „³ XI BPM will call JDBC Apdapter with Update statement
                                                                                    False „³ response thru same RFC Adapter „³ XI BPM will call File adapter with Append
    now when i use send jdbc adapter , i wld need to have a status flag in my database which would be update when ever data is transmitted sucessfully else the same data would always be picked up .
    i want to know do i need to create a reciever jdbc adapater too for this . because when ever i use sender jdbc adapter and this must be a very common situation . that i have to update the table so that the rows are not picked up again . jdbc senser  has an update statement . writtng an updtae query will it not solve my problem.

    Hi Amit,
    A JDBC sender adapter has 2 essential fields,
    1. SQL Statement
    2. Update Statement
    Your SQL statement will contain your SELECT statement and once your SQL statement is executed, UPDATE statement is executed. This is done so that records that have been selected by the SQL statement should not be selected again as the JDBC sender adapter will poll over the database for every poll interval.
    If you want to SELECT something from your Database, then you will have to go for a JDBC sender adapter.
    But, if you want to insert/update your Database, then you can go for a JDBC receiver adapter.
    Multiple insertions are possible for a JDBC receiver, but multiple Selection queries (different select queries) are not possible for a single JDBC sender adapter.
    Just check these links to understand how JDBC adapters work,
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm">Configuring the Sender JDBC Adapter</a>
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/content.htm">Configuring the Receiver JDBC Adapter</a>
    A few initial steps required to be followed for your Scenario are:
    1. Then create a sender agreement using jdbc o/b interface.
    In receiver determination specify ur bpm as receiver.
    In interface determination specify the abstract interface tht u created for jdbc.
    (u should copy the jdbc interface and then create abstarct interfce of it)
    No receiver agreement required for BPM.
    2. Create receiver determination, using BPM and the abstract interface for legacy tht u created,
    Receiver as legacy system.
    Create Interface determination and receiver agreements.
    Also see through this blog which talks about <a href="/people/saravanakumar.kuppusamy2/blog/2005/01/19/rdbms-system-integration-using-xi-30-jdbc-senderreceiver-adapter sender and receiver adapters</a>
    Regards,
    Abhy

  • Running sql commands from a .sql file

    Hello , I have this problem. How do i execute sql commands found in a .sql file with jdbc. My RDBMS is mysql.

    You will have to open and parse the .sql file, connect to the database, and execute the statements. You can't simply tell JDBC to run your .sql file.
    Depending on the complexity of your .sql file this is easy or hard. If its a bunch of e.g. updates or deletes or something you may be able to get away with running it as a block. In Oracle for example, you can put "begin" and "end;" around a bunch of statements and run it all together. In that case your program would open the SQL file, read the text, put it inside a "begin" and "end;", and run it as a single SQL statement.
    If its a bunch of statements that must be run independently then you'll have to programatically split them up to run one at a time. If its a select and you want to e.g. print results to the screen, well, then it gets tougher...
    - Jemiah

  • SQL Command table linking issues

    I have created a simple SQL command in CR 2008 to save the creation of a view on the DB (SQL Server 2005).  I then link it to another table from the same DB.  Once this was done I began experiencing extremely long run times versus the link with the original view.  The SQL command set was copied directly from the view in MS Visual Sudio.  The joins in CR are left outers and inner that worked fine with the original view.  We ended up running a trace of the SQL Server and found the SQL was producing 21,000 record reads everytime the primary table read a record.  It was not following the inner join at all.  I did a Show SQL in CR and found that the CR generated SQL looked very strange and not like the typical construction when the view was being used instead of the table  What am I doing wrong?  Below is a copy of the Show SQL for this particular issue.  It seems to be the second command set in italics that causes the issue.  That is from the SQL command I created in CR.
    Thanks,
    Brian
    PROD - FIN
    SELECT "MAN_JOBS"."JOB_NUMBER", "MAN_JOBS"."ACTUAL_START_DATE", "MAN_JOBS"."ACTUAL_START_DATE_2", "MAN_JOBS"."STD_PROCESS_SPEC", "MAN_JOBS"."COMPANY_CODE"
    FROM   "fin_prod"."dbo"."MAN_JOBS" "MAN_JOBS"
    EXTERNAL JOIN MAN_JOBS.STD_PROCESS_SPEC={?PROD - FIN: C_IC_PRODUCT_CHARACTERISTICS.PART_CODE} AND MAN_JOBS.COMPANY_CODE={?PROD - FIN: C_IC_PRODUCT_CHARACTERISTICS.COMPANY_CODE} AND MAN_JOBS.COMPANY_CODE={?PROD - FIN: KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.COMPANY_CODE} AND MAN_JOBS.JOB_NUMBER={?PROD - FIN: KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.DOCUMENT_NUMBER} AND MAN_JOBS.STD_PROCESS_SPEC={?PROD - FIN: KX_PRODUCT_MASTER_EXT.PART_CODE}
    PROD - FIN
    SELECT *
    FROM dbo.IC_PRODUCT_CHARACTERISTICS
    WHERE (CHARACTERISTIC_CODE = 'TEXT')
    EXTERNAL JOIN C_IC_PRODUCT_CHARACTERISTICS.PART_CODE={?PROD - FIN: MAN_JOBS.STD_PROCESS_SPEC} AND C_IC_PRODUCT_CHARACTERISTICS.COMPANY_CODE={?PROD - FIN: MAN_JOBS.COMPANY_CODE}
    PROD - FIN
    SELECT "KX_IC_MOVEMENTS_PRODCTN_IN_OUTS"."IC_MOVE_QUANTITY", "KX_IC_MOVEMENTS_PRODCTN_IN_OUTS"."TRANSACTION_TYPE", "KX_IC_MOVEMENTS_PRODCTN_IN_OUTS"."IC_LOT_NUMBER", "KX_IC_MOVEMENTS_PRODCTN_IN_OUTS"."WAREHOUSE", "KX_IC_MOVEMENTS_PRODCTN_IN_OUTS"."PERIOD_TXT", "KX_IC_MOVEMENTS_PRODCTN_IN_OUTS"."YEAR_TXT", "KX_IC_MOVEMENTS_PRODCTN_IN_OUTS"."DOCUMENT_NUMBER", "KX_IC_MOVEMENTS_PRODCTN_IN_OUTS"."PART_CODE", "KX_IC_MOVEMENTS_PRODCTN_IN_OUTS"."COMPANY_CODE"
    FROM   "fin_prod"."dbo"."KX_IC_MOVEMENTS_PRODCTN_IN_OUTS" "KX_IC_MOVEMENTS_PRODCTN_IN_OUTS"
    WHERE  "KX_IC_MOVEMENTS_PRODCTN_IN_OUTS"."COMPANY_CODE"={?PROD - FIN: MAN_JOBS.COMPANY_CODE} AND "KX_IC_MOVEMENTS_PRODCTN_IN_OUTS"."DOCUMENT_NUMBER"={?PROD - FIN: MAN_JOBS.JOB_NUMBER}
    EXTERNAL JOIN KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.PART_CODE={?PROD - FIN: PRODUCT_MASTER.PART_CODE} AND KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.COMPANY_CODE={?PROD - FIN: PRODUCT_MASTER.COMPANY_CODE}
    PROD - FIN
    SELECT "PRODUCT_MASTER"."PRODUCT_CLASS", "PRODUCT_MASTER"."COMPANY_CODE", "PRODUCT_MASTER"."PART_CODE"
    FROM   "fin_prod"."dbo"."PRODUCT_MASTER" "PRODUCT_MASTER"
    WHERE  "PRODUCT_MASTER"."PART_CODE"={?PROD - FIN: KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.PART_CODE} AND "PRODUCT_MASTER"."COMPANY_CODE"={?PROD - FIN: KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.COMPANY_CODE}
    PROD - FIN
    SELECT "KX_PRODUCT_MASTER_EXT"."PRODUCT_CLASS", "KX_PRODUCT_MASTER_EXT"."PART_CODE"
    FROM   "fin_prod"."dbo"."KX_PRODUCT_MASTER_EXT" "KX_PRODUCT_MASTER_EXT"
    WHERE  "KX_PRODUCT_MASTER_EXT"."PART_CODE"={?PROD - FIN: MAN_JOBS.STD_PROCESS_SPEC}

    As an update, I created a view in MS VIsual Studio and copied the SQL command set into a Crystal SQL command and made changes in the report to use the new CR SQL command.  It ran in seconds instead of hours.  There is something wrong with the way CR is building the SQL command when a CR SQL command is linked to a normal DB table.  HELP!  I started using the CR SQL command with only another 1 or 2 tables and it was slower but bearable.  This one uses more table and more data and dies.  Here is what the SQL command set looks like that I built in MS VS and used to create the CR SQL command.  This is from the Show SQL in CR.
    SELECT        dbo.MAN_JOBS.ACTUAL_START_DATE, dbo.MAN_JOBS.ACTUAL_START_DATE_2, dbo.MAN_JOBS.JOB_NUMBER,
                             dbo.KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.DOCUMENT_NUMBER, dbo.KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.IC_LOT_NUMBER,
                             dbo.KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.IC_MOVE_QUANTITY, dbo.KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.PART_CODE,
                             dbo.KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.PERIOD_TXT, dbo.KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.YEAR_TXT,
                             dbo.KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.TRANSACTION_TYPE, dbo.KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.WAREHOUSE,
                             dbo.PRODUCT_MASTER.PRODUCT_CLASS, dbo.KX_PRODUCT_MASTER_EXT.PART_CODE AS KX_PART_CODE,
                             dbo.KX_PRODUCT_MASTER_EXT.PRODUCT_CLASS AS KX_PRODUCT_CLASS, dbo.IC_PRODUCT_CHARACTERISTICS.CHARACTERISTIC_CODE,
                             dbo.IC_PRODUCT_CHARACTERISTICS.IC_DEF_CHAR_TEXT
    FROM            dbo.MAN_JOBS INNER JOIN
                             dbo.IC_PRODUCT_CHARACTERISTICS ON dbo.MAN_JOBS.COMPANY_CODE = dbo.IC_PRODUCT_CHARACTERISTICS.COMPANY_CODE AND
                             dbo.MAN_JOBS.STD_PROCESS_SPEC = dbo.IC_PRODUCT_CHARACTERISTICS.PART_CODE LEFT OUTER JOIN
                             dbo.KX_PRODUCT_MASTER_EXT ON dbo.MAN_JOBS.STD_PROCESS_SPEC = dbo.KX_PRODUCT_MASTER_EXT.PART_CODE AND
                             dbo.MAN_JOBS.COMPANY_CODE = dbo.KX_PRODUCT_MASTER_EXT.COMPANY_CODE LEFT OUTER JOIN
                             dbo.KX_IC_MOVEMENTS_PRODCTN_IN_OUTS ON dbo.MAN_JOBS.COMPANY_CODE = dbo.KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.COMPANY_CODE AND
                             dbo.MAN_JOBS.JOB_NUMBER = dbo.KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.DOCUMENT_NUMBER LEFT OUTER JOIN
                             dbo.PRODUCT_MASTER ON dbo.KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.COMPANY_CODE = dbo.PRODUCT_MASTER.COMPANY_CODE AND
                             dbo.KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.PART_CODE = dbo.PRODUCT_MASTER.PART_CODE
    WHERE        (dbo.IC_PRODUCT_CHARACTERISTICS.CHARACTERISTIC_CODE = N'TEXT')

  • Using unlinked sql command and table in a subreport

    All,
    Does CR allow using an unlinked sql command and a table in the same subreport?  I am passing the CurrentCEUserName from the main report to the sql command in the subreport (via linked parameter).  The sql command then executes a query to pass the parameter to the database (example: select myfunction('{?myparam}' from dual).  I need this to run before subreport's table query is executed. 
    This all appears to work except that the parameter passed to the sql command isn't set when the command executes.  The value is always null when the sql command is executed.  If I add the parameter to the report output it shows the expected value. 
    Also, if I have a subreport that just has a single sql command the parameter is set correctly prior to executing the command.
    any help would be appreciated.
    thanks!

    If you are looking for Crystal to run the SQL Command, then the SQL it generates itself, I think the answer is no, it won't do that.  Crystal expects all of the data sources to be linked, I believe.  I'm not sure what you would expect to happen if they are not...  However, you can make your SQL Command something like (MS SQL; sorry, it's been too long since I've used Oracle...):
    declare @result varchar(100);
    set @result = ( select myfunction('{?myparam}') );
    select * from table;
    which would run the first select calling your function, basically throw away the result (or you can do with it as needed), then return the fields from your table.
    HTH,
    Carl

  • Sender JDBC Communication Update SQL Command Problem!

    Hi all,
    I am trying to do a SENDER JDBC Scenario in XI.
    I fetch the Records from the table Once per day based on the Current Date.
    I do not have any Update Credentials in the table.
    I can only perform Select Querry.
    But when i am trying to configure the SENDER JDBC Channel its asking me to enter value for Update SQL Command in Sender JDBC communication channel Process Parameters.
    Its not accepting BLANK or ' * '  Values.
    But i have only Select Querry credentials in the table. I can only pick the values cant Update the tables but.
    In the Above scenario how can i configure the Sender JDBC CC without Updating the Table after fetching the value?
    Please Advice
    Regards,
    Senthilprakash.

    Hi,
    Specify the Update SQL Statement value as .
    http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
    Thanks
    SaNv...
    Edited by: Sãnthosh Kûmãr  V on Oct 8, 2008 10:44 AM
    Edited by: Sãnthosh Kûmãr  V on Oct 8, 2008 10:45 AM

  • How to use Java with PL/SQL commands to send an email with attachment

    Apologizes in advance if this is the wrong place to ask the question.
    I need to use Java with PL/SQL commands to send an email with attachment. My java application runs from the command line and does some magic to gather info from an Oracle 11g db. If the DB has sendmail configured, I'd like to send the results of the data gathering as an attachment to the email addresses. I'm not sure how to do this. I've been reading up on on PL/SQL can send email with UTL_SMTP - with attachments. I'm just not sure how to translate that into being triggered by my Java application. Any suggestions or pointers on what I should read would be appreciated.
    Background - I've been programming in Java for 10+ years, but this is my first time using databases. I also have been on these forums for a long time, but lost my profile when it was switched to Oracle.
    Thanks for all help.

    user13726880 wrote:
    The original requirements were put together and given to me, an Oracle newbie. They expected the Java app to use something intrinsic to Oracle and Unix sendmail. To solve my problem, I use a JDBC connection to run some SQL commands. I take that data, format it and send the results by email to the user. By default the requirement is to send it as an HTML attachment using Unix 'sendmail'. So I do that using Runtime exec. I have also added JavaMail functionality as an alternative to sendmail. It works great and as expected.Sounds like a reasonable solution.
    Note however that PL/SQL itself can send email. And PL/SQL can call unix sendmail too.
    However myself I would have done it in java with JavaMail.

  • JDBC Sender OS Command

    Hi All,
              I want to know where the operating system command runs when used  in jdbc sender adapter , In PI or in the database after executing the sql queries? I am wondering if i can use a Stored procedure through a script in database. Any help appreciated .And forgive me for my ignorance Thanks.

    What you can do is :
    Create a multi Mapping.
    JDBC Sender DT - JDBC Receiver STored Procedure DT and
    JDBC Sender DT - Actual Receiver .
    Key points to remember is , on Interface Determination .. maintain  order runtime ..... this will help to execute first Stored procedure then your actual target ,  if stored procedure fails then other interface will also not execute as maintain runtime order is checked.
    REgards
    PS

  • In JDBC Sender Adapter , the server is Microsoft SQL .I need to pass current date as the input column while Executing stored procedure, which will get me 10 Output Columns. Kindly suggest me the SQL Query String

    In JDBC Sender Adapter , the server is Microsoft SQL .I need to pass current date as the input column while Executing stored procedure, which will get me 10 Output Columns. Kindly suggest me the SQL Query String , for executing the Stored Procedure with Current date as the input .

    Hi Srinath,
    The below blog might be useful
    http://scn.sap.com/community/pi-and-soa-middleware/blog/2013/03/06/executing-stored-procedure-from-sender-adapter-in-sap-pi-71
    PI/XI: Sender JDBC adapter for Oracle stored procedures in 5 days
    regards,
    Harish

Maybe you are looking for

  • How to use "Number of segments in a message" macro

    When we export an EDIFACT document guideline file to Oracle 2.0 format, we have an option of enabling several macro nodes. One of them is "Number of segments in a message", which can be populate UNT+0074 element. However, in transforming XML for an E

  • My iphone 3gs will not charge after battery replacement

    Hey I've had an iPhone 3gs for almost two years now. Recently I shattered the screen and cracked the back. Last summer I broke my led screen and paid 250 to get a new phone from apple. To avoid this cost my dad decided to order parts online and fix i

  • Duplicate Invoices alert

    Hi All, I have a requirement for report development for Invoice processing purpose.Let say in one month i have total invoice processed in SAP 1000.out of it 25 invoices are duplicate.means it has already processed by unknowingly. I want to display in

  • Method SAP_WAPI_WORKITEM_COMPLETE not allowed for type F

    Hi Gurus I have created a webdynpro abap application in which these steps 1. Application triggers the workflow and workitem got created through FM1. 2. Workitem loads up webdynpro abap application from portal or outlook by changing settings in SWFVIS

  • Mail with image and PDF not displaying correctly on Outlook

    Environment and problem OS X Mountain Lion, Mail 6.1 (everything up to date) Emails with mixed image and PDF attachments send from my MacBoox Pro are not being displayed correctly when received on Outlook. It is not an Outlook problem. Multiple inlin