Now this is weird, I have an agent in script that goes through a lot of databases and does changes the server on which to run on the agents. Because some databases don’t have agents (which crashed the agent) and some databases we don’t have access, we put and error handling thing so that if an error happens during the processing of a database, we skip to the next.
For some reason we cannot understand, the error handling happpens correctly for the first error, but the second time, the On Error does not execute and the agent just crashes on the line where the error occurs and returns the “Variable not set” error…
Why would the On Error occur once, but not for all errors? Anyone have a theory?