+ Reply to Thread
Results 1 to 4 of 4

open "cursors" on the server

  1. open "cursors" on the server

    Hi,
    i need something to know:
    if i have a java programm and send some sql statements via jdbc to the
    oracle server, then i will store the resultset in a resultset variable
    (without getting any data of a row from the server).
    now its possible, that eg 10 hours later, the programm use the
    resultsetobject and begin to compute the data (so with .nextrecord the data
    of the rows are needed from the server).

    (You can compare this szenario with open a cursor but getting the data of
    this cursor could be done 10 hours later.)

    What data may i get? will i get the data, that was on the server, when i
    send the sql statement? or will i get the data, when i compute the
    resultset?
    Remember: the data on the server can changed?

    How do oracle manage this?

    Greets

    Micha



  2. Re: open "cursors" on the server

    On Aug 19, 11:21*am, "Micha P." wrote:
    > Hi,
    > i need something to know:
    > if i have a java programm and send some sql statements via jdbc to the
    > oracle server, then i will store the resultset in a resultset variable
    > (without getting any data of a row from the server).
    > now its possible, that eg 10 hours later, the programm *use the
    > resultsetobject and begin to compute the data (so with .nextrecord the data
    > of the rows are needed from the server).
    >
    > (You can compare this szenario with open a cursor but getting the data of
    > this cursor could be done 10 hours later.)
    >
    > What data may i get? will i get the data, that was on the server, when i
    > send the sql statement? or will i get the data, when i compute the
    > resultset?
    > Remember: the data on the server can changed?
    >
    > How do oracle manage this?
    >
    > Greets
    >
    > Micha


    You either get the data as it was when the cursor was opened or, more
    likely, especially on a busy system with high transaction volume,
    you'll receive ORA-01555 error ("snapshot too old") because Oracle
    will be unable to reconstruct the data as it was 10 hours ago. For
    more details on Oracle architecture and concurrency model I'd highly
    recommend you to read through the Oracle Concepts manual. All Oracle
    documentation is available at http://docs.oracle.com.

    Hth,
    Vladimir M. Zakharychev
    N-Networks, makers of Dynamic PSP(tm)
    http://www.dynamicpsp.com

  3. Re: open "cursors" on the server

    do you get an ORA-01555 error even if the you use a result set ?
    I believe the question is how does a result set work for Oracle.

    Dose it get all the queried data from the server and store it locally
    make some modifications and upload the data.
    or
    Does it act like a cursor and never get the whole data from the server
    but fetch it like a cursor.

    how does the result set work ?




  4. Re: open "cursors" on the server

    On Aug 20, 1:50*pm, newhorizon wrote:
    > do you get an ORA-01555 error even if the you use a result set ?
    > I believe the question is how does a result set work for Oracle.
    >
    > Dose it get all the queried data from the server and store it locally
    > make some modifications and upload the data.
    > or
    > Does it act like a cursor and never get the whole data from the server
    > but fetch it like a cursor.
    >
    > how does the result set work ?


    According to the Java docs, ResultSet maintains a cursor into the
    data. If specific implementation does some prefetching or client-side
    caching obviously depends on the implementation. One should consult
    the docs accompanying that specific implementation to find out. For
    example, Oracle's implementation of a scrollable ResultSet fetches the
    whole data set to the client, but by default ResultSet is not
    scrollable, you need to make it scrollable explicitly when creating
    it. More information is at http://download.oracle.com/docs/cd/B...t.htm#g1036317.

    Hth,
    Vladimir M. Zakharychev
    N-Networks, makers of Dynamic PSP(tm)
    http://www.dynamicpsp.com

+ Reply to Thread