Re: Database changes
This WebDNA talk-list message is from 1998
It keeps the original formatting.
numero = 16154
interpreted = N
texte = >The correct procedure when uploading a new replacement db file to the>server is to perform the $flushdatabases command first, THEN upload the>file.>>But this only works when no one happens to request a page that calls that>database in the meantime, because if that happens, WebCat will reload the>old db back into RAM before you're finished replacing the old db with the>new one... and then, once that old db is in RAM again, there's no way to>purge that RAM data without rewriting it to disk.>>So on a busy server, this generally means having to suspend new>connections or quitting the server in order to make absolutely sure that>your newly-uploaded db does not get overwritten by WebCat.We use two different techniques for updating .dbs, depending on the size ofthe db.1. Upload a new copy of the .db with a different name, like new.db. Searchthe old.db for all records and delete them. Then search the new.db for allrecords and append them to the old.db. Close the new.db. Replace new.dbwith a new new.db next time you have to update.2. Upload a new copy of the .db called something different. Close theold.db and delete it (either by [APPLESCRIPT] or with WebCat 2.1's[DeleteFile] tag. Rename the new.db to old.db with [APPLESCRIPT] or[CopyFile] new.db to old.db with WebCat 2.1 and [DeleteFile] new.db.On a really busy server or with really big db.s you might to embed an[APPLESCRIPT] in the beginning of the template that tells Web* to refuseconnections and one [APPLESCRIPT] in the end telling Web* to acceptconnections again. ************************************************************* Christer Olsson Stora Nygatan 21 Phone +46 40 791 50 Art director S-211 37 Malmoe Fax +46 40 97 99 77 Ljusa Ideer AB Sweden http://www.ljusaideer.se
Associated Messages, from the most recent to the oldest:
>The correct procedure when uploading a new replacement db file to the>server is to perform the $flushdatabases command first, THEN upload the>file.>>But this only works when no one happens to request a page that calls that>database in the meantime, because if that happens, WebCat will reload the>old db back into RAM before you're finished replacing the old db with the>new one... and then, once that old db is in RAM again, there's no way to>purge that RAM data without rewriting it to disk.>>So on a busy server, this generally means having to suspend new>connections or quitting the server in order to make absolutely sure that>your newly-uploaded db does not get overwritten by WebCat.We use two different techniques for updating .dbs, depending on the size ofthe db.1. Upload a new copy of the .db with a different name, like new.db. Searchthe old.db for all records and delete them. Then search the new.db for allrecords and append them to the old.db. Close the new.db. Replace new.dbwith a new new.db next time you have to update.2. Upload a new copy of the .db called something different. Close theold.db and delete it (either by [APPLESCRIPT] or with WebCat 2.1's
[deletefile] tag. Rename the new.db to old.db with [APPLESCRIPT] or
[copyfile] new.db to old.db with WebCat 2.1 and
[deletefile] new.db.On a really busy server or with really big db.s you might to embed an[APPLESCRIPT] in the beginning of the template that tells Web* to refuseconnections and one [APPLESCRIPT] in the end telling Web* to acceptconnections again. ************************************************************* Christer Olsson Stora Nygatan 21 Phone +46 40 791 50 Art director S-211 37 Malmoe Fax +46 40 97 99 77 Ljusa Ideer AB Sweden http://www.ljusaideer.se
Christer Olsson
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:
WebCat2b13MacPlugIn - [shownext method=post] ??? (1997)
greater than or equal to (1997)
New Guestbook Source (1997)
OT: FCKeditor (2005)
Re:listfiles-looking for slick solution (1997)
OT: JavaScript question (2001)
Online reference (1997)
Searching for Email Address (2004)
Trouble with formula.db (1997)
RE: [WebDNA] Latest Windows Version (2010)
Single Link browsing (1997)
RE: AccountAuthorizer doesn't seem to work (1997)
FAX orders (1996)
Re:Subcription Sales w/WebCatalog (1999)
[format 40s]text[/format] doesn't work (1997)
[format] problems (1998)
WebDNA to Apache RewriteMap (2005)
ooops...WebCatalog [FoundItems] Problem - LONG - (1997)
WebCat2: multiple currency support (1997)
WebDNA Speed Test (2006)