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

Similar Messages

  • Build dynamic SQL query in Database Adapter.

    Hi All,
    I have a requirement to build dynamic sql query at Database Adapter.
    My BPEL process is getting search spec as input from siebel. I need to process this searchspec in BPEL and need to build the SQL query dynamically at Database Adapter to fetch the records from DB.
    it goes like this....
    1. Sieble Search Spec: city1 OR city2 OR city3 OR city4 .....
    I need to build query as
    select * from S_ADDR_PER where city like 'city1' OR city like 'city2' OR city like 'city3' OR city like 'city4' ......
    2. Siebel Search spec: city1 AND country1 AND state1....
    I need to build query as
    Select * from S_ADDR_PER where city like 'city1' AND country like 'country1' AND state like 'state1' ....
    3. Siebel Search spec: state
    I need to build query as
    select * from S_ADDR_PER where state like '%state%';
    Is it feasible in Database Adapter? if its Yes.
    Any guidelines to achieve this?
    Thank you
    Chandra

    Hi All,
    I have a requirement to build dynamic sql query at Database Adapter.
    My BPEL process is getting search spec as input from siebel. I need to process this searchspec in BPEL and need to build the SQL query dynamically at Database Adapter to fetch the records from DB.
    it goes like this....
    1. Sieble Search Spec: city1 OR city2 OR city3 OR city4 .....
    I need to build query as
    select * from S_ADDR_PER where city like 'city1' OR city like 'city2' OR city like 'city3' OR city like 'city4' ......
    2. Siebel Search spec: city1 AND country1 AND state1....
    I need to build query as
    Select * from S_ADDR_PER where city like 'city1' AND country like 'country1' AND state like 'state1' ....
    3. Siebel Search spec: state
    I need to build query as
    select * from S_ADDR_PER where state like '%state%';
    Is it feasible in Database Adapter? if its Yes.
    Any guidelines to achieve this?
    Thank you
    Chandra

  • Dynamically Pass sql query in Database adapter

    hi',
    How can we dynamically pass sql query in Database adapter, is there any way, I am using SOA 11G.
    Thanks
    Yatan

    Hi,
    Tried that too. No luck. Gives me this.
    The selected operation process could not be invoked.
    An exception occured while invoking the webservice operation. Please see logs for more details.
    oracle.sysman.emSDK.webservices.wsdlapi.SoapTestException: Exception occured when binding was invoked.
    Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'selectUsingIn' failed due to: Pure SQL Exception.
    Pure SQL Execute of select interface_id, property_name, property_value from ( (?) ) failed.
    Caused by java.sql.SQLSyntaxErrorException: ORA-00903: invalid table name
    The invoked JCA adapter raised a resource exception.
    Please examine the above error message carefully to determine a resolution.
    Regards,
    Neeraj Sehgal

  • Sql queries - slow database

    hi all,
    is there a general but specific way to generate a list of sql queries that are consuming most resources and resulting in slow database performance?
    thanks.

    There are very few ways in this world that are "general but specific".
    You can use "general" tools like StatsPack and AWR.
    You can write "general" queries on V$SQL, V$SQLAREA, V$SQLSTATS.
    You can use "specific" methods like Tracing.
    You can use "specific" methods like Client side (or Application Server side) Logs.

  • Storing SQL queries in database itself.

    I want to store SQL queries in 9i database itself so that I just need to pass the parameters from VB.NET front end and the query will execute. How can I do this?

    Possibly make use of Stored packages/procedures/functions?
    Back in 97/98 I had worked with VB (version 6 at that time) application for which I had written stored procedures to do exactly that... (except for select) VB application would pass parameter values to these procedures for doing inserts/updates/deletes. No application user was given direct insert/update/delete privileges.
    Also I had triggers written for each of the table involved to keep footprint (user id and date/time) for last update/insert for each of the row.
    I don't remember for sure if the application deleted rows from the DB. I think the application handled delete by actually updating a flag (active/inactive) again with a foot print so that you can track back the "deletes".
    my 1/2 cent worth of thought
    Message was edited by:
    user551318

  • Logging SQL parameters in Database Adapter??

    Hi there!!
    We'd like to be able to log all the parameters that are used in a SQL operation in Database Adapters. So far, we've been able to log the query with '?' instead of the real parameters. For example: select t.* from tsupcontact t WHERE t.idsupplier = ? AND t.idproject IS NULL AND (t.iduser = ? OR ? IS NULL)
    But we need to be able to see the actual parameters that are passed to the query (we're having some trouble with the database adapters and we need to see what's really going on the database).
    Any ideas? Thanks in advance!!

    You need to edit the the aslbdebug.xml file in ./user_projects/domains/<your domain>. Then go into the weblogic console and change the levels to debug. You will get lots of debugging. Below are the settings in my file.
    <java:sb-debug-logger xmlns:java="java:com.bea.wli.debug">
    <java:alsb-stages-transform-runtime-debug>true</java:alsb-stages-transform-runtime-debug>
    <java:alsb-alert-manager-debug>false</java:alsb-alert-manager-debug>
    <java:alsb-credential-debug>false</java:alsb-credential-debug>
    <java:alsb-jms-reporting-provider-debug>false</java:alsb-jms-reporting-provider-debug>
    <java:alsb-management-credential-debug>false</java:alsb-management-credential-debug>
    <java:alsb-management-dashboard-debug>false</java:alsb-management-dashboard-debug>
    <java:alsb-management-debug>false</java:alsb-management-debug>
    <java:alsb-management-user-mgt-debug>false</java:alsb-management-user-mgt-debug>
    <java:alsb-module-debug>true</java:alsb-module-debug>
    <java:alsb-monitoring-aggregator-debug>false</java:alsb-monitoring-aggregator-debug>
    <java:alsb-monitoring-debug>false</java:alsb-monitoring-debug>
    <java:alsb-pipeline-debug>true</java:alsb-pipeline-debug>
    <java:alsb-security-wss-debug>false</java:alsb-security-wss-debug>
    <java:alsb-service-account-manager-debug>false</java:alsb-service-account-manager-debug>
    <java:alsb-service-provider-manager-debug>false</java:alsb-service-provider-manager-debug>
    <java:alsb-service-repository-debug>false</java:alsb-service-repository-debug>
    <java:alsb-service-security-manager-debug>false</java:alsb-service-security-manager-debug>
    <java:alsb-service-validation-debug>false</java:alsb-service-validation-debug>
    <java:alsb-test-console-debug>true</java:alsb-test-console-debug>
    <java:alsb-transports-debug>true</java:alsb-transports-debug>
    <java:alsb-uddi-debug>true</java:alsb-uddi-debug>
    <java:alsb-wsdl-repository-debug>false</java:alsb-wsdl-repository-debug>
    <java:alsb-wspolicy-repository-debug>false</java:alsb-wspolicy-repository-debug>
    <java:alsb-security-encryption-debug>false</java:alsb-security-encryption-debug>
    <java:alsb-security-module-debug>false</java:alsb-security-module-debug>
    <java:alsb-sources-debug>false</java:alsb-sources-debug>
    <java:alsb-custom-resource-debug>true</java:alsb-custom-resource-debug>
    <java:alsb-mqconnection-debug>false</java:alsb-mqconnection-debug>
    <java:alsb-throttling-debug>false</java:alsb-throttling-debug>
    <java:alsb-flow-resource-debug>false</java:alsb-flow-resource-debug>
    <java:alsb-flow-transport-debug>false</java:alsb-flow-transport-debug>
    <java:alsb-flow-deployment-debug>false</java:alsb-flow-deployment-debug>
    <java:alsb-debugger-debug>true</java:alsb-debugger-debug>
    </java:sb-debug-logger>

  • Queries regarding Database adapter ...

    Hello,
    I have a scenario where i need to query few tables which are not related to each other and i am having different queries for each table. I tried creating a single DB adapter and imported all the tables in it. But i got struck at two places where i was asked to define a root table and also to define a select query.
    I have following doubts reagrding this:
    1. Do i need to need create different DB adapter for each table?
    2. What is the significance of root db table?
    Regards
    Lokesh

    Yes, you would create 3 different partner links using the DB adapter.
    In theory yes you would create a new partner link using the DB adapter for each table that is unrelated. If you want to select PO_HEADERS_ALL and PO_LINES, this can be done in one call as they are related.
    This advice is based on the fact that you are selecting batch data, not single lines of data. If you are receiving 1 row from multiple unrelated table this could be achieved via a custome procedure / package. I don't want to steer you down the wrong path so I would need to know more of your use case. In most senerios in Oracle apps you are calling APIs / packages.
    If you could provide more information of your use case(s) I will try and provide better advice
    cheers
    James

  • It there a way to enable debugging to view SQL details for database adapter

    The adapter guide seems to allude to the possibility with the following statement:
    "To monitor performance, you can enable debug logging and then watch the SQL for various inputs."
    There is no information, however, to indicate how to enable this feature. It would be nice to be able to view details in domain.log.
    Thanks,
    RM

    The switch to tab feature is only available when you are typing in the Location (a.k.a. Awesome) bar. Clicking on a bookmark will always open the bookmarked page in either the current tab or a new tab.

  • How to use database control to execute sql queries which change at run time

    Hi all,
    I need to execute sql queries using database controls , where the sql changes
    at run time
    based on some condition. For eg. based on the condition , I can add some where
    condition.
    Eg. sql = select id,name from emp where id = ?.
    based on some condition , I can add the following condition .
    and location = ?.
    Have anybody had this kind of situation.
    thanks,
    sathish

    From the perspective of the database control, you've got two options:
    1) use the sql: keyword to do parameter substitution. Your observation
    about {foo} style sbustitution is correct -- this is like using a
    PreparedStatement. To do substitution into the rest of the SQL
    statement, you can use the {sql: foo} substitution syntax which was
    undocumented in GA but is documented in SP2. Then, you can build up
    the filter clause String yourself in a JPF / JWS / etc and pass it into
    the DB control.
    For example:
    * @jc:sql statement="select * from product {sql: filter}"
    public Product[] getProducts(String filter) throws SQLException;
    This will substitute the String filter directly into the statement that
    is executed. The filter string could be null, "", "WHERE ID=12345", etc.
    2) you can use the DatabaseFilter object to build up a set of custom
    sorts and filters and pass that object into the DB control method.
    There have been other posts here about doing this, look for the subject
    "DatabaseFilter example".
    Hope that helps...
    Eddie
    Dan Hayes wrote:
    "Sathish Venkatesan" <[email protected]> wrote:
    Hi Maruthi,
    The parameter substituion , I guess is used like setting the values for
    prepared
    statements.
    What I'm trying to do , is change the sql at run time based on some condition.
    For example ,
    consider the following query :
    select col1,col2 from table t where t.col3 > 1
    At run time , based on some condition , I need to add one more and condition.
    i.e. select col1,col2 from table t where t.col3 > 1 and t.col4 < 10.
    This MAY not address your issue but if you are trying to add "optional" parameters
    you may try including ALL the possible parameters in the SQL but send in null
    for those params that you don't want to filter on in any particular case. Then,
    if you word your query
    as follows:
    select col1, col2 from table t where t.col3 > 1 and (t.col4 = {col4param} or
    {col4param} is null) and (t.col5 = {col5param} or {col5param} is null) ...
    you will get "dynamic" filters. In other words, col4 and col5 will only be
    filtered if you send in non-null parameters for those arguments.
    I have not tried this in a WL Workshop database control but I've used
    this strategy dozens of times in stored procedures or jdbc prepared statements.
    Good luck,
    Dan

  • Can sql statement be passed as input to Database Adapter?

    Hi,
    We have requirement to execute the sql statements using database adapter.
    Pls let me know if it is feasible in BPEL using partnerlink copy operation of assign activity like we do for setting JNDI name dynamically.
    Thanks ,
    Dhanumjay

    Oracle Enterprise Manager provide Change Management capabilities, we do not at this stage plan to provide this capability within SQL Developer.
    See here [http://www.oracle.com/technology/products/oracle9i/datasheets/oem_change_management/9iR2_DS_EMCMPck.html] for more on Change Management within OEM.
    Regards
    Sue

  • 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!!

  • Java.sql.SQLException: Invalid column index in database adapter

    I have a query that works fine if I run the sql in a JDeveloper SQL editor, but I get a "java.sql.SQLException: Invalid column index" error if I paste it in a database adapter. If I put this query in the adapter:
    select <column>
      from <table>
       where <column> in (select
        trim( substr (txt,
              instr (txt, ',', 1, level  ) + 1,
              instr (txt, ',', 1, level+1)
                 - instr (txt, ',', 1, level) -1 ) )
          as token
        from (select ','||#bindVariable||',' txt
                from dual)
      connect by level <=
         length(#bindVariable)-length(replace(#bindVariable,',',''))+1)I get the error. But if I just put the sub query in the adapter as:
    select
        trim( substr (txt,
              instr (txt, ',', 1, level  ) + 1,
              instr (txt, ',', 1, level+1)
                 - instr (txt, ',', 1, level) -1 ) )
          as token
        from (select ','||#bindVariable||',' txt
                from dual)
      connect by level <=
         length(#bindVariable)-length(replace(#bindVariable,',',''))+1the error goes away. Does anyone know what might be causing this?
    Thanks in advance

    Hi,
    Could you please make sure your binding style(Oracle Positional,Oracle named..etc) of the Seeded VO and Custom Vo are same.
    This is the option you will get when you are extending your vo. So make sure that both are same.
    You can refer the below link too
    VO extension leads to "Invalid column index" exception
    Thanks
    Bharat

  • Database Adapter and SQL Server procedure issue

    Hello,
    I am using Jdev 11.1.1.7.0 and SQL Server 2005.
    In the Database Adapter configuration wizard, Specify Stored Procedure step, I choose the “GEACupax” schema and got the following error after a click on “Procedure Browse” button:
    com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'GEACUPAX.INFORMATION_SCHEMA.SCHEMATA'.
    The command Database Adapter tried to execute was:
    (from jdev log:) select schema_name from GEACUPAX.INFORMATION_SCHEMA.SCHEMATA order by schema_name;
    Note, the schema name has changed to uppercase. I think that is the problem. If I try this query in SQLDeveloper, it returns the same error. I can fix it changing the schema name to “GEACupax”. The case matters.
    Any ideas?
    Leandro.

    Vijay,
    Thanks for you reply.
    I figure out a related bug:
    Bug 12859472: Cannot browse store procedure in case-sensitive MS SQL Database
    There are two possible workarounds:
    1. Use a database name with capital letters
    2. Do not use stored procedures, but access the tables directly.
    The notes on the Bug ticket describes that the issue would be scheduled to be fixed in PS7 which is 11.1.1.8.
    Cheers!
    Leandro.

  • Database Adapter Configuration Execute Pure SQL

    Hii
    I have following scenario in my Project.
    I have ERRORCODE Details Table in Database which has following columns.
    1)ERRORCODE VARCHAR2
    2)PRIORITY VARCHAR2
    3)QueueName Varchar2
    I have one web service which takes errorcode as input parameter of string type in which i have to pass values like 1,2,3.
    Web service treated these values as complete one string value but i want it should be treated like seperately.Beacuse i have to pass these values to the query.
    I have configured database adapter for the following query using Execute Pure SQL.
    SELECT DISTINCT QueueName FROM ErrorCodeDetails where priority= (select min (priority) from ErrorCodeDetails where ErrorCode In(#ERRORCODE))
    So can anyone please help me what changes i have to make in this query so the sql query treat the errorcode string value as three different value rather than one single value??
    Thanks in advance.
    Regards,
    Priyanka

    Change the query like this.
    SELECT DISTINCT QueueName FROM ErrorCodeDetails where priority= (select min (priority) from ErrorCodeDetails where ErrorCode In(select csv from xmltable(#ERRORCODE)))
    In case it is required to treat the individual comma separated values in #ERRORCODE as number use the to_number function.
    SELECT DISTINCT QueueName FROM ErrorCodeDetails where priority= (select min (priority) from ErrorCodeDetails where ErrorCode In(select to_number(csv) from xmltable(#ERRORCODE)))
    In case this helps , please mark the answer as correct/helpful.
    Regards.

  • How to see what SQL queries are made to my Database Server?

    Hi all,
    I'm a newbie. I'd like to know if there's a way to find out what SQL queries are being made to my Database server at the server end.
    Is it possible that Oracle Database Manager logs this information (including the exact query/SQL)somewhere in its logs? How to enable such an option and/or view the recent SQL queries made ?
    Please enlighten me. Thanks in advance.
    Thanks and Regards
    Sharat

    "I checked the V$SQLTEXT view too. It has only 64 characters for SQL_TEXT field." Yes yes but you might have noticed that it also has the column called piece. The view shows the full SQL statement broken up into little pieces. Use ADDRESS and HASH_VALUE to link to v$sql. There is also a view V$SQLTEXT_WITH_NEWLINES that throws in some line separators to make it "easier" to read.
    Example below shows full text of SQL statements currently executing.
    SQL> column address noprint
    SQL> column hash_value noprint
    SQL> break on hash_value skip 1
    SQL> select
      2     a.address, a.hash_value, b.sql_text
      3  from
      4     v$sql a, v$sqltext b
      5  where
      6     a.users_executing > 0
      7     and b.address = a.address
      8     and b.hash_value = a.hash_value
      9  order by
    10     a.address, a.hash_value, b.piece ;
    SQL_TEXT
    select    a.address, a.hash_value, b.sql_text from    v$sql a, v
    $sqltext b where    a.users_executing > 0    and b.address = a.a
    ddress    and b.hash_value = a.hash_value order by    a.address,
    a.hash_value, b.piece
    begin quest_exec.get_message(:cmd, :peer, :owner, :folder, :scri
    pt, :delay); end;
    6 ligne(s) s&eacute;lectionn&eacute;e(s).
    SQL> select
      2     a.address, a.hash_value, b.sql_text
      3  from
      4     v$sql a, v$sqltext_with_newlines b
      5  where
      6     a.users_executing > 0
      7     and b.address = a.address
      8     and b.hash_value = a.hash_value
      9  order by
    10     a.address, a.hash_value, b.piece ;
    SQL_TEXT
    select
       a.address, a.hash_value, b.sql_text
    from
       v$sql a, v
    $sqltext_with_newlines b
    where
       a.users_executing > 0
       and b
    .address = a.address
       and b.hash_value = a.hash_value
    order by
       a.address, a.hash_value, b.piece
    begin quest_exec.get_message(:cmd, :peer, :owner, :folder, :scri
    pt, :delay); end;
    6 ligne(s) s&eacute;lectionn&eacute;e(s).

Maybe you are looking for

  • Acrobat Pro 7.0 Crashes while adding page links

    My client has supplied a 238 page Acrobat document. They would like me to add page links to the Table of Contents page for each chapter. When I try to set the page links Acrobat shuts down for not apparent reason. I've tried on my MacBook Pro running

  • Crystal Reports Slow on BOXI 3.1 Universes

    Our Universes are extremely slow in returning results (Crystal Reports). Some Facts: Data Warehouse tables Oracle, 26 million rows, indexed by fiscal year. Report parameters include Fiscal year and Accounting Month. We watched the SQL from the Oracle

  • Pos1, side up, side down doesn´t work

    when activating Extras --> settings --> advanced --> allow marking of text the buttons pos1 page up / down are not activated. == This happened == Every time Firefox opened == Extras --> settings --> advanced --> allow marking of text

  • Stop FAX automatically to vendor

    Please let me know how to stop sending fax automatically to the vendor for a scheduling agreement.

  • Display webpage in Flash Professional

    I was wondering is there an easy to display a web page in flash professional?