Timer connection vs User connection

Hi there,

Since timers in Outsystems run as web requests under the hubruntime db user, is there any way for me to tell the difference, inside SQL Server, if a connection is from a timer or a user? 

I was running this query, but I see no way to tell the difference:

SELECT
    c.session_id, c.net_transport, s.status, s.host_name, s.program_name, s.client_interface_name, s.login_name, c.connect_time, s.login_time
FROM sys.dm_exec_connections AS c JOIN sys.dm_exec_sessions AS s ON c.session_id = s.session_id
where login_name = 'hubruntime'
ORDER BY c.connect_time


regards

Hi Gonçalo,


I really don't know how to do it at user level, but,is it a solution to use a field or a tag where you can send the value (timer or user) to the database? A boolean or something like that...


Best regards,

Ricardo M Pereira

Hello Gonçalo.

The question is why you need to discriminate? If you need SQL to prioritize requests from users, then the query or table is not in great shape.

SQL shoud be agnostic.

I don't really NEED to discriminate.

I was just wondering if there is a way to. I want to be able to distinguish between quantity of user conections versus quantity of timer connections.