Consultor Eletrônico



Kbase P39480: How to release record locks left on the SQL Server when the
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   28/08/2003
Status: Unverified

GOAL:

How to release record locks left on the SQL Server when the Progress application terminates

FACT(s) (Environment):

MS SQL DataServer

FIX:

When the Progress application using the MSSQL DataServer unexpectedly
terminates, it may leave the records locked in the SQL Server database.
There are no Progress tools that could be used to see
which Progress session holds certain SPID as the SPID is
assigned by the SQL Server at the time of the connection and
client are not aware of that value. This is valid for any client and
not just Progress.

If it is ensured that each Progress session uses distinct
username when connecting to the SQL Server, then it is possible
to establish the link between the used resources
and the user that allocated them. This of course depends on the
configuration and the layout of connections - local or remote
dataserver using the broker.

The record locks in the SQL Server database can be seen by
using the SQL Server Enterprise Manager using the following steps:
1. Expand a server group, and then expand a server.
2. Expand Management, and then expand Current Activity.
3. Do one of the following:
Expand Locks / Process ID to view the current locks for each connection.
4. Expand Locks / Object to view the current locks for each object.
In the console tree, click the connection (SPID) or object to view.
The current locks for the connection or object are displayed in the details pane.

Any session (not just Progress) that tries to access
the locked record in the SQL Server will obtain the lock information
from the SQL Server, therefore the 'Current Activity' and its associated
'Locks / Process ID' and 'Locks / Object' will always provide the
information about the locked records.