Stored Procedure row limit in MII

Hi,
We've a transaction that reads data from an Excel sheet and inserts those records in DB by calling a procedure. The application works fine if the rows in Excel is limited to 49. However, if the no. of rows exceed 49, then it doesn't work. On calling the procedure in MII with more than 49 rows of data, MII only returns the first 49 rows.
We have set the row count in MII to 10000.
Any inputs?
Regards
Rajeev

Artificially increasing RowCount isn't the answer, especially if aspects in the code need to preallocate memory for resultsets, etc.  In a sense this is why all queries contain the RowCount parameter - to not have unbounded requests (if I'm not mistaken there is also a safety cap override in the code).  Once you've issued an infinite/unbound query to a database, closing the browser will not stop this from continuing to process.
If you are using something like an SQL stored procedure, then issuing SET ROWCOUNT 0 at the beginning of the procedure will allow sub selects and joins to not fall subject to the RowCount of the query, which like was mentioned, is there more appropriately for the returned resultset.  Of course - this should be used with discretion.

Similar Messages

  • Problem Calling MaxDB stored procedure with output from MII Query template

    Hi,
    I am using Max DB Database studio to write stored procedure, I am calling stored procedure from MII Query using CALL statement.
    Can anyone guide me how to pass output values of stored procedure.
    Examlpe::
    call ProcName('[Param.1]','[Param.2]','[Param.3]','[Param.4]','[Param.5]', :isSuccess, :Trace)
    In the above line of code I am not able to get the output values of stored procedure that is isSuccess and Trace values in Query template when executed. But same thing I get when executed in Database studio.
    How do I call with outputs for any stored procedure in MII.
    Any help would be appriciated.
    Thanks,
    Padma

    My call statement is like this
    call RESULTDATA_INSERT('[Param.1]','[Param.2]','[Param.3]', :isSuccess, :Trace)
    I am able to insert record in DB, But I am not getting output values in Query template.I have done this in Fixed Query, when I execute it throws me "Fatal error as Loaded content empty".
    I tried giving select below call but it dont work.
    Regards,
    Rao

  • How to limit the response rows while invoking a stored procedure from OSB 10gR3

    Dear Experts,
    I am trying to limit the response while invoking a stored procedure from OSB via DB adapter.
    Here the stored procedure returns cursors as response. I tried using the MaxTransactionSize propertiy (which is used for polling the database option in DB adapter).
    We are investigating the ways to protect the application from response containing huge number of rows.
    Is there any way to restrict the number of rows returned in each and every cursor while invoking the stored procedure via DB adapter?
    Thanks
    Ram

    Hi James ,
    I want to know how to run stored procedure using jca adapter in OSB11g.
    I am new to stored prcoedure,will be great if you could share some example on it as above.
    Req: Single input xml will be posted on queue ,need to perform 3 DB operation (with same input):
    1.Insert operation to insert master table contents.
    2.select the primary key column value from master table for the last inserted record.
    3.Need to insert primary key column value + other fields frm same xml file to child table.
    Pls assist me on how to create a simple stored procedure and to run the same with OSB 11g.I am familiar with creation of DB adapter using Jdeveloper,we have option to perform insert and to call stored procedure here,will it be useful for this scenario?
    Edited by: Anitha R on Nov 21, 2010 9:30 PM

  • Stored Procedure fails to return all rows of data.

    Our HR database uses a procedure to build a list of employee IDs (ie. 1,3,14,...1210,1215) then calls a procedure to with a variable to extract details per employee. Unfortunately the list is 947 ids, however only 887 rows are returned.
    As a test I split the list in two and called the procedure. If I add the data rows together I get 947, hence I know the employees are valid. Can anyone suggest why a long list of Ids should fail? Is there a limit a stored procedure can return?
    The procedure (simplified down a bit) is:
    ALTER PROCEDURE [dbo].[sp_Employee_CreateTable]
     @EmpIds varchar(4000)
    AS
    SELECT    E.empid as EmpId ,E.Surname
        FROM    Employee E
        WHERE  (E.[EmpID] IN (select * from GetAllUsersUnderManager(@EmpIds))) AND EJ.id=dbo.GetCurrentEmployeeJobRecord(EJ.empid)--EJ.dateto IS NULL
    I can run the procedure as:
    "exec sp_Employee_CreateTable @EmpIds=N'1,3,14.....999'" which returns (say) 700 rows  and  "exec sp_Employee_CreateTable @EmpIds=N'1001,.....1215'" which returns 247 rows. (ie. 700+247 = 947 which is correct.
    But exec sp_Employee_CreateTable @EmpIds=N'1,3,14......1215' only returns 887 rows.
    I have looked at the length of the data passed to the procedure (1,3,...1215) which equals 4126 chars, therefore I bumped the varchar space from 4,000 to 6,000 which is still within limits, however the number of rows returned was still 887.
    Any help would be gratefully received.

    Hi Scott. I run the script you suggested (thank you), the var EmpIds was set to a string with over 930 ids. The returned data set started with 0 but only had 888 rows. As mentioned above I refer the 930+ list as full list, and the 888 as the short list.
    The difference (around 47) were the last values in the full list.
    Although EmpIds was set to 6K it definately seems like it gets to around 4K chars then ignores any other values.
    Re "since you pass....". Absolutely. I have modified the Employee_CreateTable with the var update to 6K/
    ALTER PROCEDURE [dbo].[sp_Employee_CreateTable]
     @EmpIds varchar(6000),
     @IncludeLeavers Bit
    AS
        SELECT    E.empid as EmpId ,E.Surname, E.Firstname as Forename,E.PayrollID, E.intextno as Extension, EJ.position as Position, [dbo].[GetEmployeeDepartment](E.empid) as Department, [dbo].[GetEmployeeLocation](E.empid) as Location,
    E.title as Title, EJ.ReportsTo,
                CoEmail,E.[left]
        FROM    Employee E INNER JOIN EmployeeJobs EJ
        ON        E.empid = EJ.empid
        WHERE  (E.[EmpID] IN (select * from GetAllUsersUnderManager(@EmpIds))) AND EJ.id=dbo.GetCurrentEmployeeJobRecord(EJ.empid)--EJ.dateto IS NULL
                AND (E.[left]=0 or E.[left]=@IncludeLeavers)
        ORDER BY E.Surname, E.Firstname, E.empid

  • Retruring Multiple rows from a Stored Procedure

    The Oracle JDBC documentation shows how to return a cursor pointer through the parameter list of a stored procedure allowing a Java program to use the cursor like a normal result set. I've tried it (using the thin driver) and it works fine - however, I'm having trouble getting this to work running the program under a Weblogic server (using their own JDBC implementation). So, I have two questions:
    1) Has anyone had this problem before and solved it ??
    2) Are there any other techniques for getting multiple rows back from the database without having to fire "raw" sql at it ?

    Hi
    You could return not resultset but array, for example:
    PACKAGE TEST:
    type string_table is table of varchar2(80)
    index by binary_integer;
    function get_something (
    something1 out string_table,
    arraylength in number
    ) return number;
    PACKAGE'S BODY:
    function get_something (
    something1 out string_table,
    arraylength in number /** length of the array **/
    ) return number as
    cursor C is
    select something1, ...
    from test_table;
    pos number := 1;
    begin
    for position in C loop
    exit when (pos > arraylength);
    something1(pos) := position.something1;
    pos := pos + 1;
    end loop;
    return (pos - 1);
    end;
    Of course in this example you need to know length of your array
    (arraylength parameter), but you can avoid such problem, for
    example, by using DBMS_SQL package (or dynamic SQL feature in
    the Oracle8i).
    Andrew
    Mladen Gogala (guest) wrote:
    : Phil Hildebrand (guest) wrote:
    : : Is there a way that I can return multiple rows from a stored
    : : procedure for function ?
    : : Something like:
    : : CREATE FUNCTION sp_get_children (my_nip IN port.nip_num%
    TYPE)
    : : RETURN my_nip
    : : IS
    : : CURSOR child_cur IS
    : : SELECT nip_num
    : : FROM logical_port
    : : WHERE port_num = my_nip;
    : : child_rec child_cur%rowtype;
    : : BEGIN
    : : FOR child_rec IN child_cur
    : : LOOP
    : : RETURN my_nip;
    : : END LOOP;
    : : END tmp_sp_get_children;
    : : I know how to do it in Informix ( RETURN WITH RESUME ), but
    : I'm
    : : not running Informix ;)
    : : Thanks,
    : : Phil
    : In contrast with Informix, SQL Server and Sybase, Oracle
    : can not return a result set. the only workaround is to
    : return the cursor variable as such.
    null

  • Calling a stored procedure before row update without using triggers

    I have got two tables Main Table(Table1) and History Table(Table2), whenever an update is done on Table1 i want to insert the old row before update to Table2, so that i have history available for that record.
    My doubt is
    how to refer to old value (values b4 update) in a stored procedure?
    how to call a stored procedure b4 every row update(on the database side as we do with tiggers)?
    I want to write a stored procedure where in i will insert the old row values ( value b4 update ) to Table2.
    Any Help would be great....

    sample code calling procedure before insert:
    DriverManager.registerDriver(new someDriver);
    Connection conn = DriverManager.getConnection(driver,uname,pword);
    CallableStatement cs = conn.prepareCall("{call procedureName(?,?)}");
              cs.setString(1,userName);
              cs.registerOutParameter(2,Types.VARCHAR);
              cs.execute();
              success = cs.getString(2);
              PreparedStatement pstmt = conn.prepareStatement("insert into sometable values(?,?)");
              pstmt.setString(1,userName);
              pstmt.setString(2,password);
              pstmt.executeUpdate();     
              conn.commit();      
              cs.close();
           conn.close();

  • Returning a row of data in a stored procedure

    Please help me remember how to return a row or rows from a pl/sql query in a stored procedure.
    I am having a major brain fart.

    If want to return a resultset from stored procedures see here for an example
    http://asktom.oracle.com/~tkyte/ResultSets/index.html

  • Query against materialized view from stored procedure brings back empty row

    I have a stored procedure that runs a query against a materialized view. When I run the query outside the SP it works just fine. When I change the MV to a table name, the SP works. When I change it back to the MV i get an empty row. Any ideas? The code is below:
    PROCEDURE getAuth     (p_naid        IN  NUMBER,
                             p_scope       IN VARCHAR2,
                             o_xml_data    OUT SYS_REFCURSOR
                             ) IS
      BEGIN
        IF p_scope = 'Approved' THEN
          OPEN o_xml_data FOR
            SELECT naid,
                   p_naid,
                   auth_type,
                   xml_data
            FROM some_mv
            WHERE naid = p_naid;   
          RETURN;
          CLOSE o_xml_data;
    ... the rest of the procedure ...

    does procedure contain EXCEPTION handler?
    if so, then remove, delete & eliminate EXCEPTION handler (at least during testing & debugging)

  • Stored procedure for Total in Header from row totals

    Hi Experts,
    I have read all notes written before regarding that how can we solve that problem if we would like to display on header a rowtotal. But i cannot solve it when i need it dinamically.
    I copy the following query into SBP_SP_Transactionnotification but while im adding the document it doesnt refresh . I have to go back then i can see the row totals in my field.
    IF @object_type = '18'
    BEGIN
    UPDATE OPCH SET U_ONELT =
    (SELECT SUM(U_ONELTR) FROM DBO.PCH1 T0 WHERE T0.DOCENTRY = @list_of_cols_val_tab_del)
    WHERE DOCENTRY = @list_of_cols_val_tab_del
    END
    How shall I modify this query?
    Thanks in advance.
    Eszter

    This is the code you could use
    IF @transaction_type = 'A' AND @object_type = '18'
    BEGIN
    UPDATE OPCH SET U_ONELT =
    (SELECT SUM((T0.QUANTITYT0.PRICE)-(T0.QUANTITYT0.U_ONELTR)) FROM [DBO\].[PCH1\] T0 WHERE T0.DOCENTRY = @list_of_cols_val_tab_del)
    WHERE DOCENTRY = @list_of_cols_val_tab_del
    END
    You can access this Stored Procedure from SQL Server Management Studio......Click on Databases...Select your database...Programmability.....Stored Procedure dbo.SBO_SP_TransactionNotification...Right click....select Modify
    Copy the above code in the body ...You would probably see some thing like ADD YOUR CODE HERE....
    Once you copied this code. Click the Execute button  and you see should get the message
    Command(s) completed successfully.
    Close SQL Server and you should be good to go...
    Suda

  • Calling a stored procedure for each row returned

    I need to call a stored procedure for each row returned by a repeating frame. I called the stored procedure from the repeating frame format trigger, but that did not work( it did no populated the tables populated by the stored procedure)
    How can I call a stored procedure for each row returned by a repeating frame.
    Thank you

    Include it as a formula column in your data model.

  • Stored Procedure returning just one row

    Hi! I've a problem with a MSSQL Stored Procedure. This procedure works perfectlly if I execute it directly on MSSQL Query Analyzer. But the problem is in Java, when I call it, the resultset has just one row, and it must have 59, so I don't know what is going on. My procedure is a bit big, but please, help me :)
    This is the procedure code
    CREATE PROCEDURE desc_doctos
    @pt_gaveta varchar(250),
    @pl_idexp varchar(250),
    @pl_idcar numeric,
    @identa int
    AS
    DECLARE @id_carpeta_hija int
    DECLARE @nombre_hija varchar(500)
    DECLARE @fh_creacion datetime
    DECLARE @numero_carpetas int
    DECLARE @numero_documentos int
    DECLARE @cv_aplicacion_des varchar(100)
    DECLARE @id_gabinete_des int
    DECLARE @identa_modificado varchar(10)
    DECLARE @liga varchar(250)
    DECLARE @hora varchar(50)
    DECLARE @fecha varchar(50)
    DECLARE imx_descendencia CURSOR LOCAL FOR
    SELECT IOC.ID_CARPETA_HIJA, IOC.NOMBRE_HIJA,IC.FH_CREACION,
    convert(varchar(2),datepart(dd,IC.FH_CREACION))+'/'+convert(varchar(2),datepart(mm,IC.FH_CREACION))+'/'+convert(varchar(4),datepart(yyyy,IC.FH_CREACION)),
    convert(varchar(2),datepart(hh,IC.FH_CREACION))+':'+convert(varchar(2),datepart(mi,IC.FH_CREACION))+':'+convert(varchar(2),datepart(ss,IC.FH_CREACION)),
    IC.NUMERO_CARPETAS,IC.NUMERO_DOCUMENTOS,
    ICP.CV_APLICACION_DES,ICP.ID_GABINETE_DES
    FROM IMX_ORG_CARPETA IOC, IMX_CARPETA IC, IMX_CARPETAPUENTE ICP
    WHERE
    IOC.TITULO_APLICACION=@pt_gaveta
    AND IOC.ID_GABINETE= @pl_idexp
    AND IOC.TITULO_APLICACION = IC.TITULO_APLICACION
    AND IOC.ID_GABINETE = IC.ID_GABINETE
    AND IOC.ID_CARPETA_HIJA = IC.ID_CARPETA
    AND IOC.TITULO_APLICACION *= ICP.TITULO_APLICACION                
    AND IOC.ID_GABINETE *= ICP.ID_GABINETE
    AND IOC.ID_CARPETA_HIJA *= ICP.ID_CARPETA
    AND ID_CARPETA_PADRE= @pl_idcar;
    OPEN imx_descendencia
         FETCH NEXT FROM imx_descendencia INTO @id_carpeta_hija,@nombre_hija,@fh_creacion,@fecha,@hora,
              @numero_carpetas,@numero_documentos,@cv_aplicacion_des,@id_gabinete_des
         WHILE @@FETCH_STATUS = 0
         BEGIN
              SELECT @identa_modificado = @identa+1          
              IF (@id_gabinete_des IS NOT NULL)
              BEGIN
                   SET @liga = '../jsp/imxvisor.jsp?gaveta='+@cv_aplicacion_des+'&idExp='+convert(varchar(10),@id_gabinete_des)+'&cierre=si'     
                   BEGIN TRAN
                        --INSERT INTO IMX_ARBOL_TEMPORAL VALUES(@nombre_hija,@liga,@identa,0,'_blank','1',1,1)          
                        SELECT @nombre_hija,@liga,@identa,0,'_blank'
                        EXEC lista_doctos @pt_gaveta,@pl_idexp,@id_carpeta_hija,@identa_modificado
                   COMMIT TRAN
              END
              ELSE
              BEGIN
                   SET @liga = '../jsp/datosarbol.jsp?opcion=0&idcarpeta='+convert(varchar(10),@id_carpeta_hija)+'&carpetas='+convert(varchar(10),@numero_carpetas)
                   SET @liga = @liga + '&documentos='+convert(varchar(10),@numero_documentos)+'&hora='+@hora
                   SET @liga = @liga + '&fecha='+@fecha+'&idExp='+@pl_idexp+'&gaveta='+@pt_gaveta
                   BEGIN TRAN
                        --INSERT INTO IMX_ARBOL_TEMPORAL VALUES(@nombre_hija,@liga,@identa,0,'DATOS','1',1,1)
                        SELECT @nombre_hija,@liga,@identa,0,'DATOS'
                        EXEC lista_doctos @pt_gaveta,@pl_idexp,@id_carpeta_hija,@identa_modificado
                   COMMIT TRAN
              END
              EXEC desc_doctos @pt_gaveta,@pl_idexp,@id_carpeta_hija,@identa_modificado
              FETCH NEXT FROM imx_descendencia INTO @id_carpeta_hija,@nombre_hija,@fh_creacion,@fecha,@hora,
                   @numero_carpetas,@numero_documentos,@cv_aplicacion_des,@id_gabinete_des
         END
    CLOSE imx_descendencia
    DEALLOCATE imx_descendencia
    and this is my java code
    import java.sql.*;
    public class pruebasSQL{
         public static void main(String[] args){
              try{
                   Class.forName("com.inet.tds.TdsDriver").newInstance();     
                   Connection connection;
                   connection = DriverManager.getConnection("jdbc:inetdae7:localhost","user","pass");
                   connection.setCatalog( "DataBase");
                   CallableStatement statement = connection.prepareCall("{call desc_doctos ('NVA_EST',1002,0,1)}");
                   ResultSet rs = statement.executeQuery();
                   rs.last();
                   System.out.println(rs.getRow());
                   rs.close();
                   connection.close();
              catch(Exception e){
                   System.out.println(e);
    Hope u can help me =)
    Raul Medina
    [email protected]

    Hi! I managed to resolve this problem. This is what I did, hope somebody finds it usefull
    //connection, declarations, etc...
    PreparedStatement ps = connection.prepareStatement("exec desc_doctos 'NVA_EST',1002,0,1");
                   ResultSet rs = ps.executeQuery();
                   rs.next();
                   System.out.println(rs.getString(1));
                   while(ps.getMoreResults()){
                        rs = ps.getResultSet();
                        rs.next();
    +" "+rs.getString(2)+" "+rs.getString(3)+" "+rs.getString(4)+" "+rs.getString(5));
                        System.out.println(rs.getString(1));
    ------------

  • 10.2.0.3 driver. Maximum limit of parameters in a stored procedure

    What is the Maximum limit of parameters that can be passed to a stored procedure via ODBC? We got a function that was executed successfully by the 9i driver with 272 parameters. The same function fails when executed with 10.2.0.3 driver with ORA-06513 error. We then tried reducing the parameters and found that the driver would allow a maximum of 253 parameters. Any ideas or thoughts on this is much appreciated.

    Update for future reference:
    Finally got a metalink account and ran with the latest instantclient patch. This seemed to stop the heap corruption problem.

  • Stored Procedure/Function Returns Rows?

    Hello,
    I have very little experience writing PL/SQL procedures, but I have written my fair share of Sybase stored procedures. In Sybase, I can create a stored procedure that returns rows of data. For example:
    create procedure myproc as
    begin
    select * from mytable;
    end;
    Then if I invoke the procedure (whether that is from an interactive SQL session or from a ColdFusion or JSP page), several rows of data are returned to me.
    The benefit of this is that the web developers don't need to write complicated SQL.
    Is this even possible in Oracle? I have never seen anyone actually do this. Or do my web coders need to learn how to write PL/SQL and embed it into their code?
    HELP!
    Thanks!

    Hi Justin,
    Thanks for your reply. That's kind of what I was suspecting, except that I was hoping to be able to execute the function/procedure from within a SQL session also, for testing. Is there a way to invoke such a procedure from a SQL*Plus session and have it return the rowset (ref cursor) just as if I had typed in the SQL select statement?
    For example, I just want to type at a SQL*Plus prompt something like this:
    mypackage.myfunction(param1, param2);
    and then have it return the results to me. Is that possible?
    Thanks again for your help.
    Mark

  • Using Row Type in Stored Procedure

    Hi,
    I am working on ADF technology wherein I need to call Procedure from javacode.
    I am using Jdev 11g version.
    I am using Entity Impl to invoke my Stored Procedure which I have used Row Type in it.
    This procedure is running Independently using Toad. But I am not able to call it from Java code.
    For EX: We will call the Stored Proc from Java code in this way.
    String stmt = "begin execute_define_deliverables(?,?,?,?); end;";
    st.setInt(1,this.XXXXX.intValue());
    if(this.getXXXX()!=null)
    st.setString(2,this.getXXXXXX());
    else
    st.setNull(2,Types.VARCHAR);
    Whereas the questionmarks indicates the individual columns.
    But My problem is I have used Row Type in my Stored Proc.
    Any pointers in this regard will be very helpful.
    Regards,
    Kalyan

    Hi Satya,
    Now I got it, thanks,
    Can you please advise, if I use the same stored procedure for EMP Table and use my array values to retrieve the selected EMPNo
    I tried following but I could not succeed.
    When I compile the stored procedure, error occurs:
    "inconsistent datatypes: expected NUMBER got NUM_ARRAY"
    for example:
    CREATE TYPE NUM_ARRAY AS TABLE OF NUMBER;
    Create or Replace Package TB_Data
    Is Type CV_Type Is REF CURSOR;
    END TB_DATA;
    Create or Replace Stored Procedure give_me_an_array
    (CV IN OUT TB_DATA.CV_TYPE,
    MEmpNo In Num_Array)
    Is
    Begin
    Open CV for
    Select * from EMP
    Where Empno in MEmpNo;
    End myProc;
    declare
    mdata num_array:=num_array(7839,7844);
    begin
    give_me_an_array(mdata);
    end;
    Best Regards,
    Luqman

  • Inserting multiple rows into DB via SQL insert or stored procedure?

    I have successfully created an application where I select a row in an output table view from a Microsoft Access DB SQL data source, and get an Oracle stored procedure to save the row in a new table in our Oracle DB.
    This works like a charm when selecting one single row in the table view. What I really need though is for the procedure to save multiple rows at once.
    My table is configured with selection mode = 'multiple', and the data mapping line between the table and my procedure has mapping scope = 'selected data rows'.
    So, I am able to select multiple rows but still my procedure only stores one of the values sent. Does anyone know if this is related to my procedure not handling multiple parameter entries or if it's related to how VC outputs data to a procedure?
    Here is output from runtime flex log where you see the three values: 3, 11 and 9 that is sent to the procedure's IN parameter 'P_ID'.
    <Row OWNAPPS_TESTSQL_HYTTER_P_ID="3"/><Row OWNAPPS_TESTSQL_HYTTER_P_ID="11"/><Row OWNAPPS_TESTSQL_HYTTER_P_ID="9"/>
    Please help
    Henning Strand
    I am still very, very interested in hearing if anyone has been successful at passing multiple rows to a stored procedure in one submit action.
    Edited by: Henning Strand on Apr 11, 2008 1:58 PM

    Update for all you happy people using Oracle stored procedures with Visual Composer:
    When trying to run a simple procedure that accepts arrays as input parameters, the JDBC connector returns an error message saying: 'PLS-00306: wrong number or types of arguments in call ...'
    I registered this as a customer message with sap support and got an answer back saying:
    Unfotunately our JDBC connector is still not able to work with SP that contain arrays, this is the reason for the behaviour that you're seeing.
    This are the bad news, the good news is that with WebServices we don't have this limitation, so you can achieve the same results by using a WS instead of the Store Procedure.
    I have asked if and when using stored procedures with arrays will be supported - waiting for answer.
    Henning Strand

Maybe you are looking for