Kodo 3.4.1: how to limit # of sql query params when using collection param

Hi,
We have a problem when using Kodo 3.4.1 against SQL Server 2005, when we execute query:
          Query query = pm.newQuery( extent, "IdList.contains( this )" );
          query.declareParameters( "Collection IdList" );
          query.declareImports( "import java.util.Collection;" );
          return (List) query.execute( list );
We got:
com.microsoft.sqlserver.jdbc.SQLServerException: The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Too many parameters were provided in this RPC request. The maximum is 2100.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(Unknown Source)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(Unknown Source)
at com.solarmetric.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:354)
at com.solarmetric.jdbc.PoolConnection$PoolPreparedStatement.executeQuery(PoolConnection.java:341)
at com.solarmetric.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:352)
at com.solarmetric.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeQuery(LoggingConnectionDecorator.java:1106)
at com.solarmetric.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:352)
at kodo.jdbc.runtime.JDBCStoreManager$CancelPreparedStatement.executeQuery(JDBCStoreManager.java:1730)
at com.solarmetric.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:339)
at kodo.jdbc.sql.Select.execute(Select.java:1581)
at kodo.jdbc.sql.Select.execute(Select.java:1533)
at kodo.jdbc.runtime.SelectResultObjectProvider.open(SelectResultObjectProvider.java:102)
at com.solarmetric.rop.EagerResultList.<init>(EagerResultList.java:22)
at kodo.query.AbstractQuery.execute(AbstractQuery.java:1081)
at kodo.query.AbstractQuery.executeWithArray(AbstractQuery.java:836)
at kodo.query.AbstractQuery.execute(AbstractQuery.java:799)
It seems that there're too many ids in the list, and Kodo didn't limit the # of sql parameters when craft the sql query. Is there a way to ask Kodo to use multiple queries with smaller # of sql parameters instead of using one big sql query?
Thanks

Hi,
Sadly, there is no way to do that in Kodo currently. The closest is the inClauseLimit DBDictionary setting, but that setting just breaks things up into multiple IN statements put together with an OR clause. In your case, it looks like the network transport, not the SQL parser, is complaining about size limits.
You could force the query to run in-memory, but that would probably be prohibitively slow, unless the data set that you're querying against is relatively small.
-Patrick

Similar Messages

  • How to retrieve generated sql query from interface using groovy

    Hi All,
    I'm new to odi and i need the generated sql query code from the interface using groovy.

    Hi All,
    I'm new to odi and i need the generated sql query code from the interface using groovy.

  • How to get physical SQL query

    Hi All,
    How to get the physical SQL query for the OBIEE reports.
    Thanks in advance,
    Haree.

    Hi Anitha,
    Thanks for your reply,
    I am getting XML script in log file. (Settings > Administration > Manage Sessions > View Log).
    How to get physical SQL query ?
    Thanks,
    Haree

  • How to tune past SQL query??

    Hi Team,
    Straight to issue --> I am seeing an query running for long time. When i begun to trace that particular query it got over by the time and now how to trace that specific SID and QUERY..
    I am working on 10.2.0.4 version DB..
    How to trace an sql query after its execution?? pls provide steps how to begin with..
    regards
    dkoracle

    dkoracle wrote:
    Hi Team,
    Straight to issue --> I am seeing an query running for long time. When i begun to trace that particular query it got over by the time and now how to trace that specific SID and QUERY..
    I am working on 10.2.0.4 version DB..
    How to trace an sql query after its execution?? pls provide steps how to begin with..Can not be done.
    ALTER SESSION SET SQL_TRACE=TRUE;
    -- run query again

  • How to view the sql query?

    hi,
      how to view the sql query formed from the xml structure in the receiver jdbc?

    You can view SAP Note at
    http://service.sap.com/notes
    But you require SMP login ID for this which you should get from your company. The content of the notes are as follows:
    Reason and Prerequisites
    You are looking for additional parameter settings. There are two possible reasons why a feature is available via the "additional parameters" table in the "advanced mode" section of the configuration, but not as documented parameter in the configuration UI itself:
    Category 1: The parameter has been introduced for a patch or a SP upgrade where no UI upgrade and/or documentation upgrade was possible. In this case, the parameter will be moved to the UI and the documentation as soon as possible. The parameter in the "additional parameters" table will be deprecated after this move, but still be working. The parameter belongs to the supported adapter functionality and can be used in all, also productive, scenarios.
    Category 2. The parameter has been introduced for testing purposes, proof-of-concept scenarios, as workaround or as pre-released functionality. In this case, the parameter may or may not be moved to the UI and documentation, and the functionality may be changed, replaced or removed. For this parameter category there is no guaranteed support and usage in productive scenarios is not supported.
    When you want to use a parameter documented here, please be aware to which category it belongs!
    Solution
    The following list shows all available parameters of category 1 or 2. Please note:
    Parameter names are always case-sensitive! Parameter values may be case-sensitive, this is documented for each parameter.
    Parameter names and values as documented below must be used always without quotaton marks ("), if not explicitly stated otherwise.
    The default value of a parameter is always chosen that it does not change the standard functionality
    JDBC Receiver Adapter Parameters
    1. Parameter name: "logSQLStatement"
                  Parameter type: boolean
                  Parameter value: true for any string value, false only for empty string
                  Parameter value default: false (empty String)
                  Available with: SP9
                  Category: 2
                  Description:
                  When implementing a scenario with the JDBC receiver adapter, it may be helpful to see which SQL statement is generated by the JDBC adapter from the XI message content for error analysis. Before SP9, this can only be found in the trace of the JDBC adapter if trace level DEBUG is activated. With SP9, the generated SQL statement will be shown in the details page (audit protocol) of the message monitor for each message directly.
                  This should be used only during the test phase and not in productive scenarios.
    Regards,
    Prateek

  • How to write a SQL query in SAP B1 2007 B with input parameters?

    How to write a SQL query in SAP B1 2007 B with input parameters, on execution of which will ask for some input value from the user and the values will be selected from a list such as item list?

    The syntax like
    SELECT * FROM OITM T0 WHERE T0.ItemCode = '[%0\]'
    Thanks,
    Gordon

  • How to execute an SQL query present in a string inside an ABAP program?

    hello,
    How to execute an SQL query present in a string inside an ABAP program

    Raut,
    You can execute Native SQl statements.
    Ex: To use a Native SQL statement, you must precede it with the EXEC SQL statement, and follow it with the ENDEXEC statement as follows:
    EXEC SQL [PERFORMING <form>].
      <Native SQL statement>
    ENDEXEC.
    There is no period after Native SQL statements. Furthermore, using inverted commas (") or an asterisk (*) at the beginning of a line in a native SQL statement does not introduce a comment as it would in normal ABAP syntax. You need to know whether table and field names are case-sensitive in your chosen database.
    In Native SQL statements, the data is transported between the database table and the ABAP program using host variables. These are declared in the ABAP program, and preceded in the Native SQL statement by a colon (:). You can use elementary structures as host variables. Exceptionally, structures in an INTO clause are treated as though all of their fields were listed individually.
    If the selection in a Native SQL SELECT statement is a table, you can pass it to ABAP line by line using the PERFORMING addition. The program calls a subroutine <form> for each line read. You can process the data further within the subroutine.
    As in Open SQL, after the ENDEXEC statement, SY-DBCNT contains the number of lines processed. In nearly all cases, SY-SUBRC contains the value 0 after the ENDEXEC statement. Cursor operations form an exception: After FETCH, SY-SUBRC is 4 if no more records could be read. This also applies when you read a result set using EXEC SQL PERFORMING.
    EXEC SQL PERFORMING loop_output.
      SELECT connid, cityfrom, cityto
      INTO   :wa
      FROM   spfli
      WHERE  carrid = :c1
    ENDEXEC.
    Pls. Mark If useful

  • How to execute this SQL Query in ABAP Program.

    Hi,
    I have a string which is the SQL Query.
    How to execute this sql Query (SQL_STR) in ABAP Program.
    Code:-
    DATA: SQL_STR type string.
    SQL_STR = 'select * from spfli.'.
    Thanks in Advance,
    Vinay

    Hi Vinay
    Here is a sample to dynamically generate a subroutine-pool having your SQL and calling it.
    REPORT dynamic_sql_example .
    DATA: BEGIN OF gt_itab OCCURS 1 ,
    line(80) TYPE c ,
    END OF gt_itab .
    DATA gt_restab TYPE .... .
    DATA gv_name(30) TYPE c .
    DATA gv_err(120) TYPE c .
    START-OF-SELECTION .
    gt_itab-line = 'REPORT generated_sql .' .
    APPEND gt_itab .
    gt_itab-line = 'FORM exec_sql CHANGING et_table . ' .
    APPEND gt_itab .
    gt_itab-line = SQL_STR .
    APPEND gt_itab .
    gt_itab-line = 'ENDFORM.' .
    APPEND gt_itab .
    GENERATE SUBROUTINE POOL gt_itab NAME gv_name MESSAGE gv_err .
    PERFORM exec_sql IN PROGRAM (gv_name) CHANGING gt_restab
    IF FOUND .
    WRITE:/ gv_err .
    LOOP AT gt_result .
    WRITE:/ .... .
    ENDLOOP .
    *--Serdar

  • How Can I find SQL Query in Database

    Dear Experts,
    How Can I find SQL Query in Database.

    Hi,
    U mena what query got executed in db? u can try V$SQL for it.
    Regards
    Bharath

  • How to transfer range parameter from vb when using bapi calling

    Hi,everyone.how to transfer range parameter from vb when using BAPI calling?

    Did you get the solution to your problem?  Can you please share it with me. I have a similar problem. I have a VB program that calls RFC function. It works with a single parameter but not with a range of parameters. If you have the solution, could you please share sample codes with me? Thank you so much.

  • Limit the Oracle query run time using Pro*C

    All,
    I would like to limit my sql query for say a duration of only 10-15 secs. I do not want to kill the oracle process but send a signal to the C program with some message that " its taking more time"
    Is there an param which I can use it to limit, without killing or shutting down the oracle session or process.
    Thanks in advance

    My answer is only for 1. problem (about ORA-01458)
    I think that you use declaration for cursor C0 with a varchar
    variable before you ininitialize length (member .len of varchar
    structure) of this variable.
    It's famous that many errors come from uninitialized varchar
    variables in Pro*C.

  • How can I show additional tab rows when using many open tabs?

    How can I show additional tab rows when using many open tabs?

    What method (code) did you use to get the Tab bar displaying in the space used for the Navigation Toolbar (location bar)?
    The Tab bar should be displayed above the Navigation Toolbar.
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe Mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • How do images embeded in InDesign link when using Creative Cloud on more than two desktops?

    How do images embeded in InDesign link when using Creative Cloud on more than two desktops?

    If I am understanding your question correctly, you shouldn't have to worry about embedded images in InDesign. Once embedded, the image is stored within the file.
    If you are wondering about linked images... InDesign will follow the path on your computer and, if it does not find the image, you will recieve a notification. Edit: To prevent this, I would suggest packaging your file using File > Package... This will create a folder with all of your fonts and linked graphics so that you need not worry about broken links.  I just remembered that you cannot upload folders directly to Creative Cloud so a packaged folder wouldn't be very helpful unless you wanted to upload each file manually.
    The best solution I see right now is to either embed the graphics in the document, or upload the images with your document to relink.
    I hope this helped,
    Michael

  • How do you update the Bios safely when using onboard RAID mirror? Z87-G45

    How do you update the Bios safely when using onboard RAID with Z87-G45?   I'm using a simple two drive, RAID 1 mirror setup.
    I'm currently at bios 1.4, and want to move up.  However, last time I upgraded the BIOS, the machine rebooted with improper settings for the RAID (they get hosed during BIOS flash) and Windows decided to auto-repair the only boot drive it could see, one half of the mirror, because it couldn't see the RAID array correctly and *POOF*  bare-metal reinstall required.   
    My PC will not let me press the DEL key on bootup to access the bios, even with MSI Fast Boot not installed.  It just ignores the DEL key and tries to load windows which, if that happens, will flame-out my RAID array after a bios flash if I can't catch it to enable the RAID first before windows loads.
    I do not want to rebuild my PC again simply because I do a BIOS update.

    FYI: BIOS 1.4 & 1.8 are using the same RAID version: 12.7.0.1936
    based on this RAID surprise should not hapends.
    But as pandaz says if you have no issues, leave bios update alone.
    there are still risks something to messed up,
    best do a backup of your data just in case if you want to try latest version

  • How to limit the search scope in single site collection for SP2013?

    On our SP2013 farm, there is one web application and 4 site collections under it. At the beginning I was trying to setup 4 different "Content Sources" but Sharepoint warn me that I can only setup 1 source per web application.
    I don't want user search at site collection A get search result from B, C and D. Also I like to use continuous crawling. What is the best practice to achieve? Thanks.

    Hi,
    Please check this links
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/615edaa8-f522-4496-a57e-9681d83b0ac3/how-to-create-content-type-search-scope-depending-on-each-site-collection?forum=sharepointdevelopmentprevious
    http://sadomovalex.blogspot.in/2013/08/how-to-limit-search-results-to-current.html
    Please remember to click 'Mark as Answer' on the answer if it helps you

Maybe you are looking for

  • Why does my home wifi not work with my apple products

    my computer, ipad, and ipod all say that when i connect to my house wifi there is no internet connection yet when i try to connect my xbox and galaxy phone the wifi works just fine i called the wireless company and they told me that the router is wor

  • [SOLVED] some errors in logs

    I get some errors in the log file /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/rdbms/log/alert_XE.log Cannot determine all dependent dynamic libraries for /proc/self/exe Unable to find dynamic library libocr10.so in search paths RPATH = /ade/a

  • My computer stops !

    My 2. computer stops when I try and run Windows 10. My computer is elderly but with a 3 Gigaherz Intel processor. Can it be this explanation ?: For 64-bit installations of Technical Preview for Enterprise, a small number of older PCs may be blocked f

  • My firefox (Windows 7) doesn't let print preview work.

    Today, Firefox won't let me use Print Preview. I get a pop-up notice that says Print Preview is preparing ... . Then, it times-out. This is the first time this has happened. It has always worked right away. The message also says something about Firef

  • Can i make an alias of an iPhoto Library folder?

    so i've decided that i'm going to try and tinker with Bridge that comes with Photoshop Elements, but of course, I can't access my pictures from iPhoto in Bridge. I just need to play with both iPhoto and Bridge to see which will work out better for me