OpenQuery for DB2 / AS400 from SQL Server 2000 causing locks

Every morning we have a process that issues numerous requests (~ 10000) to DB2 on the AS400 / iSeries / i6 (regardless of what it currently calls), over the past 2 months, operators complained that our request was blocking a couple of files. preventing the completion of their night processing. Queries are very simplified, for example

Select [FieldName] from OpenQuery('<LinkedServerName>', 'Select [FieldName] from [LibraryName].[FieldName] where [SomeField]=[SomeParameter]')

I am not an expert on the iSeries side of the house and wondered if anyone had any understanding of lock escalation in terms of AS400 / Db2. The identifier that causes the lock was confirmed as the identifier with which we registered our linked server, and we know it most likely because [Library] and [FileName] correspond to the request that we issue.

It has just begun recently. Is it possible that our select statements, which cause the AS400 to escalate locks? The problem is that they are not produced without manual intervention.

+3
source share
3 answers

Try adding “REQUEST ONLY” to the query, then it will not block the records as they are received.

+3
source

AS/400 RPG/COBOL/JPL ( ). , . , , ... . excel sql /400 . , .

0

You may have control over the targets, causing a block to be read again. Check the SQL Server ODBC connection associated with <linkedServerName>to modify the commit control.

0
source

Source: https://habr.com/ru/post/1698314/


All Articles