Kbase P120304: Error "Failure getting record lock on a record from table <TableName>. (-210015) " when executing DT
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  11/9/2006 |
|
Status: Unverified
FACT(s) (Environment):
MS SQL
SYMPTOM(s):
SQL-92
Using DTS (Data Transformation Services) Package in Microsoft SQL Server
DTS package exports records to a Progress database
DTS package execute fails intermittently with ODBC error -210015
Failure getting record lock on a record from table PUB.<TableName>. (-210015)
Connection is made via DataDirect ODBC SQL-92 driver
ODBC DSN Isolation Level is set to READ COMMITTED (or higher, REPEATABLE READ, SERIALIZABLE)
4GL users locking records exclusively
4GL users also access the table and insert / update / delete records
ODBC trace log shows the following error:
SQL Server Ente b50-bd4 ENTER SQLExecDirectW
HSTMT 019E46E8
WCHAR * 0x02748ED0 [ 30] "select * from "PUB"."<TableName>""
SDWORD 30
SQL Server Ente b50-bd4 EXIT SQLExecDirectW with return code -1 (SQL_ERROR)
HSTMT 019E46E8
WCHAR * 0x02748ED0 [ 30] "select * from "PUB"."<TableName>""
SDWORD 30
DIAG [S1000] [DataDirect][ODBC PROGRESS driver][PROGRESS]Failure getting record lock on a record from table PUB.<TableName>. (-210015)
CAUSE:
This is expected behaviour from a Progress perspective and is caused by the Microsoft SQL DTS package issuing a "SELECT * on PUB.<TableName>" query that requires a table lock. The table lock comes into contention with the existing EXCLUSIVE-LOCK being held by a 4GL user, causing the error message. This is how locking works and the same behaviour is reproducible in a pure 4GL environment as well.
FIX:
There is no real fix and the product is behaving as expected. The problem must be worked around.
For example, have the DTS package write records to a temporary table in the Progress database that is no accessed by 4GL users and insert the records into the Progress table via a 4GL procedure that does not require the table-lock.