Cannot update spatial index RRS feed

  • Question

  • Hi,

    I encountered a strange issue with spatial indexes on SQL Server 2008 SP1. I created a new table with a column of type 'geography'. I used to save cooridinates in another table and I want the coordinates to be updated in the new table when rows are inserted or updated in the old table. So I created two triggers on the old table which update the geography column in the new table.

    The solution works fine without spatial indexes. However when I create a spatial index on the geography column in the new table, I get the following error:

    UPDATE failed because the following SET options have incorrect settings: 'ARITHABORT'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or filtered indexes and/or query notifications and/or XML data type methods and/or spatial index operations.

    I found out, that the ARITHABORT option must be set in a different batch, so executing 'SET ARITHABORT ON' in the trigger won't work. Is there a workaround for this issue or some other way to update indexed spatial columns in triggers?


    Tuesday, January 19, 2010 8:10 AM