I'm a DBA for an AX deployment, and lately some of our nightly AX batch jobs have been failing. The developers have been asking me about index maintenance, which, due to the highly volatile nature of our data, I do run nightly (but only on indexes which meet the thresholds for fragmentation). The error is "Could not complete cursor operation because the table schema changed after the cursor was declared."
This doesn't make sense to me, because I don't take any tables offline, and this is SQL 2014 Enterprise Edition. I'm taking pagelocks, but that's it. I'm not adding or dropping indexes. At most, there could be some extended blocking - perhaps some data could move to a different page, but I would expect a different error.
What's the best way to get index maintenance in, AND get the nightly batch jobs done? They both have to happen.
Any insight would be appreciated!
