Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 10 of 15 total |
9480 The database '<DatabaseName>' is full and cannot contain any more tables |
Thu, Feb 8 2007 8:35 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | I've run into the problem with the database filling up.
DoBayesianFilter is called from several threads in several places. As part of it some tables are opened and one memory table created. To ensure I have a unique analysis table I use GetTickCount and add it to a table name (I doubt anything it does will take less than 1ms). At the end of the procedure I clean up the tables and delete the in-memory one. This all seems to be fine until I run a menu option which checks out all messages and spam on file then it blows up. I can close and restart the app and it runs to the same point each time so I'm betting its nothing to do with the lock file, and if I alter the table name to be a constant (I can't in real life) it runs all the way through. HELP Roy Lambert These are the only support functions/procedures that create tables in any way function MakeDBISAMSession: TDBISAMSession; begin Result := TDBISAMSession.Create(nil); Result.PrivateDir := GetWindowsTempPath; Result.AutoSessionName := True; Result.LockProtocol := lpPessimistic; end; function MakeDBISAMDatabase(const iSession: TDBISAMSession; const Path: string): TDBISAMDatabase; begin Result := TDBISAMDatabase.Create(nil); Result.DatabaseName := 'db' + iSession.SessionName; Result.Directory := Path; Result.SessionName := iSession.SessionName; end; function MakeDBISAMTable(const iName: string; const iDBPath: string; const iSession: TDBISAMSession): TDBISAMTable; begin Result := TDBISAMTable.Create(nil); Result.TableName := iName; Result.DatabaseName := iDBPath; Result.SessionName := iSession.SessionName; end; function MakeDBISAMQuery(const iDBPath: string; const iSession: TDBISAMSession): TDBISAMQuery; begin Result := TDBISAMQuery.Create(nil); Result.DatabaseName := iDBPath; Result.SessionName := iSession.SessionName; end; Attachments: BaysProgs.pas |
Thu, Feb 8 2007 9:21 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | OK I've added a counter and its the 4096 limit. Why aren't tables removed from memory when deleted?
Roy Lambert |
Thu, Feb 8 2007 1:48 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Roy,
<< OK I've added a counter and its the 4096 limit. Why aren't tables removed from memory when deleted? >> In-memory tables work exactly like disk-based tables, meaning that they are hitting the same issue that disk-based tables have with the lock file. If you want to create that many temporary tables, then open them exclusively and they won't be added to the lock file and they won't cause the problem. -- Tim Young Elevate Software www.elevatesoft.com |
Fri, Feb 9 2007 4:13 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Tim
It is opened exclusively..... procedure SetUpForFiltering; var bfTableName: string; begin bfTableName := 'bfMsg' + IntToStr(GetTickCount); bfSession := MakeDBISAMSession; Bayesian := MakeDBISAMTable('Bayesian', slOptsStr('_DataPath'), bfSession); Bayesian.Open; // First create an interim analysis table Maker := MakeDBISAMQuery('Memory', bfSession); Maker.SQL.Add('DROP TABLE IF EXISTS "Memory\' + bfTableName + '";'); Maker.SQL.Add('CREATE TABLE IF NOT EXISTS "Memory\' + bfTableName + '"'); Maker.SQL.Add('('); Maker.SQL.Add('"_Token" VARCHAR(60),'); Maker.SQL.Add('"_MsgCount" INTEGER,'); Maker.SQL.Add('"_Probability" FLOAT,'); Maker.SQL.Add('"_Significance" FLOAT,'); Maker.SQL.Add('PRIMARY KEY ("_Token") COMPRESS NONE'); Maker.SQL.Add('LOCALE CODE 0'); Maker.SQL.Add('USER MAJOR VERSION 1'); Maker.SQL.Add(');'); Maker.SQL.Add('CREATE INDEX IF NOT EXISTS "Chance" ON "Memory\' + bfTableName + '" ("_Probability") COMPRESS NONE;'); Maker.SQL.Add('CREATE INDEX IF NOT EXISTS "Significance" ON "Memory\' + bfTableName + '" ("_Significance") COMPRESS NONE;'); Maker.ExecSQL; Maker.Close; Maker.Free; bfMsg := MakeDBISAMTable(bfTableName, 'Memory', bfSession); bfMsg.Exclusive := True; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< bfMsg.Open; SpamStats := MakeDBISAMTable('SpamStats', slOptsStr('_DataPath'), bfSession); SpamStats.Open; end; Roy Lambert |
Fri, Feb 9 2007 9:59 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Tim
Try the attached example. I've tried it a couple of times and get varying numbers of cycles eg 4704, 4693 It ain't the lock file. Roy Lambert Attachments: Unit1.pas Project1.dpr Unit1.dfm |
Fri, Feb 9 2007 3:53 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Roy,
<< Try the attached example. I've tried it a couple of times and get varying numbers of cycles eg 4704, 4693 It ain't the lock file. >> Yes, it is the lock file. That's the only way to cause the error. I can't see exactly what is going on with your project, however, because I don't have the NLHRoutines unit. Could you please email it to me ? Thanks, -- Tim Young Elevate Software www.elevatesoft.com |
Sun, Feb 11 2007 11:05 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Tim
Did you get the new .pas and is there anything else you need to tell me what's happening and fix either me or it? Roy Lambert |
Mon, Feb 12 2007 3:35 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Roy,
<< Did you get the new .pas and is there anything else you need to tell me what's happening and fix either me or it? >> I got the .pas, but I haven't had a chance to look at it yet. I will let you know via email. -- Tim Young Elevate Software www.elevatesoft.com |
Mon, Feb 19 2007 6:52 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Tim
Now ElevateDB has been release and you have lots of free time........ Roy Lambert |
Mon, Feb 19 2007 6:56 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Roy,
<< Now ElevateDB has been release and you have lots of free time........ >> Yeah, right. I still have that in my "emails to look at" list and I'll see if I can get to it early this week. -- Tim Young Elevate Software www.elevatesoft.com |
Page 1 of 2 | Next Page » | |
Jump to Page: 1 2 |
This web page was last updated on Tuesday, September 17, 2024 at 04:19 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |