The error: "Index was outside the bounds of the array" at SQL Server 2014 on Azure with new SSMS?

2.6k views Asked by At

Index was outside the bounds of the array

While it may seem to be answered already, I have found only the solutions like "install the new SSMS", or new patch to SQL Server 2008...

I my case, I am using SQL Server 2014 installed on Azure (12.0.2000), and SQL Server Management Studio v18.6 (15.0.18338.0) installed at the related virtual machine with Windows Server 2019 Datacenter.

The query worked at the same SQL Server on-premises, even though is a bit newer (12.0.6118.4).

Another difference may come from differences when querying 3rd party database. That is, on-premise the query uses 3-part name of the table, on Azure the query 2-part name of the external table.

One more detail: the query (Microsoft Dynamics Nav database) may be somehow specific. It uses the self-join of the Customer database like this (simplified).

SELECT [the selection of columns]
FROM dbo.[company$Customer] AS cu
LEFT OUTER JOIN dbo.[company$Customer] AS cu_billto
             ON cu.[Bill-to Customer No_] != ''
             AND cu_billto.No_ = cu.[Bill-to Customer No_]
WHERE cu.timestamp > @max_ts     -- only the modified records
   OR cu_billto.timestamp > @max_ts  -- or with modified bill-to record

The @max_ts is of binary(8) type, and it is the maximum rowversion value from the previous run.

Is it a well-known problem? Would the new build of the SQL Server fix the error? (I cannot do that on my own. I have to ask someone else to do that, and I want to be sure whether it is necessary.) Any other idea?

0

There are 0 answers