OCI8 OCIStmtFetch() the number of processed rows

Hello,
Would someone help me, please.
How may I get the number of returned rows at the end of the table after OCIStmtFetch() for multiple rows?
The OCI7 function ofen() returns the number of processed rows.
Thanks.
null

Simon
For  deleting significant number of rows best practice is to delete rows in small batches of known size (e.g. 10 K) inside a while loop. 
This keeps transaction log from filling up as well.
Also between two iterations of delete you can give some wait to make sure that you do not monopolize the server. Sleep could be for a fixed number of seconds (e.g. 5) or for randomized number say from 1 to whatever makes sense.
Typically "set rowcount " is used to set up the batch size and "waitfor delay" to sleep between iterations.
Global variable @@rowcount gives yo actual rows deleted. For the last batch this may be lower than the batch size you set up.
HTH
Avinash

Similar Messages

  • How to retrieve the number of "free" rows in a table?

    Hi,
    if in a client only environment (no sync to mobile server) rows are inserted and deleted into a table,
    is there a way to retrieve the number of "free" rows in a table? Number of "Free" rows stands for
    number of rows that can be inserted again, before the table extents in size.
    Is there a way in OLite 10.3.0.2.0 to retrieve the size of tables and indexes? ALL_TABLES is not
    a place that really works.
    Best regards and many thanks,
    Gerd

    Hi Gary,
    many thanks, the partner uses a Lite client db without sync. The db runs inside an laboratory device and collects measures. There must be a way to estimate the the number of "measures" rows, that stil can be stored in the db.
    Than we need to make the deleted space available for new rows. The partner tested defrag.exe and found that it
    needs very long time to run, especially if the db is bigger than 2GB. ... and that this run sometimes fails.
    Is there any recommendation the partner can follow on?
    Thanks,
    Gerd

  • HOW CAN I HAVE THE NUMBER OF SELECTED ROWS IN ALV GRID?

    HI.
    HOW CAN I HAVE THE NUMBER OF SELECTED ROWS IN ALV GRID????
    GABRY =)

    You need to use
    data : grid1  type ref to cl_gui_alv_grid.
      call method grid1->get_selected_rows
        importing
          et_index_rows = i_sel_alvrows[].

  • How to set a limit on the number of processes a session can start?

    I have an Oracle db version 10.2.0.4 running on Solaris 10. My parallel_max_servers parameter is set to 650 and the processes parameter is set to 700. But I don see one session that is spawning 129 processes and another one that is spwaning 65 processes. Is there a way to limit the number of processes that a session can spawn?

    check processes
    $ ps -ef | grep $ORACLE_SID|wc -l
    SQL> select * from v$resource_limit where resource_name ='processes';
    My parallel_max_servers parameter is set to 650 and the processes parameter is set to 700.
    PARALLEL_MAX_SERVERS
    specifies the maximum number of parallel execution processes and parallel recovery processes for an instance. As demand increases, Oracle increases the number of processes from the number created at instance startup up to this value.
    Do you use query with parallel?
    example:
    -> create table xxx PARALLEL (degree 5)
    -> select /*+ PARALLEL
    if you don't use parallel on execution processes... so, your processes not increase ;)
    By the way your db have limited proceses= 700 (Dedicated Server Processes)

  • How long does the number porting process take?

    Hello Everybody! I just got my iphone (witch I LOVE it by the way) but I was wondering, how long does the number porting process take?
    I ported my phone number over from SprintPCS last night at around 7pm EST and right now it's 8am EST and my Palm seems to still be working... Is this normal?
    I'm still receiving incoming calls to my Palm, Text messages to my Palm, but yet I can do outgoing calls from my iphone... I'm kinda confused...
    I mean I received the text on my iphone from sprint telling me: "Welcome to AT&T" as well as receiving the e-mail saying my new phone number is the same one I've had for 6 years now... Is 13 hours considered normal?
    Thanx! :-D

    QueenYvette,
    If it continues to be an issue tomorrow, I would recomend calling again, and getting in contact with AT&T's porting department. They are familiar with resolving any issues that may arise.
    Powering off both phones is to make sure that the old phone is not maintaining an active connection with the old carrier that can interfere with the last steps of the porting process. If at all possible its a good idea to leave the old phone powered off, and restart the new phone about once an hour so that it will resync with the towers.
    Hope this helps,
    Nathan C.

  • Restrict the number of output rows

    I'm using Crystal XI. 
    Is there a way to restrict the number of ouput rows comparable to a SQL "Set Rowcount" command?  If so, I would appreciate the instructions.
    Thanks.

    I don't think their is a way to do it through the select expert, but it's easy enough to suppress any records beyond a defined number through the section expert:
    recordnumber > 5
    Any records after 5 are suppressed.

  • Restrict the number of processed messages in a time interval

    Hi experts,
    i have one problem to solve.
    Is there a possibility to restrict the number of processed messages in single stack java pi 7.3 in some time intervals?
    My problem is, that i have to restrict the messages from being sent only from 8:00 to 18:00 and there are restricted numbers that i can send in 15 minutes.
    For example 2000 messages can be sent in 15 minutes, if more messages arive, they should be queued and be processed in the next 15 minutes.
    Thank you in advance.
    Richard

    You're right in thinking that the behaviour you describe looks wrong.
    Take a look at the QueueBrowser interface which can be used to inspect a queue. You get one using QueueSession.createBrowser(Queue). The QueueBrowser allows you to scan a queue without consuming the messages. However note that the state of the queue may change while you're observing it through the QueueBrowser so what you see might not always be a 100% accurate representation of the queue at any given time.
    Other things to check:
    - message selectors - are you setting a message selector on your queue receiver which is resulting in not all of the messages 'matching'.
    - expired messages - are you setting a time-to-live on the messages that you publish.
    Hope this helps,
    David Ingham
    http://www.arjuna.com

  • How to count the number of deleted rows processed

    Sybase ASE version: 15.7-SP52
    Hi all,
    I have a delete statement that will potentially delete millions of rows
    DELETE from TAB_A where COL_A='Y'
    The delete is long, at some point I'd like to know how many rows were deleted.
    If I do SELECT COUNT(*) from TAB_A where COL_A='Y', the query should be locked because of the exclusive-lock held by the DELETE in progress.
    If this is the case, how can I actually count the number of rows deleted so far?
    Thanks all
    Simon

    Simon
    For  deleting significant number of rows best practice is to delete rows in small batches of known size (e.g. 10 K) inside a while loop. 
    This keeps transaction log from filling up as well.
    Also between two iterations of delete you can give some wait to make sure that you do not monopolize the server. Sleep could be for a fixed number of seconds (e.g. 5) or for randomized number say from 1 to whatever makes sense.
    Typically "set rowcount " is used to set up the batch size and "waitfor delay" to sleep between iterations.
    Global variable @@rowcount gives yo actual rows deleted. For the last batch this may be lower than the batch size you set up.
    HTH
    Avinash

  • Using DBMS_APPLICATION_INFO.SET_MODULE to get the number of updated rows.

    hi.
    i have 2 tables to sync so i use the following code. however i included DBMS_APPLICATION_INFO.SET_MODULE to track the number of rows to be updated, but its not showing in v$sessions view. can anyone tell me what am i missing over here ?
    DECLARE
    l_count NUMBER (20, 0) := 0;
    l_updates NUMBER (20, 0) := 0;
    l_inserts NUMBER (20, 0) := 0;
    BEGIN
    FOR i
    IN (SELECT date_value,
    book_id,
    amount
    FROM bookstore.book_master_transit)
    LOOP
    BEGIN
    UPDATE bookstore.book_master
    SET amount = i.amount
    WHERE date_value = i.date_value
    AND book_id = i.book_id;
    IF (sql%ROWCOUNT > 0)
    THEN
    BEGIN
    l_updates := l_updates + 1;
    END;
    ELSIF (sql%ROWCOUNT = 0)
    THEN
    BEGIN
    INSERT INTO bookstore.book_master (     date_value, book_id, amount)
    VALUES (i.date_value, i.book_id, i.amount);
    l_inserts := l_inserts + 1;
    END;
    END IF;
    l_count := l_count + 1;
    DBMS_APPLICATION_INFO.set_module ('sync_book_info','total = '|| l_count|| '; updates = '|| l_updates|| '; inserts = '|| l_inserts);
    IF (MOD (l_count, 1000) = 0)
    THEN
    COMMIT;
    END IF;
    EXCEPTION
    WHEN OTHERS
    THEN
    NULL;
    END;
    END LOOP;
    COMMIT;
    END;
    when i query v$sessions after running this i couldnt find any entry with the value 'sync_book_info' as the module name. please advice me what i am doin wrong and how to do it right..
    thanks in advance,
    noviceDBA

    novicedba wrote:
    hi.
    i have 2 tables to sync so i use the following code. however i included DBMS_APPLICATION_INFO.SET_MODULE to track the number of rows to be updated, but its not showing in v$sessions view. can anyone tell me what am i missing over here ?
    DECLARE
    l_count NUMBER (20, 0) := 0;
    l_updates NUMBER (20, 0) := 0;
    l_inserts NUMBER (20, 0) := 0;
    BEGIN
    FOR i
    IN (SELECT date_value,
    book_id,
    amount
    FROM bookstore.book_master_transit)
    LOOP
    BEGIN
    UPDATE bookstore.book_master
    SET amount = i.amount
    WHERE date_value = i.date_value
    AND book_id = i.book_id;
    IF (sql%ROWCOUNT > 0)
    THEN
    BEGIN
    l_updates := l_updates + 1;
    END;
    ELSIF (sql%ROWCOUNT = 0)
    THEN
    BEGIN
    INSERT INTO bookstore.book_master (     date_value, book_id, amount)
    VALUES (i.date_value, i.book_id, i.amount);
    l_inserts := l_inserts + 1;
    END;
    END IF;
    l_count := l_count + 1;
    DBMS_APPLICATION_INFO.set_module ('sync_book_info','total = '|| l_count|| '; updates = '|| l_updates|| '; inserts = '|| l_inserts);
    IF (MOD (l_count, 1000) = 0)
    THEN
    COMMIT;
    END IF;
    EXCEPTION
    WHEN OTHERS
    THEN
    NULL;
    END;
    END LOOP;
    COMMIT;
    END;
    when i query v$sessions after running this i couldnt find any entry with the value 'sync_book_info' as the module name. please advice me what i am doin wrong and how to do it right..
    Totally, 100%, remove & eliminate entire EXCEPTION handler.
    Then you will be able to see error being RAISED; like No Privs

  • How to increase the number of processes taken for loading data?

    Hi,
    While loading data from R/3 to BW, we found that the particular load is taking 2 processes to load data into Cube.
    Is there anyway to increase the number to 4 ?
    Thanks in advance.
    Bobby.

    Bobby,
       to my knowledge we can't change that. Let me explain this, we have setting in the source system for DS default Data Transfer. there we will assign the processes. if you want to assign 4 you need to change the setting in the source system. For flat files we can change in BW System. We can maintain the setting in the Infopackage level(wht we are assigned in the Source System), but we can't change the process.
    in order to check the setting in source system  SBIW--> General Settings --> Control Parameters for Data Transfer.
    we need to change here, this will effect to all the Data Sources. Before making changes check with your basis.
    All the best.
    Regards,
    Nagesh Ganisetti.

  • Can I update the number of processes, cache etc per workshift via backend

    Hi everyone,
    after cloning from PROD to a TEST environment, i'd like to be able to reduce the number of concurrent processes and the cache size
    for the standard manager to a lower number.
    Most of my post cloning steps are automated through a script, and I wondered if I can make this change through the backend as well ?
    Thanks for your help.

    hsawwan wrote:
    Hi,
    Did you try to change these two parameters from the application and see if it works?
    Yes Hussein, this is how I do it at the moment, manually through the application, and this works
    Did you verify the value of MIN_PROCESSES and SLEEP_SECONDS columns for this manager in FND_CONCURRENT_QUEUE_SIZE table?
    When changed through the application, yes, these values are changed.
    I want to do this through the back end to automate the process. When I try manually updating the table, only the cach_size "works" in that
    it gets changed (and shows on the Concurrent - Administer screen) and stays changed in the table.
    The other values seem to get changed back in the table by some process and therefore do not get changed, even if I stop the ICM, make the change in the table, and the restart the managers.
    Any idea why ?
    Thanks

  • DB Update - How to Return the Number of Affected Rows?

    I created a DB Adapter that updates a record. I'd like to know if there is a way to return the affected number of rows. Currently, the DB Adapter Wizard seems not to create a return for the generated XSD.
    Thanks,
    Mark

    > Is it by somehow possible to use some custom query
    for this and use the 'returning'-clause to get the
    results back from the DB-adapter. On these results
    you can do some counts.
    Thanks for your reply.
    I have given a thought to that option too, however the issue is that, in order to use returning clause you have to use a temporary SQL variable which I believe can not be used unless we use a PL/SQL block (Please correct me, if I am wrong).
    I wanted to get away with the option of re-querying the 'SELECT' or a PL/SQL Block. Any suggestions?
    Thanks & regards

  • How can I add the number of columns/row starting with the build in "Text Report" example in the LabVIEW

    Hi All,
    I am wondering how can I add the numbers of row and column from the existing build-in "text report"
    VI ? If possible, would you mind showing me step-by-step because I am a new user and I am not familiar with the labview software.
    Thanks

    Hi,
    Easy text Report is for saving to a file. Do you mean you just want to add the totals of two arrays and write that? In that case I would just append the totals before writing to file.
    Jeff | LabVIEW Software Engineer

  • How do you change the number of processes in XE

    Processes are set to 40 in XE, how do i change this?

    SYS@XE SQL> alter system set processes=<new value> scope=spfile;and restart the DB.

  • ADF-BC JSF Counting the number of displayed rows that meet certain criteria

    Hi everyone.
    I have a JSF page that displays a table containing rows with a type attribute that may be either 'A' or 'B'. The page uses an executeWithParams form in order to set query parameters and execute the query. My users have asked me to display percentage information for type A rows at the same page.
    One way to do this would be to create an application module method that would parametrize the query, execute it, iterate through the results, do the calculation and return everything in a formatted string.. Somehow this approach does not seem right.
    Is there a best practice regarding situations like this? Any reference to code example would be perfect.
    Thanassis

    Maybe you can use the getEstimatedRowCount() method on the view.
    See more info here:
    http://download.oracle.com/docs/html/B25947_01/bcquerying006.htm

Maybe you are looking for

  • Layer mask is turning skin Gray

    I have used the same basic skin retouching method for hundreds of pictures. Usually I end up with very nice, natural looking skin.  Today, the same technique is turning the skin gray on any picture I attempt to use it on. I cannot figure out why.  Es

  • How to use Time Format with decimal to calculate races cars. ss,ddd ?

    In excell there are a user defined format MM:SS.000 very convenient to use in races with decimal precision. So in a race car we can have lap times like Car 1 - 1:23.234 Car 2 - 1:23.132 so the diference can be calculate and the result is 0.102. But i

  • To debug the Tcode F110 for script output

    Hi, I want to debug the Tcode F110 for the onr particular vendor whose payment has be runned. the script that is attached is the ZScript. I want to debug the attached script through F110 to view the payment output in production. Kindly suggest how to

  • HT5848 My iTunes Radio is not showing the bottom of my Music App on my iPhone. How do I get it back?

    My iTunes Radio is not showing the bottom of my Music App on my iPhone. How do I get it back?

  • DHCP Server Implementation

    Hi All, We have planned to implement the DHCP Server therefore here I am looking for the best practice which we can do. we have almost 25 branches across the country and its under in one cloud and single domain. Is this better to keep a DHCP server i