SQL maintenance script to archive a job in db

Will flag "archived" all commands, tasks, taskgrousp, nodes etc related to a specific node id