Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 6 of 6 total |
.Old Files |
Thu, Mar 3 2016 10:45 AM | Permanent Link |
Burkhard Schneider isyControl Software | Hi,
is there a way to avoid creating theese .Old files after an Alter Table ... statement? Or ist there a simple way to get rid of them? |
Fri, Mar 4 2016 4:58 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Burkhard
Something may have been included in the versions of DBISAM more recent than mine but I don't know of an option. What I did for ElevateDB was write a small cleanup program procedure DoDBCleanup; var sr: TSearchRec; fNam: string; fExtn: string; begin if FindFirst(HHCommons.DBPath + '*.*', faAnyFile, sr) = 0 then begin repeat fNam := ExtractFileName(sr.Name); fExtn := LowerCase(ExtractFileExt(fNam)); fNam := Copy(fNam, 1, LastDelimiter('.', fNam) - 1); if fExtn = '.old' then DeleteFile(HHCommons.DBPath + sr.Name) else if fExtn = LowerCase(dm.TfRSession.LocalTableExtension) then begin if dm.DB.Execute('SELECT * FROM Information.Tables WHERE Name = ' + QuotedStr(fNam)) = 0 then begin DeleteFile(HHCommons.DBPath + fNam + dm.TfRSession.LocalTableExtension); DeleteFile(HHCommons.DBPath + fNam + dm.TfRSession.LocalTableBlobExtension); DeleteFile(HHCommons.DBPath + fNam + dm.TfRSession.LocalTableIndexExtension); end; end else begin if (fExtn <> LowerCase(dm.TfRSession.LocalTableExtension)) and (fExtn <> LowerCase(dm.TfRSession.LocalTableBlobExtension)) and (fExtn <> LowerCase(dm.TfRSession.LocalTableIndexExtension)) and (fExtn <> LowerCase(dm.TfRSession.LocalBackupExtension)) and (LowerCase(sr.Name) <> LowerCase(dm.TfRSession.LocalCatalogName + dm.TfRSession.LocalCatalogExtension)) and (LowerCase(sr.Name) <> LowerCase(dm.TfRSession.LocalCatalogName + dm.TfRSession.LocalLockExtension)) and (LowerCase(sr.Name) <> LowerCase(dm.TfRSession.LocalConfigName + dm.TfRSession.LocalBackupExtension)) and (LowerCase(sr.Name) <> LowerCase(dm.TfRSession.LocalConfigName + dm.TfRSession.LocalLockExtension)) then DeleteFile(HHCommons.DBPath + sr.Name); end; until FindNext(sr) <> 0; FindClose(sr); end; end; Roy Lambert |
Fri, Mar 4 2016 5:03 AM | Permanent Link |
Fernando Dias Team Elevate | Burkhard,
No, but you can safely delete them after a successful ALTER TABle operation. However, unless you really really need the space on disk that they are taking, there is no advantage in deleting them. -- Fernando Dias [Team Elevate] |
Fri, Mar 4 2016 5:35 AM | Permanent Link |
Burkhard Schneider isyControl Software | Thanks,
I already implemented such a deleting routine but I thought there could be something else. |
Fri, Mar 4 2016 8:44 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Burkhard
<< Is there a way to avoid creating theese .Old files after an Alter Table ... statement? Or ist there a simple way to get rid of them? >> Yes, what you want is the NOBACKUP clause: http://www.elevatesoft.com/manual?action=viewtopic&id=dbisam4&product=rsdelphi&version=XE&topic=ALTER_TABLE_Statement Tim Young Elevate Software www.elevatesoft.com |
Fri, Mar 4 2016 8:45 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Burkhard
Please ignore that reply - I thought I was in the DBISAM forums. With EDB, there isn't any way to *not* create them, but you can safely delete them afterwards. Tim Young Elevate Software www.elevatesoft.com |
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 |