The reason for invalidation should be because of some DDL activity, but I don't have any DDL in the SPs. I need to find what is that DDL statement.
If the object is in an invalid state, when you call them it will change to valid and do the execution. In my case I only get the desired result if I recompile the invalid object. Why doesn't just calling the SP validate it?
I was told if there are compilation errors, then just calling the SP won't bring it to valid. If there are compilation errors then how come just recompiling fixes it? Compilation errors are caused by some syntax errors.
what are the causes of invalid objects?