db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stanley Bradbury <Stan.Bradb...@gmail.com>
Subject Re: db.lck and dbex.lck files
Date Fri, 29 Sep 2006 21:11:21 GMT
Tim Dudgeon wrote:
>
>
> I'm wanting to provide some feedback in my application when a derby 
> database is opened and it was not shutdown properly last time it was 
> used.
>
> 2 files seem to be created, db.lck and dbex.lck and are not deleted 
> when the db is not shutdown cleanly.
>
> Is there a way of distinguishing between the presence of these files 
> being the result of a current process holding a lock on an open 
> database (in which case the database cannot be opened) and it being 
> the result of a bad shutdown, in which case the database can be 
> opened, but there may be a delay whilst it is opened.
>
> thanks
>
> Tim
>
>
Hi Tim -
As you indicate, check if the files are locked by a process - if they 
are then the database is most likely in use by a Derby process.  If they 
are not locked then they are probably orphan files and then you can 
check for the number and size of the files in the 'log' subdirectory to 
see if there might be a delay due to recovery running when the DB is 
next booted.  And I know you wouldn't do this but I feel compelled to 
mention that  you should never directly manipulate these files in any way.


Mime
View raw message