DB Adapter vs PL/SQL

hi,
If I am using a DB adapter for doing a bit complicated select from table
I also have option of doing this in PL/SQL but it won't be as real time as the BPEL approach.
(I am not to use trigger for some reasons)
My query is : performance- wise, how bad this is with respect to doing the same in PL/SQL
Is the adapter JDBC call with any complicated query very bad as compared to simpler queries?
regards,
Ketan

Sorry I didn't get back sooner.
The "over the line" affects get maybe measurable with large amounts of data. Nowadays a big sql is transfered just as fast as a little one, maybe unless it is done very often. But often if you need to update or calculate something based on data in the database, it's easier, better maintainable and more performant to do it in a Pl/Sql function or procedure.
Also it might get your bpel to reflect the business needs better. Since the invoke is just doing what you functionally need.
Regars,
Martien

Similar Messages

  • Using DB Adapter for MS SQL Server 2005  SP in OSB 11g.

    Hi All,
    I have a requirement to create a DB Adapter for MS SQL Server Stored Procedure in JDeveloper and export the Adapter file to OSB 11g. I have Created the Adapter and imported it into OSB 11g successfully. Created the Datasource and Connection pool also in console.
    The problem is while trying to execute the created business Service, I am getting the error as below,
    <Oct 26, 2012 12:20:25 PM IST> <Error> <JCATransport> <BEA-381967> <Invoke JCA outbound service failed with application error, exception: com.bea.wli.sb.transports.jca.JCATransportException: oracle.tip.adapter.sa.api.JCABindingException: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: servicebus:/WSDL/Test/CheckAppID/WL_Driver/CheckAppId_WL_Driver [ CheckAppId_WL_Driver_ptt::CheckAppId_WL_Driver(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'CheckAppId_WL_Driver' failed due to: Unimplemented string conversion.
    Conversion of JDBC type to String is not supported.
    An attempt was made to convert a Java object to String using an unsupported JDBC type: .
    ; nested exception is:
         BINDING.JCA-11804
    Unimplemented string conversion.
    My XSD is ,
    <element name="InputParameters">
    <complexType>
    <sequence>
    <element name="application_id" type="int" db:index="1" db:type="INT" minOccurs="0" nillable="true"/>
    </sequence>
    </complexType>
    </element>
    <element name="OutputParameters">
    <complexType>
    <sequence>
    <element name="RowSet0" type="db:RowSet0_RowSet" db:type="RowSet0" minOccurs="0" maxOccurs="unbounded" nillable="true"/>
    <element name="RowSet1" type="db:RowSet1_RowSet" db:type="RowSet1" minOccurs="0" maxOccurs="unbounded" nillable="true"/>
    </sequence>
    </complexType>
    </element>
    <complexType name="RowSet1_RowSet">
    <sequence>
    <element name="RowSet1_Row" minOccurs="0" maxOccurs="unbounded">
    <complexType>
    <sequence>
    <element name="cde" type="int" db:type="INT" minOccurs="0" nillable="true"/>
    <element name="msg" db:type="NVARCHAR" minOccurs="0" nillable="true">
    <simpleType>
    <restriction base="string">
    <maxLength value="255"/>
    </restriction>
    </simpleType>
    </element>
    </sequence>
    </complexType>
    </element>
    </sequence>
    </complexType>
    <complexType name="RowSet0_RowSet">
    <sequence>
    <element name="RowSet0_Row" minOccurs="0" maxOccurs="unbounded">
    <complexType>
    <sequence>
    <element name="aaa" type="boolean" db:type="BIT" minOccurs="0" nillable="true"/>
    <element name="bbb" db:type="NVARCHAR" minOccurs="0" nillable="true">
    <simpleType>
    <restriction base="string">
    <maxLength value="10"/>
    </restriction>
    </simpleType>
    </element>
    </sequence>
    </complexType>
    </element>
    </sequence>
    </complexType>
    I don't know why there is a datatype conversion error.
    Help me in resolving this.
    Regards,
    Nataraj R.

    Hi,
    I believe NVARCHAR is an unsupported type...
    The following document lists the supported data types for SQL Server stored procedures and functions... NVARCHAR is not in the list... :-(
    http://docs.oracle.com/cd/E23943_01/integration.1111/e10231/adptr_db.htm#CHDEBEEE
    Hope this helps...
    Cheers,
    Vlad

  • DB Adapter Custom Select SQL with Timestamps

    Hi,
    I am facing an issue with the DB Adapter Custom select sql: here is my scenario:
    I am trying to select diff records from the database between user input start time & the sysdate. for this i am trying to use Execute Pure SQL option database adapter.
    I am framing the SQL as below:
    select  * from tablename1,tablename2 where tablename1.id = tablename1.id  and column1 like #userinput1 and tablename1.request_timestamp between to_date(#Userinput_requestTime) and sysdate
    My question is whether the query
    tablename1.request_timestamp between to_date(#Userinput_requestTime) and sysdate
    is correct or not? I even given a try to_date(#Userinput_requestTime,'DD-MON-YY HH24:mi:ss') and sysdate 
    that too not worked ,
    I have created OSB business service using the generated adapter and the input i am giving it as '04-MAR-15 03.36.23.368179000 PM -06:00' and the input is of type xs:string .
    i am getting errors like java.sql.SQLDataException: ORA-01830: date format picture ends before converting entire input string
    Whether my custom sql is correct or not ? please help me in resolving this issue.
    THanks,
    SV

    if
    tablename1.request_timestamp
    is timestamp then you need to compare as
    timestamp beetween timestamp and timestamp
    so convert date to timestamp by CAST as example
    check How to convert DATE to TIMESTAMP

  • Sender JDBC Adapter with Mutiple SQL Database Tables.

    Hi All,
    My requirement is SQL->PI7.0->BI.
    I have a plan to go with the senario like this : JDBC sender->SAPPI->ABAP Proxy.
    And also I need fetch the data from more than 10 data tables with different database tables with key fields.
    Could you please suggest me, How to extract all tables data to SAP PI System. Either need to go with Stored procedures or Any Join conditions or each table like as one Interface.
    Please provide me your suggestions.
    Regards,
    Chandra

    Hi ,
    Chandra ,
    Best way is Database Views
    Involve a Database guy in your scenario : Tell DBA the fields required , tell DBA the PrimaryKey and ForeignKey Relation Between All your 10 Tables.
    DBA will create a View for you on 10 Tables.
    So in Ur SELECT Query . you can write simply
    Select * from <ViewName>;
    And One more thing to Tell DBA to create a UPDATABLE VIEW not only READ-ONLY View.
    By this way you can way you can Update VIEW  also in UPDATE QUERY of sender Adapter...
    Regards
    PS

  • Cannot get the db adapter connected to sql server proc

    I cannot get the db adapter to connect to my sql server proc. I understand it is a 3rd party db and that I need to create some "artifacts" using the Oracle BPEL Process Manager 10.1.2 > Developer Prompt and run the sample files which I have received from Oracle. However, I am on a linux platform and the procedures are written for windows platform. Has anyone done this artifact generation in linux and if so, what do I need to do to get these built so that I can get my db adapter hooked into my sql server proc?

    Same problem with me.. Couldnot call a stored procedure or function with SQL Server db service.. Some other threads say we need to use a command line utility since there are some comaptibility issue with JDeveloper 10g and com.microsoft.sqlserver.jdbc.SQLServerDriver..
    Please help anyone. What is the workaround?? Please post it here.. Nowhere I could find the solution.
    Thanks,
    Susmit Dey

  • JDBC Receiver Adapter with Native SQL String

    Hi experts
    I need to use a JDBC Receiver Adapter with Message Protocol of Native SQL String, but I don´t understand how to create my data type for XML Document Format. I studied the following example from the SAP Library,
    INSERT INTO tableName (column-name1, column-name2, column-name3) VALUES(u2018column-value1u2019, u2018column-value2u2019, u2018column-value3u2019)
    i´ll be very thankful of your recommendations.

    Another simple way is..
    Create receiver data structure like this....
    <StatementName>
    <anyName action=u201DSQL_DMLu201D>
    <access>INSERT INTO tableName (column-name1, column-name2, column-name3) VALUES('$column-value1$', '$column-value2$', '$column-value3$')
    </access>
    <key>
      <column-value1>value1</column-value1>
      <column-value2>value2<column-value2>
       <column-value3>value3<column-value3>
    </key>
    </anyName > 
    </StatementName>
    Rest are all same.

  • DB Adapter calling PL/SQL Procedure gives error

    Created partner link, calling pl/sql procedure with one in variable and one out variable. Invoke works fine. Assigning pl/sql return value to output is causing run time error. "Rebuild" and "Deploy" works file.
    Here is the error:
    Assign_2
    [2007/08/03 14:18:06]
    Error in evaluate <from> expression at line "93". The result is empty for the XPath expression : "/ns3:OutputParameters/ns3:OUT_STATUS_CODE".
    oracle.xml.parser.v2.XMLElement@ba1893
    Copy details to clipboard
    [2007/08/03 14:18:06]
    "{http://schemas.xmlsoap.org/ws/2003/03/business-process/}selectionFailure" has been thrown.
    - <selectionFailure xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/">
    - <part name="summary">
    <summary>
    empty variable/expression result.
    xpath variable/expression expression "/ns3:OutputParameters/ns3:OUT_STATUS_CODE" is empty at line 93, when attempting reading/copying it.
    Please make sure the variable/expression result "/ns3:OutputParameters/ns3:OUT_STATUS_CODE" is not empty.
    </summary>
    </part>
    </selectionFailure>
    Any input would be appreciated..
    Thanks.

    Thanks, it works.
    In the “Assign Variables”
    Changed from:
    <copy>
    <from variable="Invoke_1_ASNDBTest103_OutputVariable"
    part="OutputParameters" query="/ns3:OutputParameters/ns3:OUT_STATUS_CODE"/>
    <to variable="outputVariable" part="payload"
    query="/ns2:ASNReturnStatus102"/>
    </copy>
    Changed to:
    <copy>
    <from variable="Invoke_1_ASNDBTest103_OutputVariable"
    part="OutputParameters" query="/ns3:OutputParameters"/>
    <to variable="outputVariable" part="payload"
    query="/ns2:ASNReturnStatus102"/>
    </copy>
    So far so good, but one question, compiler gives warning…but everything works well.
    Warning(97):
    [Error ORABPEL-10041]: Trying to assign incompatible types
    [Description]: in line 97 of "C:\HOME\jdevOAExt3\jdevhome\jdev\mywork\ASNTest101\BPELProcess1\bpel\BPELProcess1.bpel", <from> value type "{http://xmlns.oracle.com/pcbpel/adapter/db/APPS/XRX_BPEL_INSERT_ASN_TMP102/}OutputParameters anonymous type" is not compatible with <to> value type "{http://www.thiscompany.com/ns/sales}ASNReturnStatus102".
    [Potential fix]: Please make sure that the return value of from-spec query is compatible with the to-spec query.
    Also, instead of direct variable to variable copy, used expression to variable copy and it works. You can avoid the warning from the compiler.
    Does not work ==> bpws:getVariableData('Invoke_1_ASNDBTest103_OutputVariable','payload','/ns3:OutputParameters/ns3:OUT_STATUS_CODE')
    Works ==> bpws:getVariableData('Invoke_1_ASNDBTest103_OutputVariable','payload','/ns3:OutputParameters’)
    So, why the compiler warning?

  • DB Adapter not importing SQL Svr tables

    Hi,
    Oracle Software:
    OS: Windows
    AS10g (10.1.2)
    BPEL GA Release
    10g DB (used for dehydration)
    SQL Server:
    Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05 Copyright (c) 1988-2003 Microsoft Corporation Enterprise Edition on Windows NT 5.0 (Build 2195: Service Pack 4)
    Issue:
    BPEL DB adapter is not generating a list of tables to import from a SQL Server connection.
    What I have done so far:
    In JDev, create a new DB connection to connect to the SQL Server and it works fine. I am able to see all tablesn and views by expanding the connection.
    In my BPEL partner link, I use the adapter wizard to select DB Adapter and then select the DB connection (SQL sver connection) I have created. All works well until I get to the import table screen where it does not generate a list of available tables to choose from.
    Any help would be greatly appreciated.
    Thanks!

    Hmmm ... Just to understand your problem correctly:
    - can you click on the "Import Tables" button successfully ? Meaning does this bring up another dialog titled "Import Tables" ?
    - If yes, are you able to select the tables to import ?
    - Subsequently, is the wizard not doing anything ? Is this right?
    Regardless, it would also help to run jdev via the following command: $ORACLE_HOME\integration\jdev\jdev\bin\jdev.exe [instead of the windows shortcut - JDeveloper BPEL Designer - which uses jdevw.exe]. This should launch the jdev along with a DOS window where you can see any stack trace if any being dumped by the UI code. When doing the "Import", I am sure you will see some stack trace that you could post back to this thread which would help us debug this issue further.
    Thanks.
    Shashi

  • WCF-SQL Adapter and idle SQL Server sessions

    Hi,
    I have a BizTalk 2013 server with a send port that periodically send SQL statements to a remote SQL Server. The remote SQL Server hosts the database of a Dynamics NAV server.
    The DBA of this SQL Server warned me that a lot of SQL Server sessions remain idle after a long period of time (about 20 idle sessions coming from my BizTalk server with a Idle time that is more than 10 days). He thinks that we have a trouble in BizTalk to
    close the connections to the SQL Server.
    I wondered if I can handle the situation by changing some settings in the sqlBinding used by my send port, for example the MaxPoolSize or other parameters.
    Any idea?
    Thanks.

    So, is this causing an actual problem or is this something the DBA just happened to see?
    20 idle sessions isn't a lot at all and is well below the default Connection Pool size, 100 in most cases.
    So long as it does not keep increasing unchecked, I'd say what you're seeing is the expected and desired behavior.
    You maybe have had a burst at some point causing 20 connections, then normal continuous operations only uses 1 or 2.

  • Waveset adapter to db2 sql tables

    Hi,
    I have a db2 business app that contains 3 tables: Users - Company - Department. The 3 tables are linked with unique keys
    I need to feed these 3 SQL tables with SUN IDM from my virtual identity
    How can I do this ? Using XML ?
    Thanks
    Best Regards

    If you are in IDM space, you can prettry much use the XPRESS layer to do this job

  • SQL types over PLSQL types while using Oracle Applications adapter in BPEL

    Use SQL types over PL/SQL types while using Oracle Applications adapter
    in BPEL/ ESB
    This document will be focusing on Oracle Applications adapter. However Database adapter is much like OA adapter (even OA adapter uses DB Adapter), so the readers who are interested to explore DB adapters, can relate things with this document and go further as well.
    Some Guidelines for writing PL/SQL APIs for OA Adapter
    As we know when we create a partner link from the OA adapter wizard it sometimes writes some wrapper script supportive to the OA Adapter WSDL which contains below
    * Object type for PL/SQL RECORD
    * Nested table of the given type for PL/SQL TABLE. For example, the nested table of NUMBER.
    * INTEGER substituted for PL/SQL BOOLEAN
    * Wrapper Script for converting above three set of data types . (PLSQL to SQL and SQL to PLSQL conversion functions)
    In runtime this wrapper script for converting PL/SQL to SQL and SQL to PL/SQL is an extra overhead.
    So the first advice would be to avoid the use of the below as parameters of PLSQL API being called by OA Adapter.
    * PL/SQL RECORD
    * PL/SQL TABLE. For example, the nested table of NUMBER.
    * PL/SQL BOOLEAN
    In other way we can say we should try to use only SQL data types in arguments if we are planning to call any PL/SQL API from the OA Adapter.
    If the requirement is to use a table or record uses the Object type. In place of BOOLEAN better to use VARCHAR or INTEGER what ever fulfills your requirement. Following this guideline we can reduce a huge number of Line of codes to be run each time the adapter being called.
    Generally, Oracle E-Biz standard APIs use PL/SQL record types and table types so when there is a requirement to call these API’s from OA Adapter (this is a common requirement in development), and if we directly browse the API in OA Adapter Configuration Wizard and create the partner link, again a huge number of code is written by the wizard in the wrapper script (a number of extra mapping of fields which are not being used in the interface).
    In this case better would be to create an Object type with only the required fields which are being used in that call and use them as parameters for the PLSQL API.

    Find the complete document
    http://www.4shared.com/file/167171882/29525116/Use_SQL_types_over_PLSQL_types.html

  • How do you configure a WCF-SQL adapter to write data from a SQL2012 "always on" database?

    Hi All,
    I have a BizTalk environment. I have to write the data from BizTalk to the database which is configured using ALWAYS ON availability group.
    I use WCF-SQL adapter to write the data. My question is this setup a supported?

    The answer is NO.
    Refer: Can
    I use a BizTalk WCF-SQL send adapter with a SQL 2012 Always on Database?
    A snippet quoted below.
    In summary (in order of preference):
    Disable AlwaysOn Availability Groups / Mirroring on SQL server if you need to connect to this SQL server which has this enabled
    Disable transactions and implement logic to be able to handle duplicates .
    Disable transactions and handle the duplicates or lost messages with custom logic (e.g. Send twice and compare and implement error handling). You need to write your own DTC handling this which
    is probably very complicated.
    Disable transactions and live with risk of duplicates or lost messages without handling duplicates.
    Refer: SQL Server AlwaysOn feature does not support MSDTC transactions.
    Rachit
    Please mark as answer or vote as helpful if my reply does

  • Sender JDBC adapter : Update SQL Statement : stored procedure

    Hi,
    Can we use a stored procedure in the sender jdbc adapter in 'Update SQL Statement'.
    The problem i am facing is like, we are selecting data from two tables in 'SQL statement for query' and then in 'Update SQL Statement' , we need to delete that data from these two tables.
    Please let me know if it is possible.
    Thanks,
    Rohit

    you can use a Stored procedure in the
    Query SQL Statement
    You have the following options:
    ·        Specify a valid SQL SELECT statement to select the data to be sent from the specified database.
    ·        Specify an SQL EXECUTE statement to execute a stored procedure, which contains exactly one SELECT statement.
    The expression must correspond to the SQL variant supported by the relevant JDBC driver. It can also contain table JOINs.
    so have your whole select and update as part of this single Stored procedure

  • Problem with SQL WCF Adapter

    Hi All,
    This is my first time attempting to use the SQL WCF adapter with BizTalk, so I installed it after installing the SDK, everything seems fine, when I go to the project ==> Add generated items ==> Add Adapter MetaData
    I can now see the option for the WCF-SQL adapter in addition to the SQL option. however when I select it and try to continue I get this error
    unable to display adapter user interface
    Could not load file or assembly microsoft.servicemodel.channels.tools.biztalkextension, version 3.0.0.0
    and that it could not find the file
    What should I do? Thanks in advance

    If you want to use WCF SQL Adapter you have to generate metadata by add generated items -> Consume adapter services and then select the WCF Custom adapter and select SQL binding. If you want to use the non-WCF adapter then you can select add adapter metadata which you are doing currently.
    The assembly which you have mentioned is in the following path.
    {Installation Folder}\Tools\Microsoft.ServiceModel.Channels.Tools.BizTalkExtension.dll
    Check that the assembly is installed correctly. This is the Consume Adapter Service BizTalk Project Add-In for Visual studio. You can check and verify the installation assemblies from this link http://download.microsoft.com/download/9/0/d/90d3fc09-de48-4d83-8147-e8a08275c255/Readme.htm
    If it still doesn't work re-install the WCF LOB adapter SDK again.
    Abdul Rafay - MVP & MCTS BizTalk Server
    blog: http://abdulrafaysbiztalk.wordpress.com/
    Please mark this as answer if it helps.

  • JDBC Receiver adapter  configuration for MS SQL

    Hi friends,
    I have configured receiver jdbc adapter for MS SQL database which are as follows:
    jdbc driver : com.microsoft.sqlserver.jdbc.SQLServerDriver
    connection: jdbc:sqlserver://USLABWDB01:1433;DatabaseName=Central_Lab_BIDB
    In communcation channel i am getting following error:
    Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Error when attempting to get processing resources: com.sap.aii.af.service.util.concurrent.ResourcePoolException: Unable to create new pooled resource: DriverManagerException: Cannot establish connection to URL 'jdbc:sqlserver://USLABWDB01:1433;DatabaseName=Central_Lab_BIDB': UnsupportedClassVersionError: com/microsoft/sqlserver/jdbc/SQLServerDriver (Unsupported major.minor version 49.0)
    Kindly tell me what is the root cause of the issue.
    Renu.

    Hi Renu,
    Try foll. 2 steps:
    1) Add the IP address of the server(USLABWDB01) to the host file of your PI server, as you are connecting using Hostname.
    2)Try the following connection strings:
        jdbc driver : com.microsoft.jdbc.sqlserver.SQLServerDriver
        connection: jdbc:microsoft:sqlserver://USLABWDB01:1433;DatabaseName=Central_Lab_BIDB
       Here, 'microsoft' word is added in connection string.
    Try using this, it should work.
    -Tanaya.

Maybe you are looking for

  • Issue with Struct and RKF Urgent

    Hi All, i am having a requirement where i need to create 10 restricted key figures and need to place in the rows, i am unable to place them in the row without structure, is der any alternate solution for this. another thing is i had created a structu

  • Dmp import problem

    Hello, I am trying to import a dmp file, but it seems I do something wrong. Anyone knows what Im doing wrong? First, In the Enterprise Manager console, I create a new user (CREATE LIKE scott): <img src="http://users.skynet.be/wouterjans/orcl/oracle03

  • Internal/System Mic How do I get it back?

    So a while back I carelessly removed the microphone built into my laptop (the software or whatever in the volume control options not the actual hardware) which is a Satellite C655-5068. I did not know i had actually removed the driver, and I was wond

  • Customizing Valuation Method

    Hello Experts, I want to do a Foreign Currency Valuation. The valuation shall include general ledger accounts with and without open item management. For that I need to customize a Valuation Method. I am unsure if I have to activate the field Balance

  • FM to create Pallet HU's with Object reference

    Hi all, Is there any FM which can be used to create a Pallet HU and assign it to Delivery or shipment. I am able to create Pallet HUs using the BAPI: "BAPI_HU_CREATE" but then I am unable to assign them to shipment or delivery. I tried using "HU_ASSI