Help on Database Adapter

Hi,
I am new to ESB and webMethods. I am trying to get the data from xml file and store them in database tables. I was able to run the program without any errors, but not able to store the values in database tables.
I used file adapter to get the data, used routing service and database adapter map the data and connect to oracle instance. Every thing is working fine.
I used insert only template in database adapter. Can anyone please help me to how to commit the values in database?
Thanks
Ramana.

Hi,
Thanks for the reply. I found in ESB instance that every thing is fine. Under the status column it see a tick mark. And I am new to ESB integration I have installed ESB and JDeveloper yesterday and started working on it. I don’t know where to check the logs or traces.
I have installed SOL 10.1.3.1 and jdevstudio 10.1.3.1 for Windows XP.
Can you please tell me how to check the logs that.
Regards
Rao.

Similar Messages

  • Multiple database operations in Database Adapter - please help

    Hi,
    I would like to have multiple operation in my database adapter. I drop the database adapter onto the composite.xml and follow the wizard. An adapter with one operation is created.
    When I click the "Edit" button on it and run the wizard again, all the previous changes are lost, and only the new operation is present.
    In the "Oracle® Fusion Middleware User's Guide for Technology Adapters 11g Release 1 (11.1.1.5.0) 9 Oracle JCA Adapter for Database" I read the following:+
    While at run time you have Oracle Database Adapter instances, at design time you have the Adapter Configuration Wizard (link). You can run it once to generate a single adapter service end point, and then multiple times in edit mode to make incremental changes to each. It generates all the adapter related artifacts needed when deploying a SOA composite as Table 9-1 lists.
    But I how do I change the Jdeveloper into the "edit mode" ??? I've been trying for hours, and I cant figure it out. Please help!!!

    Hi Vijay,
    did you actually test this? When I finish creating a DBAdapter, there is a operation present. Then when I click edit again on the DBAdapter, and I create another select, when I finish only the first operation is gone, and I can only see the one I've created via the last edit.
    I dont understand your reply. Can I have two operations, each one with select underneath, in the same adapter?
    Edited by: user13604541 on Jan 30, 2012 11:19 AM

  • SQLServer Exception and Database Adapter. Please Help!!

    Hello Everyone!
    I've been trying during a whole week to insert a row in an SQLServer Database table from a BPEL Process using the database adapter. But I've never had success, I will show you the table, the XML used to do the insert with the DB adapter and the exception, I hope that someone will help me.
    The Table:
    CREATE TABLE [dbo].[Solicitudes](
         [NumSolicitud] [int] IDENTITY(1,1) NOT NULL,
         [NifSol] [varchar](9) COLLATE Modern_Spanish_CI_AS NOT NULL,
         [Destino] [varchar](max) COLLATE Modern_Spanish_CI_AS NOT NULL,
         [Motivo] [varchar](max) COLLATE Modern_Spanish_CI_AS NOT NULL,
         [FechaS] [datetime] NOT NULL,
         [FechaR] [datetime] NOT NULL,
         [InformeDirDep] [varchar](max) COLLATE Modern_Spanish_CI_AS NULL,
         [VoBoDirDep] [int] NOT NULL CONSTRAINT [DF_Solicitudes_VoBoDirDep] DEFAULT ((2)),
         [FirmaDirDep] [varchar](9) COLLATE Modern_Spanish_CI_AS NULL,
         [VoBoDirCen] [int] NOT NULL CONSTRAINT [DF_Solicitudes_VoBoDirCen] DEFAULT ((2)),
         [FirmaDirCen] [varchar](9) COLLATE Modern_Spanish_CI_AS NULL,
         [MedioLocom] [varchar](max) COLLATE Modern_Spanish_CI_AS NOT NULL,
         [Matricula] [varchar](max) COLLATE Modern_Spanish_CI_AS NOT NULL,
         [Credito] [varchar](10) COLLATE Modern_Spanish_CI_AS NOT NULL,
         [CantidadEst] [float] NOT NULL,
         [VoBoRespCredito] [int] NOT NULL CONSTRAINT [DF_Solicitudes_VoBoRespCredito] DEFAULT ((2)),
         [FirmaRespCredito] [varchar](9) COLLATE Modern_Spanish_CI_AS NULL,
         [VoBoRector] [int] NOT NULL CONSTRAINT [DF_Solicitudes_VoBoRector] DEFAULT ((2)),
         [FirmaRec] [varchar](9) COLLATE Modern_Spanish_CI_AS NULL,
         [FechaFirmaRec] [datetime] NULL,
         [FirmaSolicitante] [varchar](max) COLLATE Modern_Spanish_CI_AS NULL,
         [FechaSol] [datetime] NOT NULL,
    CONSTRAINT [PK_Solicitudes] PRIMARY KEY CLUSTERED
         [NumSolicitud] ASC
    )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
    ) ON [PRIMARY]
    The XML:
    <InvokeAdapter_insert_InputVariable>
    <part name="SolicitudesCollection" >
    <SolicitudesCollection>
    <Solicitudes>
    <CantidadEst>250.73</CantidadEst>
    <Credito>Crédito21</Credito>
    <Destino>Destino2</Destino>
    <FechaR>2007-04-14T12:45:51.924</FechaR>
    <FechaS>2007-04-14T12:45:51.908</FechaS>
    <FechaSol>2007-04-14T12:45:51.939</FechaSol>
    <FirmaSolicitante>Signature26</FirmaSolicitante>
    <Matricula>Matrícula20</Matricula>
    <MedioLocom>MedioLocomoción19</MedioLocom>
    <Motivo>Motivo3</Motivo>
    <NifSol>12345678S</NifSol>
    </Solicitudes>
    </SolicitudesCollection>
    </part>
    </InvokeAdapter_insert_InputVariable>
    And the Exception (Translated from spanish):
    Descripción de Excepción: com.microsoft.sqlserver.jdbc.SQLServerException: El nombre de objeto 'SEQUENCE' no es válido. Excepción Interna: com.microsoft.sqlserver.jdbc.SQLServerException: El nombre de objeto 'SEQUENCE' no es válido. Código de Error: 208
    Exception Description: com.microsoft.sqlserver.jdbc.SQLServerException: invalid object name 'SEQUENCE'. Internal Exception: com.microsoft.sqlserver.jdbc.SQLServerException: invalid object name 'SEQUENCE'. Error Code: 208
    Why do i have this exception? Please help!!

    Hi peter, thanks for answering!!
    I don't have anything called sequence so i don't know why I have this error. The steps described in the page you sent to me were followed and the connection is good.
    Do you know if there's any way to know the SQL query executed or the jdbc classes used by the database adapter?
    Regards Antonio
    P.D. I'm using SQL Server Express 2005

  • Null/Empty Strings use in ESB Database Adapter

    Hi
    I'm trying to use a database adapter to execute an update on a table with a composite primary key; one of the primary key columns sometimes contains an empty string, however whenever I try to call the adapter, it always converts this to a null value. Is there an easy way to force the adapter to use an empty string instead of a null?
    Thanks.

    the idea here is to execute the dbms statement, or the setpolicycontext statement in a db session, and being able to execute the next sql statement in the same db session.
    This is possible with consecutive database adapters sharing the same db session.
    and two db adapters sharing the same db session is possible, if you make sure that the bpel is participating in the db transaction which can be made possible via xa db connections.
    Hope this helps,
    Write back in case you need more info.

  • 11g Database Adapter: How to make queries using LIKE with % (possible bug?)

    Hi there!
    Sorry if this has been answered before, but the forum search ignores '%' so I could not find anything relevant. I'm completely at a loss here guys so any help will be really appreciated.
    I've got a database adapter that executes a "pure SQL" query:
    select * from supplier t
    WHERE t.idsupplier = #idSupplierParam OR #idSupplierParam2 IS NULL
    AND t.name like '%' || #nameParam || '%' OR #nameParam2 IS NULL
    AND t.address like '%' || #addressParam || '%' OR #addressParam2 IS NULL
    AND t.description like '%' || #descParam || '%' OR #descParam2 IS NULL
    I've got a single record in my DB with name= 'supplier1'
    When I execute my bpel passing 'sup' as nameParam and nameParam2, everything is right and I get my supplier1 in the results.
    BUT if I pass 'asdfghj' as name, I still get my 'supplier1' in the results ¿¿¿???
    ¿Is this a bug? ¿Am I doing something wrong? Thanks in advance!!

    No, but thanks for trying. Iif you had read my post you'd had found that I wrote
    +When I execute my bpel passing 'sup' as nameParam and nameParam2+
    But I double checked against that just in case. I made a test query
    select * from supplier t WHERE t.name like '%' || #nameParam || '%'
    And no matter what I pass as nameParam, I always GET ALL THE RECORDS in my table. ¿Any idea what's going on? It's like param is being ignored and the query that is executed is select * from supplier t WHERE t.name like '%%' which would of course return everything in the DB. :(
    Help plz!!

  • How to use Database adapter as inbound adapter without having polling strategies?

    Hi All,
    I have a requirement wherein I have to use Database adapter to retrieve the data for every half an hour from one(X app) database and update that data into another application(Y app) .That database adapter will be along with BPEL process.My Flow would be like this:
    Database Adapter( In 'exposed services' section) ----->   BPEL (in 'Components') -----> Y app service( in 'External References' section)
    My questions for each step are below
         1) I have to retrieve the data from database(x app database) for every half an hour.So I have to schedule my whole process such that it should execute for every half an hour.
    Means I have to get  whatever the data is updated in the last half an hour in that database.
          The database adapter should be inbound in SOA composite editor(in 'Exposed services' section).
    But in order to have inbound adapter,we have select the 'Poll for New or Changed Records in a Table' option in turn we have to select one of polling operations below:
             Delete the Row(s) that were Read
    Update a Field in the [Table_Name] Table (Logical Delete)
    Update a Sequencing Table
    Update an External Sequencing Table on a Different Database
    Control Table Strategy
    But the problem is I don't have any control on the database(X app database) ,So (I can't update any data on that table,because that table may not have a field or table to update the processed rows)I can't choose any of the above operations.
    How can I achieve what I want that is to retrieve the data and schedule the process?
    Thanks in advance.

    Hi Heckler,
      Thank you very much for your answer that I can proceed further somehow.
    I still need to have some clarifications.
    In order to have a process which retrieves the data (Inbound operation) and updates the data into other application, the data(from X app)  should be the request(through DB adapter) of the BPEL process.
    X app does not do anything to send.We have(the BPEL process) to receive the data (or) no event is triggered.
    The flow :
    Database Adapter( In 'exposed services' section to retrieve data) ----->   BPEL (in 'Components') -----> Y app service( in 'External References' section)
    How can we ensure the data will be  request to BPEL process(means it will be in 'exposed services' section in SOA composite editor) for every half an hour if we use pick activity and database adapter as first activity?
    When we use ''Poll for New or Changed Records in a Table' ,then only adapter becomes inbound and comes into the 'exposed services' section.I can't use it as I don't have any control on the source table.
    I have this confusion before starting the process.Please help me to clear out the doubts.
    And this whole process should be executed automaticallly for every half an hour(means it creates instance for every half an hour)  Once we build the BPEL process.
    How to schedule it?
    And where do I need to create control table ?You mean I have to use some different database where in I have to create the table?

  • Error in Database Adapter Insert Or Update (Merge) Operation

    I have a simple SOA composite which reads XML files and posts data to a database table using a database adapter. I would like to perform a merge operation but I keep getting this error in the log -
    SEVERE: JCABinding=> XML2DB:WriteInvToDB [ WriteInvToDB_ptt::merge(InventoryCollection) ] Could not invoke operation 'merge' against the 'Database Adapter' due to:
    BINDING.JCA-11616
    DBWriteInteractionSpec Execute Failed Exception.
    merge failed. Descriptor name: [WriteInvToDB.Inventory].
    Caused by java.lang.NullPointerException.
    Here is the complete log:
    SEVERE: JCABinding=> XML2DB:WriteInvToDB [ WriteInvToDB_ptt::merge(InventoryCollection) ] Could not invoke operation 'merge' against the 'Database Adapter' due to:
    BINDING.JCA-11616
    DBWriteInteractionSpec Execute Failed Exception.
    merge failed. Descriptor name: [WriteInvToDB.Inventory].
    Caused by java.lang.NullPointerException.
    Please see the logs for the full DBAdapter logging output prior to this exception.
    Jan 3, 2009 10:58:06 AM oracle.integration.platform.blocks.adapter.fw.log.LogManagerImpl log
    SEVERE: JCABinding=> [default/XML2DB!1.0*2008-12-23_13-27-06_078.WriteInvToDB]:merge One-way interaction failed
    Jan 3, 2009 10:58:06 AM oracle.tip.mediator.serviceEngine.MediatorServiceEngine post2Mesh
    SEVERE: Post 2 messah failed
    oracle.fabric.common.FabricInvocationException: BINDING.JCA-12563
    Exception occured when binding was invoked.
    Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'merge' failed due to: DBWriteInteractionSpec Execute Failed Exception.
    merge failed. Descriptor name: [WriteInvToDB.Inventory].
    Caused by java.lang.NullPointerException.
    The invoked JCA adapter raised a resource exception.
    Please examine the above error message carefully to determine a resolution.
         at oracle.integration.platform.blocks.adapter.fw.jca.cci.EndpointInteractionException.getFabricInvocationException(EndpointInteractionException.java:74)
         at oracle.integration.platform.blocks.adapter.AdapterReference.post(AdapterReference.java:226)
         at oracle.integration.platform.blocks.mesh.AsynchronousMessageHandler.doPost(AsynchronousMessageHandler.java:153)
         at oracle.integration.platform.blocks.mesh.MessageRouter.post(MessageRouter.java:152)
         at oracle.integration.platform.blocks.mesh.MeshImpl.post(MeshImpl.java:159)
         at sun.reflect.GeneratedMethodAccessor253.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
    Caused by: BINDING.JCA-12563
    Exception occured when binding was invoked.
    Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'merge' failed due to: DBWriteInteractionSpec Execute Failed Exception.
    merge failed. Descriptor name: [WriteInvToDB.Inventory].
    Caused by java.lang.NullPointerException.
    The invoked JCA adapter raised a resource exception.
    Please examine the above error message carefully to determine a resolution.
         at oracle.integration.platform.blocks.adapter.fw.jca.cci.JCAInteractionInvoker.executeJcaInteraction(JCAInteractionInvoker.java:428)
         at oracle.integration.platform.blocks.adapter.fw.jca.cci.JCAInteractionInvoker.invokeJcaReference(JCAInteractionInvoker.java:509)
         at oracle.integration.platform.blocks.adapter.fw.jca.cci.JCAInteractionInvoker.invokeAsyncJcaReference(JCAInteractionInvoker.java:493)
         at oracle.integration.platform.blocks.adapter.fw.jca.cci.JCAEndpointInteraction.performAsynchronousInteraction(JCAEndpointInteraction.java:429)
         at oracle.integration.platform.blocks.adapter.AdapterReference.post(AdapterReference.java:193)
         ... 49 more
    Caused by: BINDING.JCA-11616
    DBWriteInteractionSpec Execute Failed Exception.
    merge failed. Descriptor name: [WriteInvToDB.Inventory].
    Caused by java.lang.NullPointerException.
    Please see the logs for the full DBAdapter logging output prior to this exception.
         at oracle.tip.adapter.db.exceptions.DBResourceException.createEISException(DBResourceException.java:488)
         at oracle.tip.adapter.db.exceptions.DBResourceException.outboundWriteException(DBResourceException.java:529)
         at oracle.tip.adapter.db.transaction.DBTransaction.commit(DBTransaction.java:287)
         at oracle.integration.platform.blocks.adapter.fw.jca.cci.JCAInteractionInvoker.executeJcaInteraction(JCAInteractionInvoker.java:311)
         ... 53 more
    Caused by: java.lang.NullPointerException
         at oracle.toplink.descriptors.DescriptorQueryManager.putCachedUpdateCalls(DescriptorQueryManager.java:1605)
         at oracle.toplink.internal.queryframework.ExpressionQueryMechanism.prepareUpdateObject(ExpressionQueryMechanism.java:1608)
         at oracle.toplink.internal.queryframework.StatementQueryMechanism.updateObject(StatementQueryMechanism.java:405)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.updateObjectForWriteWithChangeSet(DatabaseQueryMechanism.java:1136)
         at oracle.toplink.queryframework.UpdateObjectQuery.executeCommitWithChangeSet(UpdateObjectQuery.java:69)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.executeWriteWithChangeSet(DatabaseQueryMechanism.java:279)
         at oracle.toplink.queryframework.WriteObjectQuery.executeDatabaseQuery(WriteObjectQuery.java:47)
    Jan 3, 2009 10:58:06 AM oracle.integration.platform.blocks.adapter.fw.log.LogManagerImpl log
    WARNING: JCABinding=> ReadXML ReadXMLonReject: The resource adapter 'File Adapter' requested handling of a malformed inbound message. However, the following Service property has not been defined: 'rejectedMessageHandlers'. Please define it and redeploy the module. Will use the default Rejection Directory file://jca\ReadXML\rejectedMessages for now.
    Jan 3, 2009 10:58:06 AM oracle.integration.platform.blocks.adapter.fw.log.LogManagerImpl log
    WARNING: JCABinding=> ReadXML ReadXMLonReject: Sending invalid inbound message to Exception Handler:
    Jan 3, 2009 10:58:06 AM oracle.tip.mediator.common.error.ErrorMessageEnqueuer$EnqueuerThread run
    SEVERE: Failed to enqueue error message
    javax.jms.TransactionInProgressException: Cannot call commit on a XA capable JMS session.
         at oracle.j2ee.ra.jms.generic.RAUtils.make(RAUtils.java:595)
         at oracle.j2ee.ra.jms.generic.RAUtils.toTransactionInProgressException(RAUtils.java:846)
         at oracle.j2ee.ra.jms.generic.RAUtils.toTransactionInProgressException(RAUtils.java:840)
         at oracle.j2ee.ra.jms.generic.SessionWrapper.commit(SessionWrapper.java:197)
         at oracle.tip.mediator.common.error.ErrorMessageEnqueuer$EnqueuerThread.run(ErrorMessageEnqueuer.java:187)
         at java.lang.Thread.run(Thread.java:595)
    Any help is greatly appreciated.
    The INSERT operation works fine with the database adapter, but I cannot get MERGE and UPDATE operations to work as expected!
    Thanks.

    hi Sudeep,
    We are at first hand struggling with DB adapter problem getting down everytime. Don't know the reason why.
    DB adapter is in down state and when trying to make it up gives below error:
    "weblogic.application.ModuleException: weblogic.connector.exception.RAException: Jndi Name is null or empty."
    I just created a simple sync process using DB adapter (custom select) and deplyed successfully. I hope jndi name is not to be configured in weblogic-ra.xml file.
    This is the first time we are using this JNDI name (eis/DB/calvindb).
    Any inputs will be appreciated.
    Thanks,
    Nikhil

  • PollingInterval in database adapter

    Hi,
    I have SOA 11g with two nodes. I have a database adapter that polls a table after every 30 seconds and perform logical delete on the rows read. I came across interesting situation. When one node is up and PollingInterval=30, it works okay and polling is done right after 30 seconds but when both nodes are up the PollingInterval property doesnt work as expected. It will poll after 24 seconds and then second node will again poll after 6 seconds (node1+node2=30 seconds in total).
    Just wondering if I am missing something or doing something wrong? I want each node to run after 30 seconds (i.e only one instance after 30 seconds). My JCA file is:
    <connection-factory location="eis/DB/myConn" UIConnectionName="Connection1" adapterRef=""/>
    <endpoint-activation portType="MY_DATABASE_ptt" operation="receive">
    <activation-spec className="oracle.tip.adapter.db.DBActivationSpec">
    <property name="DescriptorName" value="MY_DATABASE.XYZTABLE"/>
    <property name="QueryName" value="MY_DATABASESelect"/>
    <property name="MappingsMetaDataURL" value="MY_DATABASE-or-mappings.xml"/>
    <property name="PollingStrategy" value="LogicalDeletePollingStrategy"/>
    <property name="MarkReadColumn" value="PROCESSED_FLAG"/>
    <property name="MarkReadValue" value="P"/>
    <property name="MarkUnreadValue" value="Y"/>
    <property name="PollingInterval" value="30"/>
    <property name="MaxRaiseSize" value="100"/>
    <property name="MaxTransactionSize" value="100"/>
    <property name="SequencingColumn" value="TRANSACTION_ID"/>
    <property name="NumberOfThreads" value="1"/>
    <property name="ReturnSingleResultSet" value="false"/>
    </activation-spec>
    </endpoint-activation>
    </adapter-config>
    Any help will be appreciated.
    Thanks!

    Hi,
    Just have at look at this can be helpful
    http://javaoraclesoa.blogspot.ca/2012/04/polling-with-dbadapter-in-clustered.html'
    This reserved value (MarkReservedValue in _db.jca) causes an instance of the process to set an identifier. This identifier is skipped by the other polling instances in the cluster.*
    Regards,
    Tarak.

  • MaxRaiseSize in database adapter

    Experts,
    I want to read single record on each polling frequency using database adapter as we do using FTP to read single file on each polling frequency by setting the property
    MaxRaiseSize to 1. But i could make it to work in database adapter . It is creating separate instance for each record but all on at the same time. but i want single instance on single record on each polling frequency . How can i do this. Please advise.
    Thanks a lot for your help.

    Hi:
    Try setting the following two parameters in the DB Adapter Wizard:
    Database Rows per XML Document
    Specify the number of rows per XML document when sending events to Oracle BPEL Process Manager or Oracle Mediator. This is the batch setting between the database adapter and its consumer: Oracle BPEL Process Manager or Oracle Mediator. For maximum throughput, it is ideal to pass a collection of rows as a single event. This reduces the per instance overhead and allows batching on the other end; that is, the database adapter merge or insert command can leverage batch database writing if it receives multiple rows as part of one invoke. Leave this set to 1 if your process performs unique processing on each row (if conceptually one row translates to one event).
    Database Rows per Transaction
    Select Unlimited or enter a value to indicate the number of table rows to process during a single transaction. For example, assume there are 10,000 rows at the start of a polling interval and this field is set to 100. In standalone mode, a cursor iteratively reads and processes 100 rows at a time until all 10,000 rows are processed, dividing the work into 10,000/100=100 sequential transactional units. This is the batch setting between the database and the database adapter. It cannot be set lower than database rows per XML document, which is the batch setting between the database adapter and its consumer: Oracle BPEL Process Manager or Oracle Mediator Component
    Hope this helps.
    best

  • Sql queries in database adapter

    Hi,
    I want to write, say, 2 select statements in the database adapter. How can I accomadate using "execute pure sql"?
    Regards,
    Aasta

    maybe these links will help you :
    Urgent : Fault Policies in 11g
    http://download.oracle.com/docs/cd/E15523_01/integration.1111/e10226/soacompapp_mang.htm
    http://www.it-eye.nl/weblog/2009/12/10/using-fault-management-framework-in-oracle-11g/
    http://download.oracle.com/docs/cd/E12839_01/integration.1111/e10224/med_faulthandling.htm#SOASE274

  • Database Adapter Polling, Instances in Running State

    Hello All,
    I have a composite in which the database adapter is a service (polling a table in SQL Server). Sometimes, when instances gets created, like 2 instances are being in a running state and not being completed at all. we terminated the instances last 2 times, and this scenario is being repeated again. If i click the instance which is running, i can only see the service which says it is completed, no BPEL component is being seen, can anyone faced this issue before ? why this is happening ?
    Please help....
    Naresh

    Could you provide more insight on how you wired the adapter and BPEL process inside the composite? What does the BPEL look like? You could add a BPEL component that persists some stuff just for test purposes. That could give you more feedback from the console.
    hth,
    Peter Paul

  • Database Adapter - Using in Clause

    In the Database adapter - I need to generate a Query like
    Select * from employee where empid in (1,2).
    empid - is a integer column
    I have tried the pure sql option and generated a query like Select * from employee where empid in (#ids).
    In the transformation, I am creating a comma separated string for ids and have bound it to ids variable.
    The above works for a single ID but throws an binding error when multiple Id's are passed.
    Whats the best way to handle 'In' Clause on a integer column? (There is no issue with string columns - multiple values can be passed)

    You will need utility PL/SQL function for that:
    create or replace type myTableType
    as table of number;
    create or replace function str2tbl( p_str in varchar2 ) return myTableType
    as
    l_str long default p_str || ',';
    l_n number;
    l_data myTableType := myTabletype();
    begin
    loop
    l_n := instr( l_str, ',' );
    exit when (nvl(l_n,0) = 0);
    l_data.extend;
    l_data( l_data.count ) :=
    ltrim(rtrim(substr(l_str, 1, l_n - 1)));
    l_str := substr( l_str, l_n+1 );
    end loop;
    return l_data;
    end;
    and then in Db Adapter:
    Select * from employee where empid in ( select * from TABLE ( cast ( str2tbl( #ids) as myTableType ))
    Hope that helps,
    Adam

  • Can we split and fetch the records in Database Adapter

    Hi,
    I designed a Database Adapter to fetch the records from oracle Database. Some time, the Database Adapter need to fetch around 5000, or 10,000 records in single shot. In that case my BPEL process is choking and getting error as
    java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:2882) at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
    Could someone help me to resolve this?
    In Database Adapter can we split and fetch the records, if number of records more then 1000.
    ex. First 100 rec as one set and next 100 as 2nd set like this.
    Thank you.

    You can send the records as batches useing the debatching feature of db adapter. Refer documentation for implementation details.

  • How to invoke a stored procedure in database adapter

    Hi All,
    i have created a database adapter which contains a stored procedure, the procedure is merge process,which bring data from another database,
    i have made sure that checking for new records and updating any changes from the source database everything has been taken care in the procedure.
    my question is how to invoke this process, what all process activities need to be associated with the database adapter, to invoke it
    assuming i want to run it every 5 hours,
    any reply would be of great help.
    Regards
    Ananth

    Hi,
    V thanks for you reply, i am v much new to this bpel environment, i tried using invoke but got errors like
    Error(61):
    [Error ORABPEL-10107]: Invalid initial activities
    [Description]: in line 61 of "C:\jdevstudio10134\jdev\mywork\Incremental_refresh\data_incr_refresh\bpel\data_incr_refresh.bpel", Initial activity is invalid. An initial activity must be of a receive or pick activity..
    [Potential fix]: Please re-arrange the BPEL process definition to make sure its initial activity is of a receive or pick activity. (e.g. by adding new receive activity or removing invalid initial activities..
    Error:
    [Error ORABPEL-10063]: missing initial receive activity
    [Description]: in "C:\jdevstudio10134\jdev\mywork\Incremental_refresh\data_incr_refresh\bpel\data_incr_refresh.bpel", there is no receive activity that starts the process.
    [Potential fix]: make sure one of "pick" and "receive" activities have attribute      "createInstance" set to be "yes".
    later i used the service pick, so from pick i am heading to ivoke and later to finally database adapter, but still getting below error
    Error(59):
    [Error ORABPEL-10900]: xml parser error
    [Description]: in line 59 of "file:/C:/jdevstudio10134/jdev/mywork/Incremental_refresh/data_incr_refresh/bpel/data_incr_refresh.bpel", XML parsing failed because file:/C:/jdevstudio10134/jdev/mywork/Incremental_refresh/data_incr_refresh/bpel/data_incr_refresh.bpel<Line 59, Column 19>: XML-24536: (Error) Missing Attribute 'partnerLink'.
    [Potential fix]: Fix the invalid XML.
    Error(59):
    [Error ORABPEL-10900]: xml parser error
    [Description]: in line 59 of "file:/C:/jdevstudio10134/jdev/mywork/Incremental_refresh/data_incr_refresh/bpel/data_incr_refresh.bpel", XML parsing failed because file:/C:/jdevstudio10134/jdev/mywork/Incremental_refresh/data_incr_refresh/bpel/data_incr_refresh.bpel<Line 59, Column 19>: XML-24536: (Error) Missing Attribute 'portType'.
    [Potential fix]: Fix the invalid XML.
    Error(59):
    [Error ORABPEL-10900]: xml parser error
    [Description]: in line 59 of "file:/C:/jdevstudio10134/jdev/mywork/Incremental_refresh/data_incr_refresh/bpel/data_incr_refresh.bpel", XML parsing failed because file:/C:/jdevstudio10134/jdev/mywork/Incremental_refresh/data_incr_refresh/bpel/data_incr_refresh.bpel<Line 59, Column 19>: XML-24536: (Error) Missing Attribute 'operation'.
    [Potential fix]: Fix the invalid XML.

  • Dynamic where clause in Database Adapter, or workaround?

    Hello friends,
    Is there any way to change where clause in Database Adapter (DA) dynamically.
    For e.g. i do have Database Adapter with sql statement: select col1,col2 from my_table. Originally i have many parameters which are not mandatory so instead of creating where clause in DA like:
    select col1, col2 from my_table where+
    *((#p_col_1 is not null and #p_col_1=col1) or #p_col_1 is null)*
    and ...
    and  ((#p_col_n is not null and #p_col_n=col_n) or #p_col_n is null)
    i would like to create a where clause dynamically depend on what parameters are not empty or receive where clause as parameter. Is it possible? Are there any others workarounds you can suggest?
    will appreciate any thoughts...

    Thanks Deepa for the links, their where quite helpful. And i must admit this partially answers my question (at least example i provided).
    However - how about if i'd like to use LIKE clauses instead of =, or IN or NOT IN? e.g:
    select col1, col2 from my_table where+
    ((#p_col_1 is not null and #p_col_1 LIKE col1) or #p_col_1 is null)
    and ...
    and ((#p_col_n is not null and col_n IN #p_col_n) or #p_col_n is null)
    Is it possible?
    thanks in advance

Maybe you are looking for

  • Change Reconciliation Account

    Hello, The user ask me to change Reconciliation accounts for some vendors and customers. I've done the following steps: 1/ Set the u201CReconciliation Accountu201D field in the vendor master as optional field (customizing) 2/ Define Adjustment Accoun

  • Mobile Applications folder missing

    Hello everyone, I am trying to acces files, which are supposed to be located inside the "Mobile Applications" folder, which should be located at C:\Users\<username>\Music\iTunes\iTunes Media. However, this folder is missing. The only things that are

  • No internet

    I had no internet yesterday for 6 hours, it took 50 minutes to get through to anyone, they said I had a faulty hub, and would send me a new one, i then changed the hub and rang again this time waited 55 minutes to get through, they said I had a fault

  • Subscreen in MIGO

    Hi all I need to call a subscreen in the migo transaction. How to do that.... Can anyone help me in this Cheers Christina

  • Dimension Lock Problem

    Hello experts, I've a dimension lock issue. One of my Dimensions in the Appset is locked by a user. Hence i'm unable to maintain Dimension members as it is in locked state. However the user have logged into the Appset and tried to maintain the dimens