added AgentRepairCode to clear database action