Re: Updating a database once per day - An example

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 17974
interpreted = N
texte = >At 16:18 Uhr -1000 30.05.1998, Kenneth Grome wrote: > >>>Okay, so if my template closes a database on a busy server, then >>>[movefile]s in a newly uploaded copy of the database, it's possible for >>>WebCatalog to reopen this database between the closing and the file >>>transfer if it receives another request for it? >> >>Good question, I will have to leave this one for the guys at PCS ... :) > >I believe if you perform [closedatabase] AFTER you moved the new one in, >there will be no chance to open the old one - it simply does not exist >anymore. I hate to disagree, but this last recommendation is wrong ...You *must* close the database FIRST -- because closing it, or using [flushdatabases], or quitting WebCatalog -- are the only ways to purge the old data from RAM. And you *must* purge the RAM cache or that RAM-cached data will overwrite the newer disk file at the next [closedatabase] or [flushdatabases] or [quit].If you want to make sure this manual updating process works properly without any problems, other than *possibly* a visitor or two getting an Error: the database 'test.db' could not be found or opened message during the process (which should take no more than a second or two at the most), do this in your update template:[DELETEFILE] <--trash the current db file [CLOSEDATABASE] <--purge the RAM cache [MOVEFILE] <--move the new db file into placeThis insures that when it's time to move the new db file into position, the old data is already purged from RAM ... and the old db file could not be reloaded because it wasn't there to be reloaded -- it was already deleted from disk.Sincerely, Ken Grome 808-737-6499 WebDNA Solutions mailto:ken@webdna.net http://www.webdna.net Associated Messages, from the most recent to the oldest:

    
  1. Re: Updating a database once per day - An example ( 1998)
  2. Re: Updating a database once per day - An example (bob 1998)
  3. Re: Updating a database once per day - An example (Kenneth Grome 1998)
  4. Re: Updating a database once per day - An example (Steve Rosenbaum 1998)
  5. Re: Updating a database once per day - An example (Kenneth Grome 1998)
  6. Re: Updating a database once per day - An example (Marty Schmid 1998)
  7. Re: Updating a database once per day - An example (Kenneth Grome 1998)
  8. Re: Updating a database once per day - An example (Kenneth Grome 1998)
  9. Re: Updating a database once per day - An example (Gary Richter 1998)
  10. Re: Updating a database once per day - An example (Peter Ostry 1998)
  11. Re: Updating a database once per day - An example (Kenneth Grome 1998)
  12. Re: Updating a database once per day - An example (Kenneth Grome 1998)
  13. Re: Updating a database once per day - An example (Rob Marquardt 1998)
  14. Re: Updating a database once per day - An example (Peter Ostry 1998)
  15. Re: Updating a database once per day - An example (Kenneth Grome 1998)
  16. Re: Updating a database once per day - An example (Kenneth Grome 1998)
  17. Re: Updating a database once per day - An example (Rob Marquardt 1998)
  18. Re: Updating a database once per day - An example (Rob Marquardt 1998)
  19. Re: Updating a database once per day - An example (Kenneth Grome 1998)
  20. Re: Updating a database once per day - An example (Steve Rosenbaum 1998)
  21. Re: Updating a database once per day - An example (Kenneth Grome 1998)
  22. Updating a database once per day - An example (Steve Rosenbaum 1998)
>At 16:18 Uhr -1000 30.05.1998, Kenneth Grome wrote: > >>>Okay, so if my template closes a database on a busy server, then >>>[movefile]s in a newly uploaded copy of the database, it's possible for >>>WebCatalog to reopen this database between the closing and the file >>>transfer if it receives another request for it? >> >>Good question, I will have to leave this one for the guys at PCS ... :) > >I believe if you perform [closedatabase] AFTER you moved the new one in, >there will be no chance to open the old one - it simply does not exist >anymore. I hate to disagree, but this last recommendation is wrong ...You *must* close the database FIRST -- because closing it, or using [flushdatabases], or quitting WebCatalog -- are the only ways to purge the old data from RAM. And you *must* purge the RAM cache or that RAM-cached data will overwrite the newer disk file at the next [closedatabase] or [flushdatabases] or [quit].If you want to make sure this manual updating process works properly without any problems, other than *possibly* a visitor or two getting an Error: the database 'test.db' could not be found or opened message during the process (which should take no more than a second or two at the most), do this in your update template:[deletefile] <--trash the current db file [closedatabase] <--purge the RAM cache [movefile] <--move the new db file into placeThis insures that when it's time to move the new db file into position, the old data is already purged from RAM ... and the old db file could not be reloaded because it wasn't there to be reloaded -- it was already deleted from disk.Sincerely, Ken Grome 808-737-6499 WebDNA Solutions mailto:ken@webdna.net http://www.webdna.net Kenneth Grome

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Candle Light Vigil (2001) Date Range works (1997) Signal Raised Error (Part II) (1997) [WebDNA] Add to cart (2014) Re:no [search] with NT (1997) possible, WebCat2.0 and checkboxes-restated (1997) expired beta (1997) OT - SMSI complaint (2001) WebCatalog Upgrade Pricing? (1997) breaking & sorting (2000) international time (1997) Sorting by date (1997) WebCat2: Items xx to xx shown, etc. (1997) CloseDataBase vs CommitDataBase (2007) Getting total number of items ordered (1997) Smart caching problems with 2.1b3? (1997) [search] & [encrypt]/[decrypt] (2001) searchable list archive (1997) Windows 2.1b2 Append Bug? (1997) Bug Report, maybe (1997)