home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / database / ingres / 1954 < prev    next >
Encoding:
Text File  |  1992-11-20  |  3.6 KB  |  74 lines

  1. Newsgroups: comp.databases.ingres
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!uchinews!gsbacd.uchicago.edu!cs_mj
  3. From: cs_mj@gsbacd.uchicago.edu (Mark Jaeger)
  4. Subject: Re: Auditdb on old journals?
  5. Message-ID: <1992Nov20.162357.1@gsbacd.uchicago.edu>
  6. Lines: 62
  7. Sender: news@uchinews.uchicago.edu (News System)
  8. Organization:     
  9. References: <reid.6.722272148@UPEI.CA>
  10. Date: Fri, 20 Nov 1992 22:23:57 GMT
  11.  
  12. In article <reid.6.722272148@UPEI.CA>, reid@UPEI.CA (Mike Reid) writes:
  13. >
  14. > Is there any way to get auditdb to write an audit trail for some previous
  15. > journal file?  The journal file is deleted after each checkpoint but I would
  16. > like to be able to look for particular changes in a journal file restored
  17. > from tape. We are running Ingres 6.4/02 under VMS 5.4. Any suggestions
  18. > would be appreciated.
  19.  
  20. This sounds hard.  It might require restoring the database to the state
  21. it was in before the journals started using rollforwarddb in order to
  22. trick the JSP into knowing about them.  If you have a separate INGRES
  23. installation in addition to the one for your real database, then you
  24. could practice there without hurting the real one.  I think the whole
  25. trick is in getting the configuration file for the database
  26. [ingres.data.my_db]aaaaaaaa.cnf in a state where it knows about the
  27. checkpoint from which the journals started.
  28.  
  29. I have some insight into this due to a rather unpleasant experience I
  30. had last week when a disk went bad and we had to recover a database from
  31. checkpoints, journals, and dumps.  We discovered that some dodo brain
  32. had inadvertently written over the tape with the current checkpoint. 
  33. After tearing out a few hairs we also discovered that it _is_ possible to
  34. roll forward from older checkpoints using the "#c" switch on the
  35. rollforwarddb command.  This is documented in the DBA Guide.
  36.  
  37. However, the "#c" did not work seamlessly (maybe cuz I didn't follow
  38. _all_ the rules).  In order to recover the database, I _should_ have
  39. recovered the dump directory in addition to the old checkpoint, because
  40. there is critical information in there.
  41.  
  42. Since our operator was feeling somewhat overstressed, I wasn't about to
  43. task him to restore an itty bitty 16-block file from a 2-gigabyte backup
  44. tape, so I resorted to ruse.  In order to get rollforwarddb to work, I
  45. had to go to the dump directory for the database and change the
  46. aaaaaaaa.cnf file there so that it thought that the old checkpoint was a
  47. valid one.  The current config file was written after a "ckpdb" with the
  48. "-d" switch, and so it had lost the information about the old
  49. checkpoint.  I merely copied the dump file to the config file, and
  50. eureka.
  51.  
  52. Finally we got this command to work:
  53.  
  54.         $ rollforwarddb -s -v +c -j #c123 my_db
  55.  
  56. and then I was able to use auditdb to look at all the journal files.
  57.  
  58. I would suggest simulating the situation you have with a test database. 
  59. Create a new, empty database; checkpoint it as you do your real
  60. database, with journaling; create a table with journaling; insert a row
  61. to generate journal records; and then shut down INGRES (this flushes the
  62. journals to disk).  Copy the checkpoint, journal, and dump directories
  63. to somewhere else; fire up INGRES; and then run "ckpdb -d".  Generate
  64. some more journals; and now try to simulate the recovery of the old
  65. checkpoints, journals, and dumps from tape by putting them back in the
  66. right directories; and run rollforwarddb.
  67.  
  68. --Mark Jaeger                internet: cs_mj@gsbvax.uchicago.edu
  69. Graduate School of Business        yellnet:  (312) 702-0328
  70. University of Chicago            faxnet:   (312) 702-0233
  71. Disclaimer: My opinions are my own and not those of my employer.
  72. Ich bin ein Virus.  Mach' mit und kopiere mich in Deine .signature.
  73.  
  74.