Quantcast
Channel: Infosys-Oracle Blog
Viewing all articles
Browse latest Browse all 561

Essbase Users Last Login Time Using API

$
0
0

Essbase Users Last Login Time Using API

             I was working for one of our Retail customers who were using Essbase applications 11.1.1.3 for Actuals, Budget and forecast month end reporting. There are several business users are provisioned to access the application based on their role. Only few users might be accessing the Essbase application regularly and other users access the application only if there is any need for reporting. To use the number of license efficiently, Business admin wanted to find out User's last login time details which helps the business to remove the inactive users from the application. Usually I export the security file in the readable format and do lot of manual work to pull the user last login time details. I guess now it is very easy to get the last login time from the EAS console in the latest release. But it was not possible in the older version. So I have written Essbase API scripts to automate this extraction of users' login details from Essbase application.

Hyperion Essbase API:

              The Essbase API is an interface that provides powerful features such as application and database administration. The Essbase OLAP user's details can be extracted using this Essbase API programs and this API programs can be run from the server machine and don't need to concern about where the server is located. I have developed this Essbase user's last login time tool using this Essbase API programs.

Business Requirements:

              There are more than 300 users are provisioned to access the Essbase application for reporting, but only few users connect into the Essbase application regularly. So Business has requested us to find out if there are any inactive users based on their last login time. The last login time helps the business to revoke application access if those users are no longer using the application. 

Generally the last login time details is stored in Essbase security file. If we use this file to get the timing details, it will require lot of effort to convert the raw data into information. But this Essbase Users Last Login time tool helps to automate the process of pulling login timing details for every user and this tool has resulted in lot of effort savings.

Essbase users last login time extraction


The Essbase API Java programming is used to develop the user's Last login time extraction tool which can extract the last login time for every user provisioned in Essbase application.

             The below are the Essbase API packages which are used to develop the tool:

com.essbase.api.base.*;

com.essbase.api.datasource.*;

com.essbase.api.domain.IEssDomain;

com.essbase.api.metadata.*;

com.essbase.api.session.*;

com.essbase.api.dataquery.*;

com.essbase.api.domain.*; 

Pseudo Code

 

I have written a simple java program and included the below pseudo code to get the user login details. Below section explains about the pseudo code used for building the Users last login extraction tool.

1.    Connecting to Essbase Server


The user name, password, OLAP server name and the provider services URL should be passed as parameters to sign on into Essbase applications.

In the below Sample code, the Essbase server connection is created.

acceptArgs(args);

/**Please provide username, password, and provider services URL**/

SignOn(Name, PWD, false, null,NULL);

GetOlap Server()

// Provide olap server name

Connect(); //creates connection with Essbase server.

 

2.    Getting OLAP users


The method "getOlapUsers ()" is used to get the last login time of all the Essbase users. It extract all the users of OLAP server and their login details. Users might be granted access to either Essbase or Essbase & Planning applications. Based on the application, application type is updated.

static void getOlapUsers(IEssOlapServer olapServer) throws IOException

          {

                    //create a file object and initiate it

                   fileWriterObj = new FileWriter("Essbase_Users_LastLogin.xls");

                   //Create new file - Essbase_Users_Last_Login.xls

           try

          {

Get Olap Users(null, null, null, false);

//Iterator to get all the Essbase users.

              int length = users.getCount();

              for(int i=0; i < length; i++)

                   {

                     fileWriterObj.append(usr.getName()+"\t");

                   //Get name of the user

                   fileWriterObj.append(convertTime(usr.getLastLoginDate())+"\t");

                   //Get the last login time and date. converTime() method corrects the format of date and time.

            }

            }

        catch (Exception x)

          {          System.out.println("\n::GetOlapUsers:: failed with error:");

        }   }

 

3.    Convert Time:


The convertTime() method is implemented to get the correct date/time format of last login time.

 public static String convertTime(long time)

          {        if (time == 0) {        return "NeverLoggedIn";               }

                   else    {

                             return format.format(date)//Converted into readable date format

                   }

          }

         

4.   Produce the results


I have created a batch scripts to call this Java program. The Java class path should be set before executing it. I executed the script and the list is produced for all users with their last login time. User's access can be revoked if they are no longer using the Essbase application.

Example

 

The below is the example of last login time for the few users which is extracted using Essbase users last login time tool.

Essbase Users last login time:

  User Name

Last Login Time

Application Type

UserA

4/28/2017 01:00 PM

Essbase

      UserB

NeverLoggedIn

Essbase and Planning

UserC

9/30/2016 5:00 PM

Essbase

 

 

Conclusion:

This blog helps to understand about how the users last login time can be extracted from Essbase application using Essbase Java API.

Reference(s)

1.    Oracle Documentations https://docs.oracle.com/cd/E40248_01/epm.1112/aps_java_api/com/essbase/api/metadata/IEssCubeOutline.html

 


Viewing all articles
Browse latest Browse all 561

Trending Articles