Kbase 15784: Information contained in the Progress .lk file
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  5/10/1998 |
|
Information contained in the Progress .lk file
The Progress .lk file - A description of it's contents
The .lk file holds 3 things
1.) The mode in which the database was started
2.) The process id of the process that started it
3.) The hostname where the process that started the database is
running
When a process attempts to start a database it first tests to see if
a .lk file already exists. If there is no .lk file, the process
creates a .lk file and starts up the database.
If a .lk file already exists, the process then reads the 3 values and
determines if the .lk file is a valid .lk file.
The process can determine that a .lk is valid by doing the following:
1.) The process tests to see if it can run the gethostname() call
If it cannot run this call, i.e. the gethostname() returned NULL,
then no determination can be made about the .lk file, so we
assume it is valid.
2.) Check to see if the hostname stored in the .lk file matches the
hostname gotten from the gethostname() call.
If the hostnames do not match,, then no determniation can be made
about the .lk file, so we assume it is valid.
3.) Check to see if the pid in the .lk file is still an active pid.
If we have verified that we are on the same host that is in
the .lk file, then we can see if the pid stored in the .lk file
is an active pid on the system.
If the pid is active, then the .lk file is valid.
If the pid is not active, then the .lk file is not valid.
If the .lk file is determined to be valid, then we cannot startup the
database, and we give an appropiate message.
If the .lk file is determined to be not valid, then we remove the
existsing .lk file, create a new one, and startup the database.
Do NOT delete the .lk file while the database is in use, in either
single or multi user mode. This is the only protection that exists to
prevent multiple processes starting the database. If multiple
processes are allowed to start the database, then crash recovery will
most decidely not work!!
In those circumstances, where there has been some type of abnormal
shutdown of the database or the system, and the .lk is not properly
removed and IT HAS BEEN POSITIVELY ascertained that there are no
progress processes accessing the database, then the .lk file can be
deleted. DO NOT take this action lightly.
Progress Software Technical Support Note # 15784