Written by

Senior Cloud Architect at InterSystems
MOD
Question Eduard Lebedyuk · May 23, 2017

How to get the time of Business Service start

I have a business service and I want to know when did the current business service job started.

Is there a way to get this information from Ensemble?

Comments

Amir Samary · May 23, 2017

Hi Eduard!

Here is a simple way of finding it out:

select top 1 TimeLogged from ens_util.log

where configname='ABC_HL7FileService' 

and SourceMethod='Start' 

and Type='4' --Info

order by %ID desc

You put the logical name of your component on the configname. There is a bitmap index on both Type and ConfigName so this should be blazing fast too! Although, for some reason, the query plan is not using Type:
 
Relative cost = 329.11
    Read bitmap index Ens_Util.Log.ConfigName, using the given %SQLUPPER(ConfigName), and looping on ID.

    For each row:
    - Read master map Ens_Util.Log.IDKEY, using the given idkey value.
    - Output the row.
     
    Kind regards,
    AS
    0