I think BPATaskSession table holds below attributes, you can use it. But not sure does this allow direct write permission from sql:
BPATaskSession The assignation of a process / resource to a task - a ""session"" in scheduler. Field: TaskID,processid, id and resourcename should be something to consider.