home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / database / ingres / 1190 < prev    next >
Encoding:
Text File  |  1992-08-20  |  3.1 KB  |  72 lines

  1. Newsgroups: comp.databases.ingres
  2. Path: sparky!uunet!sun-barr!sh.wide!wnoc-tyo-news!nec-tyo!nec-gw!mips!sdd.hp.com!wupost!gumby!destroyer!ncar!uchinews!gsbacd.uchicago.edu!cs_mj
  3. From: cs_mj@gsbacd.uchicago.edu (Mark Jaeger)
  4. Subject: Re: ESQL Bug
  5. Message-ID: <1992Aug20.152413.1@gsbacd.uchicago.edu>
  6. Lines: 60
  7. Sender: news@uchinews.uchicago.edu (News System)
  8. Organization:     
  9. References: <1992Aug19.211421.8332@macc.wisc.edu>
  10. Date: Thu, 20 Aug 1992 21:24:13 GMT
  11.  
  12. In article <1992Aug19.211421.8332@macc.wisc.edu>,
  13. kmchylla@vms.macc.wisc.edu writes:
  14.  
  15. > I wrote an embedded SQL program using C that seems to go into an
  16. > infinite loop when I have too many records to process, and
  17. > I can't figure out why.  The program simply sets up a
  18. > cursor to read each record, take a character field (storing
  19. > a gregorian date) and convert it to a date.  It updates another
  20. > field in the same record (a date field), and fetches the next record.
  21. >
  22. > This seems easy enough, but if my table gets too large it seems
  23. > to get "stuck" on a record and processes that same record until I
  24. > stop the process.  The strange thing is, depending on the Ingres
  25. > installation (production vs development) the program will run longer
  26. > before looping.  (The production machine can handle larger tables
  27. > than the development.)
  28. >
  29. > Our current work around for the problem is to chop the table into
  30. > smaller bits.  This seems to work, but I'd love to know what the
  31. > real problem is.  Ingres never gives us an SQL error or VMS
  32. > error message to track so we have decided it is not in our code
  33. > or data.
  34.  
  35. A guess: maybe your transaction log file is filling up.  A cursor has to
  36. be run inside a transaction, and if you are updating each row after you
  37. read it in, then INGRES has to log your entire table (before image and
  38. after image pages) to the INGRES transaction log file before you commit
  39. the transaction.
  40.  
  41. This diagnosis is not entirely consistent with your symptoms, however,
  42. because you state that you get no error message from INGRES.  When your
  43. program starts looping, try looking at the end of ii_config:errlog.log
  44. to see if it shows log file full.  Also, use "show process/continuous"
  45. to look at the front end, the dbms server, and the recovery process
  46. (DMFRCPxx or II_RCPxx) to see which one is active.  This may give a clue
  47. to where things are stuck.
  48.  
  49. Are you doing error checking in your C program?  Are you sure that your
  50. cursor "fetch" loop terminates on any error, or are you just looking for
  51. the "no rows found" condition?  Try adding these lines at the beginning
  52. of your C program:
  53.  
  54.     exec sql WHENEVER sqlerror call sqlprint ;
  55.     exec sql WHENEVER sqlwarning call sqlprint ;
  56.  
  57. You could also try running your program after doing this:
  58.  
  59.     $ define ii_embed_set "printgca"
  60.  
  61. and looking at the file "iiprtgca.log" that gets created.  It may
  62. provide a clue to where front-end/back-end communication breaks down.
  63.  
  64. Hope this helps.
  65.  
  66. --Mark Jaeger                internet: cs_mj@gsbvax.uchicago.edu
  67. Graduate School of Business        yellnet:  (312) 702-0328
  68. University of Chicago            faxnet:   (312) 702-0233
  69. Disclaimer: My opinions are my own and not those of my employer.
  70. Ich bin ein Virus.  Mach' mit und kopiere mich in Deine .signature.
  71.  
  72.