I have a scheduled agent which runs every hour on the server - with the “Run on server” specified to a server. In the vast majority of cases, this agent executes properly. However, in isolated cases, this agent seems to start and, during execution, start again!!!
Is this possible, and if so, how do I prevent it. The agent uses ODBC to insert and update records in a DB2 database, and I am getting record duplications there.
Looking at the server log, messages from the agent also definitely indicate that more than one instance of the agent is actually executing.
Need some assitance urgently on this.
Subject: Scheduled agent runs multiple instances concurrently?
My first guess would be you have two copies of the database on that server.
Subject: RE: Scheduled agent runs multiple instances concurrently?
Thanks for the reply Graham, but that is a negative. There is only one copy of the db on the server.
This situation seems to occur at times of high server load, or when the Windows server gets busy (eg. doing backup or something).
I had a thought that there was a possibility that server clustering might cause this (not sure if the server is part of a cluster - this is Government and we mere developers cannot get access to the admin features). Is it possible that if an agent execution is being delayed, the agent will automatically restart on another server in a cluster (ie. run on both)? If the answer to this is yes - will messages from both executions appear in the one server log?
If the previous suggestion is nonsensical, then is there a possibility of some form of “memory leak/overflow/general gremlin” which would cause the Agent Manager to restart an agent currently executing?
Subject: RE: Scheduled agent runs multiple instances concurrently?
It sounds like you have a clustered server. I vaguely remember we had a similar problem once. Get that confirmed, and move the agent somewhere else.