We have a sql batch script which runs as cron job on unix. The script gives error at some point saying 'The schema of the table T1 has changed since the compilation of query. Please rerun your command'
The tables used have not changed for years.. The script uses #tables. We also noticed that DBCC runs when this job is running.
Does anyone have any idea what this error could be?
I have seen this error but it has been a while. Are update statistics running at the same time? It seems like it was related to update statistics being run on the table. After sp_recompile was run on the table the error disappeared.