Progress Auditing

Stefio Almeida

New Member
Hi Forum,

I have been struggling to decipher the following issue that relates to Application Context feature of Progress Auditing.

When I run below code from Progress Editor, I do not see record in _aud-audit-data table.

Code:
define variable gcAppContext as character no-undo.

gcAppContext = AUDIT-CONTROL:SET-APPL-CONTEXT("foo1.p").

disp AUDIT-CONTROL:APPL-CONTEXT-ID format "x(25)".

pause.

AUDIT-CONTROL:LOG-AUDIT-EVENT(32001,"foo1.p").

for each _aud-audit-data no-lock
where _audit-data-guid = AUDIT-CONTROL:APPL-CONTEXT-ID :
   display _aud-audit-data._Event-context.
end.
This works fine in another environment (snapshot below). What could cause this ?
1974

Thank you in advance for your time.
 

Attachments

Cringer

ProgressTalk.com Moderator
Staff member
I'm a little hazy on auditing, but I believe you have to be authenticated with the database as a user with auditing rights in order to access auditing data. So I would check the rights on the database that works vs the one that doesn't.
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
I would expect that if your user didn't have Audit Administrator or Audit Data Reporter privilege then the code wouldn't compile. You would get ** Insufficient access privilege for table _aud-audit-data. (234).

I would first check that both environments have the same list of audit events and policies loaded and active.
 

Stefio Almeida

New Member
Sorry for the late update. This issue was solved by Deleting and recreating the Audit Event, followed by reboot of Database. This activity was recommended by Progress using Audit Policy Maintenance Tool. But it is a windows based only (strange). Following script was given for Linux to achieve the same.
Code:
/* script start */
def var i as int.

DO TRANS:

    FIND FIRST _aud-audit-policy WHERE _audit-policy-name = "Application".
    DISP _audit-policy-name.

    FIND FIRST _aud-event-policy OF _aud-audit-policy WHERE _event-id = 31998.
    DISP  _event-id.
    DELETE _aud-event-policy.

END.

DO TRANS:
   
      REPEAT i = 1 TO NUM-DBS:
    AUDIT-POLICY:REFRESH-AUDIT-POLICY(LDBNAME(1)).
    END.

END.
       
       
DO TRANS:
  FIND FIRST _aud-audit-policy WHERE _audit-policy-name = "Application".
  CREATE  _aud-event-policy.
  ASSIGN  _aud-event-policy._audit-policy-guid = _aud-audit-policy._audit-policy-guid
          _aud-event-policy._event-id = 31998
          _aud-event-policy._event-level = 1.
  RELEASE _aud-event-policy.
END.


DO TRANS:
   
      REPEAT i = 1 TO NUM-DBS:
    AUDIT-POLICY:REFRESH-AUDIT-POLICY(LDBNAME(1)).
    END.
   
END.
/* script end */
 
Last edited by a moderator:
Top