Inconsistent results from database calls

Hi all I was wondering if anyone would be able to come up with some possible ideas as to why my application is inconsistently retrieving data from a database. I have an application that is pulling information from a database. These calls can be made repetitively pulling the same information over and over again. The quandry that I am faced with is why the application would pull the right data most of the time, but occasionally not pull the correct values.
I have consided the following:
blocking - all of the calls are read only and scroll insensitive so I doubt this is the case
Limited number of connections
Seems like apossibility but then I would expect an error to be thrown.
Actions happening to fast
I was thinking perhaps the cycle is completing before everything has had a chance to finish the last set - is that a possibility ?
I can't post the code, so I am just looking for any general thoughts or ideas on the topic, if nothing thanks anyways.

Thank you both for your thoughts. The transactions is definately not a possibility (at least as I understand) as this is on read information only, there is no commits nor any updates being completed by this method.
I will continue to hunt down this little bugger. The biggest issue is that it is one behemoth of a method that should not exist, but unfortunately does.

Similar Messages

  • Inconsistent results from CallableStatement

    We are getting inconsistent results from a call to an Oracle database. We have a CallableStatement that returns 4 INTEGERs.
    It runs perfectly if I run the Oracle procedure directly from the sql command line and then call it from the java code.
    However if I recompile the Oracle stored procedures and execute the Callable Statement (without first running it from sql) then I am getting incorrect results...1,2,1,1 is being returned instead of 1,2,0,3. Are these results being cached somewhere???
    We are using Oracle 8.1.7, JDK 1.3.1, and Oracle thin driver 8.1.7.
    The code is as follows:
    <pre>
    private CallableStatement autoLBNumbersNeeded;
    private void prepareStatements(){
         autoLBNumbersNeeded=dbConnection.prepareCall("{CALL
         pkg_scheduler.pr_auto_lb_nos(?,?,?,?)}");
         autoLBNumbersNeeded.clearParameters();
         autoLBNumbersNeeded.registerOutParameter(1, java.sql.Types.INTEGER);
         autoLBNumbersNeeded.registerOutParameter(2, java.sql.Types.INTEGER);
         autoLBNumbersNeeded.registerOutParameter(3, java.sql.Types.INTEGER);
         autoLBNumbersNeeded.registerOutParameter(4, java.sql.Types.INTEGER);
    public UserNumber[] doAutoLoadBalancing () throws SQLException {
    autoLBNumbersNeeded.clearParameters();
    autoLBNumbersNeeded.execute();
    mwFF = autoLBNumbersNeeded.getLong(1);
    mwHF = autoLBNumbersNeeded.getLong(2);
    wmFF = autoLBNumbersNeeded.getLong(3);
    wmHF = autoLBNumbersNeeded.getLong(4);
    autoLBNumbersNeeded.clearParameters();
    </pre>
    The Oracle procedure is
    <pre>
    PROCEDURE proc1( p_parm_1 OUT NUMBER, p_parm_2 OUT NUMBER, p_parm_3
    OUT NUMBER, p_parm_4 OUT NUMBER)
    AS
    BEGIN
    -- Get Counts
    SELECT COUNT(*)
    INTO p_parm_1
    FROM blah ......
    SELECT COUNT(*)
    INTO p_parm_2
    FROM blah ......
    SELECT COUNT(*)
    INTO p_parm_3
    FROM blah ......
    SELECT COUNT(*)
    INTO p_parm_4
    FROM blah ......
    EXCEPTION
    blah .......
    END proc1;
    </pre>
    Can anyone help?
    Many thanks
    Fionnuala

    Hi
    Yes I have a debug line that prints them out in the doAutoLoadBalancing method - this is the point where I am diagnosing the problem. It only prints the correct results after I have already run the procedure from the SQL command line.
    public UserNumber[] doAutoLoadBalancing () throws SQLException {
    autoLBNumbersNeeded.clearParameters();
    autoLBNumbersNeeded.execute();
    mwFF = autoLBNumbersNeeded.getLong(1);
    mwHF = autoLBNumbersNeeded.getLong(2);
    wmFF = autoLBNumbersNeeded.getLong(3);
    wmHF = autoLBNumbersNeeded.getLong(4);
    autoLBNumbersNeeded.clearParameters();
    if (m_cat.isDebugEnabled()) {m_cat.debug("mwFF: "+mwFF+"; mwHF: " +mwHF+"; wmFF: "+wmFF+"; wmHF: "+wmHF);}
    </pre>

  • Inconsistent Results from dbms_output.get_lines

    Hi,
    I am getting inconsistent results from using dbms_output.get_lines.
    I'm using get_lines in a procedure A that executes a function B to test if the function returns 0 or > 0 to indicate validity of my data. In that function, I use dbms_output.put_lines to communicate data points that I want to use. My procedure A does a get_lines after executing function B then either logs the lines into a table or sends an email.
    Right now, get_lines is behaving sporadically for me. Sometimes I the chararr returns some lines while other times it doesn't. The strange thing is numlines does return a value, and it's the value that I expected.
    Can someone please help?
    Thanks.

    Use parameters or even global package variables to transport data from one procedure to the other. dbms_output is not meant for this, it will not work.

  • Inconsistent results from rpm

    Hi Oracle Forums,
         I am installing packages required for Oracle Database 11gR2, and am having problems with rpm responses.
         When I query rpm about a package, it tells me that the package is not installed. When I go to install the package, rpm informs me that the package is already installed. An example is shown below:
    [root@OELVM02 Server]# uname -a
    Linux OELVM02.localdomain 2.6.32-300.10.1.el5uek #1 SMP Wed Feb 22 17:37:40 EST 2012 x86_64 x86_64 x86_64 GNU/Linux
    [root@OELVM02 Server]#
    [root@OELVM02 Server]# pwd
    /media/OL5.8 x86_64 dvd 20120229/Server
    [root@OELVM02 Server]#
    [root@OELVM02 Server]# ls -alrt binutils-2.17.50.0.6-20.el5.x86_64.rpm
    -rw-r--r-- 1 root root 3069914 Dec 28  2011 binutils-2.17.50.0.6-20.el5.x86_64.rpm
    [root@OELVM02 Server]#
    [root@OELVM02 Server]#  rpm -q ./binutils-2.17.50.0.6-20.el5.x86_64.rpm
    package ./binutils-2.17.50.0.6-20.el5.x86_64.rpm is not installed
    [root@OELVM02 Server]#
    [root@OELVM02 Server]# rpm -ivh ./binutils-2.17.50.0.6-20.el5.x86_64.rpm
    warning: ./binutils-2.17.50.0.6-20.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
    Preparing...                ########################################### [100%]
            package binutils-2.17.50.0.6-20.el5.x86_64 is already installed
    [root@OELVM02 Server]#
    [root@OELVM02 Server]# rpm -q ./binutils-2.17.50.0.6-20.el5.x86_64.rpm
    package ./binutils-2.17.50.0.6-20.el5.x86_64.rpm is not installed
    [root@OELVM02 Server]#     I do not understand the inconsistent results that rpm is giving me.
         Any help would be greatly appreciated
         Thanks
         Gavin

    Hi Avi,
         Thanks for your quick response!!
         The Oracle documentation requires that both the 32 and 64 bit rpm's be installed for some packages. In the below scenario, is rpm telling me that both 32 and 64 bit packages are installed?
    [root@OELVM02 Server]# uname -a
    Linux OELVM02.localdomain 2.6.32-300.10.1.el5uek #1 SMP Wed Feb 22 17:37:40 EST 2012 x86_64 x86_64 x86_64 GNU/Linux
    [root@OELVM02 Server]#
    [root@OELVM02 Server]# pwd
    /media/OL5.8 x86_64 dvd 20120229/Server
    [root@OELVM02 Server]#
    [root@OELVM02 Server]# ls -alrt *glibc-2*
    -rw-r--r-- 1 root root 1544040 Nov 18  2010 compat-glibc-2.3.4-2.26.x86_64.rpm
    -rw-r--r-- 1 root root 1069214 Nov 18  2010 compat-glibc-2.3.4-2.26.i386.rpm
    -rw-r--r-- 1 root root 5607577 Feb 26  2012 glibc-2.5-81.i686.rpm
    -rw-r--r-- 1 root root 4997627 Feb 26  2012 glibc-2.5-81.x86_64.rpm
    [root@OELVM02 Server]#
    [root@OELVM02 Server]# rpm -q glibc-2.5-81.i686
    glibc-2.5-81
    [root@OELVM02 Server]#
    [root@OELVM02 Server]#  rpm -q glibc-2.5-81.x86_64
    glibc-2.5-81
    [root@OELVM02 Server]#
    [root@OELVM02 Server]#     Thanks heaps
         Gavin

  • Extract results from database

    I want to be able to re-create a test report from the results database and do statistical analysis on the results of specific tests. Are there any querries or other database tools that have already been developed for this?

    Hi Gumby,
    As far I know there aren't any tools developed specifically for this kind of a task. However depending on the environment you're using there will probably be tools developed for easily retrieving information from databases.
    In TestStand we have SQL step types that allow you to easily retrieve data from databases. There are two examples that ship with TestStand I would suggest looking at in addition to the help for these step types.
    C:\Program Files\National Instruments\TestStand 3.1\Examples\Database
    (This path will vary depending on the version of TestStand and your installation directory.)
    If you're using LabVIEW or LabWindows/CVI we have special tools developed to simplify communicating to databases.
    c.vp?cid=6429〈=US>LabVIEW Database Connectivity Toolkit
    NI LabWindows/CVI Enterprise Connectivity Toolset
    There are also lots of examples available by searching our website.
    If you're using another environment there are probably tools available as well, I just don't know enough to recommend any.
    I hope this helps!
    Regards,
    Sarah Miracle
    National Instruments

  • Keep GUI, change from database-call to web-services-call. Possible??

    Hi.
    I have an APEX-application with several pages. Every page have code for getting/inserting data from/to an Oracle database, using PL/SQL.
    We now want to look at the possibilities of keeping the userinterface (GUI) of the pages, but change the underlaying code to call web-services to retrieve data/insert data, instead of calling the database directly (so the users won't see any changes).
    So here is my questions:
    - Is this possible?
    - Is this quite "straight forward" ?
    Hope anyone can help me out on this issue :-)
    P.S. The APEX-version is 3.0 or 3.1 (not the newest one)
    Best regards
    Sverre, Norway

    Hi Sverre,
    I have the same task. What did you finally decide, to keep the Apex UI and migrate from database to web-services or to develop a new UI?
    If you chose to keep Apex, do you have any progress in migration?
    Thanks,
    Anton.

  • Record Results from sequence call inside of SequenceFilePostStepFailure Callback

    Test Stand 3.1
    When a step fails I use SequenceFilePostStepFailure Callback.
    In there I have prompt:
    1. Continue
    2. Terminate
    3. Terminate (thus calling a power down sequence file)
    Problem is that when Option 3 is used. There are no results recorded from that sequence call because it was invoked from the Callback.
    How do I force record results when that sequence file is called?
    Attachments:
    RecordResultsProblem1.zip ‏10 KB

    Hello Jaws8you,
    After looking into this issue further, it appears as if the link I posted has some great information but is not an exact fit for your particular situation.
    Because results from sequence callbacks will not populate in the report, we need to make sure and have any results we would like included in the main sequence.
    In your case we are just going to put the sequence call in the "Clean Up" tab, which will report the data, and is good programming practice.
    So to fix this problem, let's go ahead and try this:
    1.) Change the variable "Locals.ButtonPressed" to FileGlobals.ButtonPressed in the locations that you have it so far
    2.) "Cut" the "Call Main Power Down" sequence call from the "SequenceFilePostStepFailure" step, and copy it to the "CleanUp Tab" of "Main Sequence"
    Basically, that should be it. What this will do now is run the "Call Main Power Down" sequence when button 3 is pressed and skip this step whenever button 1 or 2 is pressed. The result is then published in the report.
    This should work out the best for you, thanks for posting and have an awesome day!
    With warm regards,
    David D.

  • Same query takes different time to fetch result from Database

    Hi all,
    I am having a scenario in which a query is taking different time keeping other environmental variables constant.
    When that query runs for 1 user it takes just 2 minutes to fetch result and the DB connection becomes inactive after fetching the result.
    But if I run the same query after some time in similar environment it takes 25 minutes. sometimes 40 minutes to execute and give the result to the app server from the same database.
    I am not able to understand this behavior from DB. Can anybody try to explain this behavior?
    The details of the DB are,
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE 11.2.0.1.0 Production
    TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    OS Details:
    Windows 2008 server Enterprise Edition.
    I tried analyzing that query in oracle, it recommended there are lots of hard parsing in that query.
    Regards,

    user10915512 wrote:
    Hi all,
    I am having a scenario in which a query is taking different time keeping other environmental variables constant.
    When that query runs for 1 user it takes just 2 minutes to fetch result and the DB connection becomes inactive after fetching the result.
    But if I run the same query after some time in similar environmentBut not exactly the same environment. So what is different that it is only "similar"?
    it takes 25 minutes. sometimes 40 minutes to execute and give the result to the app server from the same database.
    I am not able to understand this behavior from DB. Can anybody try to explain this behavior?Run a statspack on the 'well behaved' query and on the 'not well behaved' query. Compare and contrast the results.
    >
    The details of the DB are,
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE 11.2.0.1.0 Production
    TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    OS Details:
    Windows 2008 server Enterprise Edition. To paraphrase Forest Gump, "My momma always said Windows was like a box of chocolates ...."
    >
    >
    I tried analyzing that query in oracle, it recommended there are lots of hard parsing in that query.
    Regards,

  • Help in obtaining results from database

    i have a column containing value as abc's
    but when i retrieve this value from the database using
    rs.getString("columnname")
    i get only abc and not abc's.
    what is the problem

    here is the code:
    topicname in the database contains value say "abc's"
    String sqlstring="select topicname,topictype from topiclist where listno=?";
              PreparedStatement selectstatement=connection.prepareStatement(sqlstring);
              selectstatement.setString(1,listno);
              ResultSet rs=selectstatement.executeQuery();
              if (rs.next())
                   topic=rs.getString("topicname");
                   type=rs.getString("topictype");
                   rs.close();
    the result that is stored in topic is only abc and not abc's
    thank u

  • Result from reentrantly called subvi

    I have a subvi that I am calling reentrantly, I need to pass a cluster result back.  Doesn't look like I am doing it right because I am not getting any results.  
    Image resultfromsubvi.png I am calling the subvi.
    Other image is from the subvi in which I bundle the double's up.  I know that I have the same value going into 3.
    Just testing.
    Thanks in advance.  
    Attachments:
    resultfromsubvi.png ‏13 KB
    resultfromsubvi-2.jpg ‏11 KB

    tartar813 wrote:
    I am reviewing how to pass the indicator reference to the subvi to update it from the subvi. 
    Do you think that would work?
    Well sorta.  Again I don't know the full story and how this is intended to be used.  But yes that is one option is to pass the reference to the UI control to each reentrant sub VI.  The issue you will run into is these reentrant subvis will be updating the UI control asyncronously so indicator will be constantly overwritten with new data.  If you plan on logging the data as it comes in you will run into issues keeping track of what data came from where and when.  If you don't care about this type of thing then a control reference maybe the easiest.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • Want to display results from database pagewise ?

    I have 500 records in the sql server 2000 then i query and retrieve them in a resultsets. and then i want to display 10 records per page having the facility to navigate to the Previous and Next Record also going to first and the last record.
    like we are using when we navigate from this forum
    FIRST PREVIOUS 1 2 3 4 5 6 7 8 9 10 NEXT LAST
    secondly if their is a possiblity their should be a search page to to specific page like this
    Go To this Page (Textfield)
    third thing when i am on first record the it shouldnt show PREVIOUS button and when it is in the last it should not show NEXT.
    this thing should be done by Using JSP , Servelets and Beans...
    and PLEASE DONT SAY THAT IT HAS ALREADY BEEN ASK IF SO TELL ME THE LINK BECAUSE I CANT FIND ANYWHERE IN THE FORUM SO PLEASE TRY TO PROVIDE THE SOURCODE OR ATLEAST A REFERENCE FOR IT.

    for your task there is nice keyword in MySQL:
    LIMIT [offset,] rows
    maybe MSSQL has something similar...
    though i haven't seen such a keyword in oracle nor postgre... nor mssql (but i haven't looked for it from there...)
    one way would be to skip first X results in resultset... in PyML i have used method .skip(count) for skiping count rows, but i'm not sure that in java there is equivalent for that, so you might have to just call ResultSet.next() for count times, and then ten more times to get desired data for your page.

  • Inconsistent results from AlphaComposite and AffineTransform

    I'm developing a game using Java, and I've run into a fairly major issue. On my primary development machine, I can use combinations of AlphaComposite.SRC_IN and AffineTransforms with rotation just fine (I'm using the composite to create a lighting overlay for the game by drawing light beams onto the alpha channel of an all-black image buffer). On my other computer, while the image itself rotates and draws on the alpha channel fine, the computer also completely clears a bounding rectangle around the rotated image.
    The first computer (the one for which this works) has a GeForce 8800GTS video card, while the second has an older Radeon 9700. The first computer also has the most recent version of the JDK (6). Could either of these factors make the difference?
    edit: Upgrading to JDK 6 fixed it. Will need to include a notice about upgrading to JDK 6 with the game, probably.
    Message was edited by:
    Hyouko

    Hi
    Yes I have a debug line that prints them out in the doAutoLoadBalancing method - this is the point where I am diagnosing the problem. It only prints the correct results after I have already run the procedure from the SQL command line.
    public UserNumber[] doAutoLoadBalancing () throws SQLException {
    autoLBNumbersNeeded.clearParameters();
    autoLBNumbersNeeded.execute();
    mwFF = autoLBNumbersNeeded.getLong(1);
    mwHF = autoLBNumbersNeeded.getLong(2);
    wmFF = autoLBNumbersNeeded.getLong(3);
    wmHF = autoLBNumbersNeeded.getLong(4);
    autoLBNumbersNeeded.clearParameters();
    if (m_cat.isDebugEnabled()) {m_cat.debug("mwFF: "+mwFF+"; mwHF: " +mwHF+"; wmFF: "+wmFF+"; wmHF: "+wmHF);}
    </pre>

  • XML as result from webService call from JSP

    I have a jsp page, where I will invoke a WebService call, which will return
              a big XML object back to me, of which I need to select few key-value pair as
              display item in a table only as result.
              Any idea how to achieve this,
              Thanks & have a nice day!
              Vikky

    I have a jsp page, where I will invoke a WebService call, which will return
              a big XML object back to me, of which I need to select few key-value pair as
              display item in a table only as result.
              Any idea how to achieve this,
              Thanks & have a nice day!
              Vikky

  • Get results from database for the last one week ?

    Hi All,
    I have to make a query for retrieving the data for the last one week from a table say "Orderdata".
    So can anybody please tell me how to retrieve date of last weak from the current date. I mean if current date is 12/08/2004 (mm/dd/yyyy) then I would be needing date as :--
    12/01/2004 (mm/dd/yyyy) to 12/07/2004 (mm/dd/yyyy).
    To more clear, here is the query that am using :
    select * from orderdata where orderdate between 12/01/2004 AND 12/07/2004
    I know I would be needing java.sql.timestamp class to set date . but it is the last thing to do .
    First I have to get date of last weak...........
    Here is the code----------that i have just start to write ..
    Calendar cal;
    TimeZone tz;
    String estTimezone="GMT-05:00";
    tz=TimeZone.getTimeZone(estTimezone);
    cal=new GregorianCalendar(tz);
    cal.setTimeZone(tz);
    String currentdate=String.valueOf(cal.get(Calendar.MONTH)+1);
    currentdate+="/"+String.valueOf(cal.get(Calendar.DAY_OF_MONTH)-1);
    currentdate+="/"+String.valueOf(cal.get(Calendar.YEAR));
    out.println(currentdate);And assume if current date is 12/1/2004 (mm/dd/yyyy) then subtracting -1 form the current date will give 12/00/2004 so not getting the correct result .
    Hope it is clear to all................
    Please Help !
    amitindia

    http://forum.java.sun.com/thread.jspa?threadID=577953&tstart=0

  • Getting Inconsistent Results from Web Service

    We have a web service that provides Qty Available for several item numbers (current 252 item numbers). It takes in an array of item numbers to be checked. It returns an xml file with those item numbers and the qty available, which is drawn directly from a single table that is repopulated every fifteen minutes. Our customer said that his system shows a different number of records returned each time with consecutive polls.
    I tested the service using the endpoint testing web page. (I hope that's the correct term - I am fairly new to this.) I manually entered 175 item numbers.
    The first result set had a block of 74 item numbers missing from the middle. The second result set returned everything.
    Sample data excerpt:
       <ns0:result>
        <ROWSET>
         <ROW
           num="1">
          <ITEM_NBR>K5-8PE-RD</ITEM_NBR>
          <QTY_AVAILABLE>442</QTY_AVAILABLE>
         </ROW>
        </ROWSET>
       </ns0:result>
       <ns0:result>
        <ROWSET>
         <ROW
           num="1">
          <ITEM_NBR>K5-8PE-WH</ITEM_NBR>
          <QTY_AVAILABLE>5650</QTY_AVAILABLE>
         </ROW>
        </ROWSET>
       </ns0:result>
       <ns0:result
         xsi:nil="1"/>
       <ns0:result
         xsi:nil="1"/>
       <ns0:result
         xsi:nil="1"/>Does this make sense?
    Thanks,
    Gregory

    Turns out the problem was in the Java method. It seems it was opening a new connection for each item number and not closing them.
    Changed code to open the connection once, run through the item list, then close the connection.

Maybe you are looking for

  • ENET-232/4 doesn't seem to work for some instruments

    I have an ENET-232/4 and it works for some analog-digital interfaces I'm using but doesn't work for other instruments. I tried using a Shimadzu LC2010 with it, it configured OK, but the instrument wouldn't start a run. I tried a Thermo TraceGC and it

  • Decentralized Content Server

    Hello, We are trying to configure a system where the R/3 system is on the West Coast of the US and the CAD systems are in Florida. If I position the Content Server in Florida, is there a way to access the Content Server directly without sending large

  • WHEN RECORDING LIVE I HAVE 2 NOTES PER KEY RECORDED? HOW CAN I STOP THIS?

    I'm using Axiom 25 and Motu UltraLite mk3, When i select an instrument within Logic for example Grand Piano then press record and play the piano live i for instance play c3 once only, then when i stop recording and check the Piano Roll edit mode i wi

  • Unicode fonts not displaying

    I pruned my fonts back last week, but removing them from my System Folder, but now the Unicode fonts are not displaying in my web browser (maybe same in other apps, but haven't noticed). What specific font is used for Unicode display? Thanks.

  • Which librarys are essential when compiling Oracle 10g OCCI program in CW9?

    I'm using Mac OS X 10.3.6, gcc3.3, CodeWarrior 9.0, and installed XCode1.5 too. I had installed Oracle Database 10g Client for Mac OS X fully. I'm trying to build the demo of OCCI. I can run the'make -f demo_rdbms.mk occimb1' command successfully, an