AnsweredAssumed Answered

PI OLEDB "Assertion failed" error when querying [db1].[Asset].[ElementAttribute]

Question asked by torsteins on Jul 22, 2015
Latest reply on Oct 28, 2016 by AlexCote

I am using OLEDB Enterprise to import data from PI AF to Microsoft SSRS. My assets are organized in two different AF databases; db1 and db2. A couple of days ago, all queries on db1 suddenly started returning errors. Using PI SQL commander I have been able to pin point the issue to queries on the [db1].[Asset].[ElementAttribute] table.

 

The queryies to db2 return successfully, but queries to db1 gives an assertion error:

SELECT * FROM [db2].[Asset].[ElementAttribute]
OPTION (ALLOW EXPENSIVE)


Successfully returns 40117 rows

 

SELECT * FROM [db1].[Asset].[ElementAttribute]
OPTION (ALLOW EXPENSIVE)

Assertion failed: type == At_Object || (type & At_Array) != 0

 

Queries to other tables in db1 database return successfully

SELECT COUNT(*) FROM [db1].[Asset].[Element]
OPTION (ALLOW EXPENSIVE)

6276

 

I am able to retrieve some data from db1 when I use the TOP statement and no sorting.

SELECT TOP 26999 * FROM [db1].[Asset].[ElementAttribute]
OPTION (ALLOW EXPENSIVE)

Successfully returns 26999 rows

 

But, when I increase this number to 27000, the same error message is returned

SELECT TOP 27000 * FROM [db1].[Asset].[ElementAttribute]
OPTION (ALLOW EXPENSIVE)
 
Assertion failed: type == At_Object || (type & At_Array) != 0

 

Have anyone else experienced the same problem? Why does this assertion error occur and how can I proceed to investigate?

Outcomes