Stored procs breaking overnight

Posted by Chad on Stack Overflow See other posts from Stack Overflow or by Chad
Published on 2010-04-26T13:59:57Z Indexed on 2010/04/26 14:03 UTC
Read the original article Hit count: 215

We are running MS SQL 2005 and we have been experiencing a very peculiar problem the past few days.

I have two procs, one that creates an hourly report of data. And another that calls it, puts its results in a temp table, and does some aggregations, and returns a summary.

They work fine...until the next morning.

The next morning, suddenly the calling report, complains about an invalid column name.

The fix, is simply a recompile of the calling proc, and all works well again.

How can this happen? It's happened three nights in a row since moving these procs into production.

© Stack Overflow or respective owner

Related posts about sql-server-2005

Related posts about stored-procedures