Author Topic: last modified by...  (Read 1252 times)

Zvolensky

  • EA User
  • **
  • Posts: 62
  • Karma: +0/-0
  • Do... or do not. There is no try.
    • View Profile
last modified by...
« on: March 07, 2017, 01:20:07 am »
Hello
Is there a way (an SQL query, we have repository in MS SQL) to find out who modified and object?
I can run a query which will give me time of the last modification, but not by whom. We do have full audit enabled.
Is there a way to have a query like
number of objects modified in last 24 hours grouped by users who performed the modifications

Thank you

qwerty

  • EA Guru
  • *****
  • Posts: 9425
  • Karma: +150/-138
  • I'm no guru at all
    • View Profile
Re: last modified by...
« Reply #1 on: March 07, 2017, 08:41:30 am »
You need to turn on audit which logs the user name altering elements. Alternatively you could use database triggers if you don't need all the logging overhead of the audit.

q.

Zvolensky

  • EA User
  • **
  • Posts: 62
  • Karma: +0/-0
  • Do... or do not. There is no try.
    • View Profile
Re: last modified by...
« Reply #2 on: March 07, 2017, 05:04:58 pm »
Hello
As said, i have full audit enabled. But is there a way to link using a query the data from the audit to get to an output as i have described?
I have few queries running daily and sending out emails with output for KPI and Health checks to management to to show the progress, this one would be helpful

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 8204
  • Karma: +193/-23
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: last modified by...
« Reply #3 on: March 07, 2017, 06:11:09 pm »
Using SQL only it's going to be difficult to query the auditing data.
The auditing data is stored in t_snapshot. You can relatively easy find the items that were changed, but in order to interpret the data you'll have to read the BinContent fields, which are probably base64 encoded zipped strings.

Using scripting or an add-in it should not be too difficult to get the information you need though.
I've done some similar things with scripting getting shapescripts out of MDG files. See https://github.com/GeertBellekens/Enterprise-Architect-VBScript-Library/blob/master/Framework/Tools/Script%20Management/ExtractShapescriptsFromMDG.vbs

Geert

Zvolensky

  • EA User
  • **
  • Posts: 62
  • Karma: +0/-0
  • Do... or do not. There is no try.
    • View Profile
Re: last modified by...
« Reply #4 on: March 07, 2017, 06:17:00 pm »
Hello Geert
Thank you! we will take look at it.