01-11-21 11:18 AM
Answered! Go to Answer.
01-11-21 01:53 PM
This should approximate the control room view. The where clause can be adjusted to get specifically the sessions you're looking for.
select top (500)
s.sessionnumber [ID],
p.name [Process],
rr.name [Resource],
IsNull(su.username, '[' + su.systemusername + ']') as [User],
st.description [Status],
DateAdd(second, s.starttimezoneoffset, s.startdatetime) [Start Time],
DateAdd(second, s.endtimezoneoffset, s.enddatetime) [End Time],
s.laststage [Latest Stage],
DateAdd(second, s.lastupdatedtimezoneoffset, s.lastupdated) [Last Updated]
from
BPASession s
left join BPAProcess p on s.processid = p.processid
left join BPAResource rr on s.runningresourceid = rr.resourceid
left join BPAUser su on s.starteruserid = su.userid
left join BPAStatus st on s.statusid = st.statusid
where
st.description not in ('Debugging', 'Archived')
order by
DateAdd(second, s.starttimezoneoffset, s.startdatetime) desc
01-11-21 01:53 PM
This should approximate the control room view. The where clause can be adjusted to get specifically the sessions you're looking for.
select top (500)
s.sessionnumber [ID],
p.name [Process],
rr.name [Resource],
IsNull(su.username, '[' + su.systemusername + ']') as [User],
st.description [Status],
DateAdd(second, s.starttimezoneoffset, s.startdatetime) [Start Time],
DateAdd(second, s.endtimezoneoffset, s.enddatetime) [End Time],
s.laststage [Latest Stage],
DateAdd(second, s.lastupdatedtimezoneoffset, s.lastupdated) [Last Updated]
from
BPASession s
left join BPAProcess p on s.processid = p.processid
left join BPAResource rr on s.runningresourceid = rr.resourceid
left join BPAUser su on s.starteruserid = su.userid
left join BPAStatus st on s.statusid = st.statusid
where
st.description not in ('Debugging', 'Archived')
order by
DateAdd(second, s.starttimezoneoffset, s.startdatetime) desc
01-11-21 05:03 PM
01-11-21 05:27 PM
02-11-21 05:49 AM
03-11-21 04:53 PM
15-11-21 06:58 AM
15-11-21 07:03 AM
15-11-21 06:12 PM