OLE DB error: OLE DB or ODBC error: Invalid column name ‘xxx’.; 42S2
Yesterday I thought it would be a quick addition to add a new column to my Fact table. Then add the dimension to Analysis Services. And finally add the dimension to the cube. but I ran into the error below and after struggling for quite a while I found the issue.
NOTE: This is possibly one of many solutions.
- I had added a new column to my Fact Table.
- I had then created and processed the new dimension and that was all working fine.
- I then added the Dimension to the cube, and when I tried to process the cube I got the following error:
Server: The current operation was cancelled because another operation in the transaction failed.
Errors in the OLAP storage engine: An error occurred while processing the ‘TF Alert SCOM’ partition of the ‘TF Alert SCOM’ measure group for the ‘SCOM Alerts’ cube from the SCOM database.
OLE DB error: OLE DB or ODBC error: Invalid column name ‘AlertClosedID’.; 42S22.
Internal error: The operation terminated unsuccessfully.
- It too me ages to figure it out and I found that in the Partitions tab of the cube I had created aNamed Query for the binding Type
- The reason for the cube failing to process was because in the above query it would not include my new column. Which now makes sense with the error message saying that it cannot find or invalid column name.
- So to fix this you could do one of two things:
- Add the new column name to your query
- Or change your Query Binding query to Select * from TableName
i. This way if you ever added new columns it would automatically be included.
- I then went and processed the cube after adding the new column and it processed successfully.
Excellent Posting. You save me a lot of time. Thank you so much.
Great glad to help out.
Thanks Mate. This saved a lot of my time as well.
For some release, I created another copy of the production cube (for UAT) and edited the DSV to point to new version of tables and views (diferent names). Everything was fine, but still processing failed with ODBC error.
In the end your post saved the day !!
Hey there, really glad it helped you out and saved you some time!
I encountered the same issue. Fixed the partitions and forgot one.
Read your post and doubled checked everything to resolve the issue
Thank you
Glad you got it working and it helped you.