Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Inconsistent SELECT results
Sybrand: thanks again for your assistance.
You turned out to be right, and I must have fell prey
to superstition.
This is what happened: at the time of my original posting, my only Oracle server was in a remote office and it was in pretty bad shape. For some undetermined reason (being hacked or several power failures) most of the server services stop working periodically: I couldn't telnet, rlogin, ftp, ssh or even dialup (interestingly enough, the Oracle subsystem never stopped working).
The server had (still has) to be rebooted about once a week. Since my OCI was (still is) giving me very weird results, I hipothesized that some of the Oracle binaries could be damaged as well, and decided to prepare a new server with the same Linux and Oracle versions. Well, this is the result: my program is still failing identically in the new server, so as you suggested the culprit now becomes my code.
Fortunately, I was able to reduce my large program to a minimal expression which still fails. The problem remains there. There are two queries: the COUNT(1) reports correctly, but when I SELECT actual fields, I get only a fraction. The more fields I request, the worse the results. With a single field like: SELECT ssn from table, the program runs perfectly, if I add a second field: SELECT ssn, name FROM table, most of the queries are correct, but a few are wrong. When I include 11 fields, almost all the queries return incorrect results: a lot of records are not reported.
I will post the suspect code next.
Thanks again,
-Ramon
Sybrand Bakker <gooiditweg_at_sybrandb.demon.nl> wrote in message
news:<49jvgv47rdca16drdd4pcmno44pda23pk5_at_4ax.com>...
> The obvious suggestion would be of course to try to repeat the
> behavior in sql*plus. 'Corrupted files' are a rarity in Oracle and
> usually come up when people fall prey to superstition.
> Are you dead sure your program is correct?
>
>
> Sybrand Bakker, Senior Oracle DBA
>
Received on Sun Jul 13 2003 - 11:24:17 CDT