Question

Aurena Logins

  • 28 October 2020
  • 7 replies
  • 2528 views

Userlevel 3
Badge +7

Hi,

One of our customers is asking the following.  Is this possible in Aurena?

“Is there a view to look at and/or extract that shows IFS Aurena logins, date, and person in IFS?  Want to use it as a KPI for tracking account managers use of IFS Aurena CRM. “

Thanks,

 

Jo


7 replies

Userlevel 2
Badge +8

We created a logon trigger that inserts each log on  into a user table.   See below     then we created an view that matches that data up with dba_users and fnd_user      this gives us the info we need to see the login frequencies. 

 

 

CREATE OR REPLACE TRIGGER logon_audit_trigger
AFTER LOGON ON DATABASE
BEGIN
insert into cb_user_log values(
   user,
   sys_context('USERENV','SESSIONID'),
   sys_context('USERENV','HOST', 30),
   sysdate,
   to_char(sysdate, 'hh24:mi:ss')
);
COMMIT;
END;
 

Allan 

Userlevel 3
Badge +7

Thank you for this...much appreciated.  Can you elaborate a little more on how to do this?  How do you create the table to insert this info?  Am I understanding this correctly?

Thanks,

Jo

Userlevel 2
Badge +8

We did create a table it is called cb_user_log     (CB) is our normal prefix to identify our items.    It has the fields User, Session id, Host, Logon_day,  and Logon_time.       We then activated the trigger to capture this info at login time.    We then created an IAL that connects this data with also the views (Oracle_account and fnd_user) so that we can get further information.   We then have quick reports in IFS that allow us to see the information. 

Allan

Userlevel 2
Badge +8

here is the table definition for what we created

-- Create table
create table CB_USER_LOG
(
  user_id    VARCHAR2(60),
  session_id NUMBER(20),
  host       VARCHAR2(60),
  logon_day  DATE,
  logon_time VARCHAR2(40)
)
tablespace IFSAPP_DATA
  pctfree 10
  initrans 1
  maxtrans 255
  storage
  (
    initial 64K
    next 1M
    minextents 1
    maxextents unlimited
  );
-- Grant/Revoke object privileges 
grant select on CB_USER_LOG to IFSINFO with grant option;
grant select on CB_USER_LOG to IFS_READ_ONLY;

 

 

Remember that the CB_USER_Log is what  We called the file in our system.

 

Also that grants to IFS Read Only is a security role on our system    You would need your own query role to assign it to.  

Allan

Badge +2

which app this code run ?

Badge +2

please guide me im beginner

 

Userlevel 7
Badge +21

@Mr.Hassan This seems to me for all IFS Application versions.

When using Aurena (IFS21 and up) with a cloud provider, you will need to use the BuildPlace to create the table and the trigger.

Maybe you can explain what you mean with beginner: In IFS, in IFS21 (or up), in PL/SQL, in Oracle?

Reply