i wrote a CLR Procedure to do a similar work:
stpParallel_Processing:
Parameters:
SqlString Ds_Database, (Database Name)
SqlString Ds_Procedure, (Procedure Name)
SqlString Ds_Table, (Table Name)
SqlInt32 Qt_Threads, (Numbers of Threads)
SqlInt32 Fl_Return (Return status)
the idea:
...