Deletion of useless nodes in agent schedule by query in DB
After a server migration, the agent schedule needs to be set up on the new nodes. Since its tedious to do manually, to do this, we usually delete all the agent schedule by executing a delete query on the table pr_data where pxobjclass = 'Data-Agent-Queue'. This has a disadvantage that the new nodes and old nodes both get deleted. Thus when the new agent schedules are again generated from the agent, the configuration in the agent mandates configuration of the new agent schedules.
Since the agent rules are locked by the development teams(they are part of a common jar for multiple applications using common agents), as an admin i have to work only with agent schedules. Thus when there are certain agent schedules which are needed to be switched off by me or on by me after such migrations for an app, i have to revisit every agent and turn them off since most of them are kept on in the common framework of agent.
Is there a better way to handle this scenario as an admin.
Thanks for your reply. I did work it out this way. The old nodes get deleted but along with the tuned configurations in them. Hence then again i am on to the same task of opening every agent schedule and configuring them to the old set up. Thus if its a production or uat set up involving multiple nodes, imagine the amount of time spent on such a task.
I was thinking along the lines of preserving the old set up of agent schedule either in data base or an extracted sheet and an automated way of importing such old configuration easily on each of those nodes automatically rather than manually.
Any architectural solutions that could be implemented on this problem is appreciated.