Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread How can I delete a dbisam.lck file?
Tue, Mar 3 2020 2:56 PMPermanent Link

John Taylor

Occasionally, I want to drop a table and remove the folder.  So, I

DropTable(tablename)  <--successful
DeleteFile('dbisam.lck') <-- not successful
Removedir(foldername) <-- not successful because file not deleted.

How can I delete the lock file?  Since there are not tables referencing it, why does the delete fail?

TIA,
John
Tue, Mar 3 2020 6:13 PMPermanent Link

Raul

Team Elevate Team Elevate

On 3/3/2020 2:56 PM, John Taylor wrote:
> Occasionally, I want to drop a table and remove the folder.  So, I
>
> DropTable(tablename)  <--successful
> DeleteFile('dbisam.lck') <-- not successful
> Removedir(foldername) <-- not successful because file not deleted.
>
> How can I delete the lock file?  Since there are not tables referencing it, why does the delete fail?

This is engine level lock file so you need to fully shut down all the
DBISAM sessions - close open databases sessions before you delete.


Raul
Wed, Mar 4 2020 9:52 AMPermanent Link

John Taylor

Raul wrote:

On 3/3/2020 2:56 PM, John Taylor wrote:
> Occasionally, I want to drop a table and remove the folder.  So, I
>
> DropTable(tablename)  <--successful
> DeleteFile('dbisam.lck') <-- not successful
> Removedir(foldername) <-- not successful because file not deleted.
>
> How can I delete the lock file?  Since there are not tables referencing it, why does the delete fail?

This is engine level lock file so you need to fully shut down all the
DBISAM sessions - close open databases sessions before you delete.

That's what I was afraid of, not really doable from a practical standpoint since there are quite a few background threads running.
Raul
Wed, Mar 4 2020 11:10 AMPermanent Link

Raul

Team Elevate Team Elevate

On 3/4/2020 9:52 AM, John Taylor wrote:
>
> That's what I was afraid of, not really doable from a practical standpoint since there are quite a few background threads running.

Then just delete files - if you have threads with active components
pointing to the folder you probably don't want to remove it in the first
place.

Raul
Image