Question: I'm having a problem with an index rebuild job , which is failing on tables with Computed Columns. I've read ALTER INDEX failed due to QUOTED IDENTIFIER set to OFF which details a solution for situations of computed columns, xml data type and LOB data types.
Related Articles
How can I find the computed columns on sql tables?
Answer: These are two ways in which you can identify the computed columns. One method is through the sys.columns and the other through sys.computed_columns .
sys.computed_columns has the benefit of not requiring you to use the "is_computed = 1" predicate.
Method 1 - sys.columns
SELECT * FROM sys.columns WHERE is_computed = 1 AND object_id = OBJECT_ID('My_Table')
Method 2 - sys.computed_columns
SELECT * FROM sys.computed_columns WHERE object_id = OBJECT_ID('My_Table')