What Exactly do Lock Files (.lk) do?

Posted by sebfsit on 02-Oct-2012 12:23

Hi Progress Audience,

I'm fairly new to this platform (OpenEdge RDBMS 10.2B), and while I do have a large library of documentation (in PDF format), I cannot for some reason find any specific information pertaining to the lock file (denoted by .lk extension). My current educated guess is that it is some type of physical flag that is used for validation/diagnostic purposes. I think that if a database fails and the lock file is still present, the next time the database attempts to load (with the old lock file being present), it will force it to go into recovery mode. All the knowledge I have on this particular subject is from word of mouth (colleagues I work with), but I am unable to find any official documentation on the subject. Any help is greatly appreciated. Thank you.

P.S - As I previously mentioned, I have a PDF (start.pdf) which allows me access to a wide variety of PDFs specifically for 10.2B, but I am either unable to find information in here, or it is stored elsewhere.

All Replies

Posted by Admin on 02-Oct-2012 12:33

The .lk file indicates that the DB is in use.

A single-user client or the DB broker create this file (if not already existing) and keeps a file lock on it. This is how other processes find out that the DB is in use.

Posted by sebfsit on 02-Oct-2012 12:54

Thanks for your reply, Mike.

But can you tell me where you obtained the source of that information? I am currently working on some documentation and have to be quite specific on the details. Thank you.

Posted by gus on 02-Oct-2012 13:40

Existence of the .lk file indicates that something is using the database. Normally the file is deleted when the database server is shut down or the singleuser session ends. But in the event of a crash, the file will not be deleted.

The .lk file contains three things:

operating mode of the database (singleuser, multiuser, utilities)

process id of user if singleuser or process id of database broker if multiuser

hostname of machine the database is being used on

Posted by sebfsit on 02-Oct-2012 15:43

Thank you, Mike! That was exactly what I was looking for. I searched the knowledgebase, but for some reason the article would not appear.

This thread is closed