<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic RE: SQL query to fetch running automations in control room in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/SQL-query-to-fetch-running-automations-in-control-room/m-p/87089#M37850</link>
    <description>Thanks Vipul,&lt;BR /&gt;&lt;BR /&gt;I am just doing some POC regarding the BP db. I am not running this query frequently running on prod. Could you please suggest how we can achieve the same using cmd?&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Achyutam Mehta&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
    <pubDate>Mon, 15 Nov 2021 06:58:00 GMT</pubDate>
    <dc:creator>AchyutamMehta</dc:creator>
    <dc:date>2021-11-15T06:58:00Z</dc:date>
    <item>
      <title>SQL query to fetch running automations in control room</title>
      <link>https://community.blueprism.com/t5/Product-Forum/SQL-query-to-fetch-running-automations-in-control-room/m-p/87083#M37844</link>
      <description>Hi Team,&lt;BR /&gt;&lt;BR /&gt;Can we fetch the status of the current automation process status using SQL query? For example process xyz running in a control room now and process, abc is in pending status.&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What we are interested in fetching is the status of the control room but via SQL directly.&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Achyutam Mehta&lt;BR /&gt;Automation Developer&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Mon, 01 Nov 2021 11:18:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/SQL-query-to-fetch-running-automations-in-control-room/m-p/87083#M37844</guid>
      <dc:creator>AchyutamMehta</dc:creator>
      <dc:date>2021-11-01T11:18:00Z</dc:date>
    </item>
    <item>
      <title>RE: SQL query to fetch running automations in control room</title>
      <link>https://community.blueprism.com/t5/Product-Forum/SQL-query-to-fetch-running-automations-in-control-room/m-p/87084#M37845</link>
      <description>&lt;P&gt;This should approximate the control room view. The where clause can be adjusted to get specifically the sessions you're looking for.&lt;/P&gt;
&lt;PRE class="language-plsql"&gt;&lt;CODE&gt;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​&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Nicholas Zejdlik&lt;BR /&gt;RPA Developer&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Mon, 01 Nov 2021 13:53:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/SQL-query-to-fetch-running-automations-in-control-room/m-p/87084#M37845</guid>
      <dc:creator>NicholasZejdlik</dc:creator>
      <dc:date>2021-11-01T13:53:00Z</dc:date>
    </item>
    <item>
      <title>RE: SQL query to fetch running automations in control room</title>
      <link>https://community.blueprism.com/t5/Product-Forum/SQL-query-to-fetch-running-automations-in-control-room/m-p/87085#M37846</link>
      <description>[BPVSessionInfo] is also possible and unnecessary table joins could be avoided. Something like:&lt;BR /&gt;&lt;BR /&gt;SELECT &lt;BR /&gt;si.processname&lt;BR /&gt;,format(si.startdatetime,'yyyy-MM-dd HH:mm:ss') as starttime&lt;BR /&gt;,isnull(format(si.enddatetime, 'yyyy-MM-dd HH:mm:ss'),'running') as endtime &lt;BR /&gt;,si.runningresourcename&lt;BR /&gt;,case when si.statusid = 0 then 'Pending'&lt;BR /&gt;when si.statusid = 1 then 'Running'&lt;BR /&gt;when si.statusid = 2 then 'Terminated'&lt;BR /&gt;when si.statusid = 3 then 'Stopped'&lt;BR /&gt;when si.statusid = 4 then 'Completed'&lt;BR /&gt;when si.statusid = 5 then 'Debugging'&lt;BR /&gt;when si.statusid = 6 then 'Archived'&lt;BR /&gt;when si.statusid = 7 then 'Stopping'&lt;BR /&gt;when si.statusid = 8 then 'Warning' end as 'Status'&lt;BR /&gt;,si.sessionnumber&lt;BR /&gt;,si.lastupdated&lt;BR /&gt;,si.laststage&lt;BR /&gt;FROM [BluePrism].[dbo].[BPVSessionInfo] si&lt;BR /&gt;where cast(si.startdatetime as date) &amp;gt;= cast(getdate() as date)&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Jan Piwowarski&lt;BR /&gt;Developer&lt;BR /&gt;Commerzbank AG&lt;BR /&gt;Europe/London&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Mon, 01 Nov 2021 17:03:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/SQL-query-to-fetch-running-automations-in-control-room/m-p/87085#M37846</guid>
      <dc:creator>al2piwo</dc:creator>
      <dc:date>2021-11-01T17:03:00Z</dc:date>
    </item>
    <item>
      <title>RE: SQL query to fetch running automations in control room</title>
      <link>https://community.blueprism.com/t5/Product-Forum/SQL-query-to-fetch-running-automations-in-control-room/m-p/87086#M37847</link>
      <description>Please be mindful of any additional load you may be adding with external queries. You don't want to affect the performance of your digital workforce with excessive querying of a Production database.&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;John Carter&lt;BR /&gt;Professional Services&lt;BR /&gt;Blue Prism&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Mon, 01 Nov 2021 17:27:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/SQL-query-to-fetch-running-automations-in-control-room/m-p/87086#M37847</guid>
      <dc:creator>John__Carter</dc:creator>
      <dc:date>2021-11-01T17:27:00Z</dc:date>
    </item>
    <item>
      <title>RE: SQL query to fetch running automations in control room</title>
      <link>https://community.blueprism.com/t5/Product-Forum/SQL-query-to-fetch-running-automations-in-control-room/m-p/87087#M37848</link>
      <description>&lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/27085"&gt;@AchyutamMehta&lt;/a&gt; Instead of SQL query why dont you try CMD commands to achieve the same ?&amp;nbsp;&lt;BR /&gt;Also i am hoping you are not running these queries on main production database , as you can end up with shutting up the completed prod due to this .&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;------------------------------&lt;BR /&gt;Vipul Tiwari&lt;BR /&gt;Senior Process Simplification Developer&lt;BR /&gt;Amazon&lt;BR /&gt;------------------------------&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Tue, 02 Nov 2021 05:49:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/SQL-query-to-fetch-running-automations-in-control-room/m-p/87087#M37848</guid>
      <dc:creator>EVIPUTI</dc:creator>
      <dc:date>2021-11-02T05:49:00Z</dc:date>
    </item>
    <item>
      <title>RE: SQL query to fetch running automations in control room</title>
      <link>https://community.blueprism.com/t5/Product-Forum/SQL-query-to-fetch-running-automations-in-control-room/m-p/87088#M37849</link>
      <description>I disagree; I have been running SQL queries against the Blue Prism production database for a number of years, some of which extract reports and are a little hefty. I don't see a problem with querying the database directly for information. The only caveat is that the database structure may change on newer versions of Blue Prism, although the core tables tend to remain the same. I would only look at query optimization if it is in fact a problem, and I would avoid any hard rule that says not to query the database directly.&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Nicholas Zejdlik&lt;BR /&gt;RPA Developer&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 03 Nov 2021 16:53:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/SQL-query-to-fetch-running-automations-in-control-room/m-p/87088#M37849</guid>
      <dc:creator>NicholasZejdlik</dc:creator>
      <dc:date>2021-11-03T16:53:00Z</dc:date>
    </item>
    <item>
      <title>RE: SQL query to fetch running automations in control room</title>
      <link>https://community.blueprism.com/t5/Product-Forum/SQL-query-to-fetch-running-automations-in-control-room/m-p/87089#M37850</link>
      <description>Thanks Vipul,&lt;BR /&gt;&lt;BR /&gt;I am just doing some POC regarding the BP db. I am not running this query frequently running on prod. Could you please suggest how we can achieve the same using cmd?&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Achyutam Mehta&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Mon, 15 Nov 2021 06:58:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/SQL-query-to-fetch-running-automations-in-control-room/m-p/87089#M37850</guid>
      <dc:creator>AchyutamMehta</dc:creator>
      <dc:date>2021-11-15T06:58:00Z</dc:date>
    </item>
    <item>
      <title>RE: SQL query to fetch running automations in control room</title>
      <link>https://community.blueprism.com/t5/Product-Forum/SQL-query-to-fetch-running-automations-in-control-room/m-p/87090#M37851</link>
      <description>Thanks &lt;SPAN&gt;Nicholas,&lt;BR /&gt;&lt;BR /&gt;How often we can run query in production in one day? Does it impact prod performance?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Achyutam Mehta&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Mon, 15 Nov 2021 07:03:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/SQL-query-to-fetch-running-automations-in-control-room/m-p/87090#M37851</guid>
      <dc:creator>AchyutamMehta</dc:creator>
      <dc:date>2021-11-15T07:03:00Z</dc:date>
    </item>
    <item>
      <title>RE: SQL query to fetch running automations in control room</title>
      <link>https://community.blueprism.com/t5/Product-Forum/SQL-query-to-fetch-running-automations-in-control-room/m-p/87091#M37852</link>
      <description>It really depends on the situation, how heavy the queries are, how frequently you run them, what your database server hardware is capable of handling, etc. Personally I wouldn't think too much in depth about it unless you're very frequently running a heavy query. For example, most of the queries I have running against the Blue Prism database are run probably 6-10 times per minute. But these are small queries; things to retrieve the status of robots, check the number of items pending, etc., things that only take one or two logical reads per run. On the other hand, I have dashboard that auto-refreshes every minute, which takes about 35k reads per run, but it entirely unnoticeable performance-wise.&lt;BR /&gt;&lt;BR /&gt;Context is really the deciding factor in determining what you can run and how often. But as the saying goes, premature optimization is the root of all evil. Personally, if I was running either of the queries that myself or Jan came up with, I wouldn't worry about it.&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Nicholas Zejdlik&lt;BR /&gt;RPA Developer&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Mon, 15 Nov 2021 18:12:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/SQL-query-to-fetch-running-automations-in-control-room/m-p/87091#M37852</guid>
      <dc:creator>NicholasZejdlik</dc:creator>
      <dc:date>2021-11-15T18:12:00Z</dc:date>
    </item>
  </channel>
</rss>

