I have an SDE maintenance script that has been working flawlessly on a number databases. I recently added another DB to my maintenance list, and for this one, the script bombs during the "arcpy.RebuildIndexes_management" step. The error is:
Could not rebuild indexes for dataset MYDB.dbo.myunsuspectingdatabaseView.[Operation Failed]
It fails when encountering a view!
Any idea under which circumstances that would happen? I have lots of views in my databases. While names don't always clearly indicate what's view (and I certainly wasn't the one to create them all), they can always be identified in SSMS under "view" or by the lower case "dbo" schema identifier (SQL Server). I have not run into this problem with views in any other database.
Any idea what might be going on here? I suppose I could create some sort of exclusion list and skip these objects but I'd like to understand what the problem is.