How to Query the Audit Tables

Our Production system is suffering performance issues which we attribute to the large volume of records in the audit tables. We want to implement an archival solution to alleviate this, which would involve transferring older audit records to a separate database. To achieve this, we need to write SQL queries against the <app>DATAAUDIT and <app>TASKAUDIT tables in the HFM database. We are aware that we need to join other tables to see descriptions, e.g. <app>SCENARIODESC. We have also deduced the translation of Activity Codes from "HFMAuditExtractSchemaDefs.xml", which accompanies the HFM Audit Extract Utility.
Unfortunately, there are some things which we do not know how to translate:
1) Period (lPeriod) on the <app>DATAAUDIT table, e.g. 67108869 but need to show "Jun" etc.
2) User (ActivityUserId) on the <app>TASKAUDIT table, e.g. -329543984
3) Module (strModuleName) on the <app>TASKAUDIT table, e.g. #@RID@#19
Can anyone advise how we should translate these pieces of data in order to give similar results to those seen on the Data Audit and Task Audit screens in Workspace?

1.) Period - I'm not sure where this is coming from, but I'm pretty confident it is not sitting in the database which I find odd. I want to find this as well, but haven't had any free time to search around, sorry.
2.) User - This one I can help you with.
--Get Task Item Data by Hour for a given day by user
select datepart(HOUR, cast(endtime-2 as smalldatetime)), count(activitycode) from <APP_NAME>_task_audit where activitycode in (1,4,6,8,9,12,14,15,16,21,23,44) and cast(endtime-2 as smalldatetime) between '2011-12-7 00:00:00' and '2011-12-7 23:59:59' and ActivityUserID in (select lUserID from HSV_ACTIVITY_USERS where sUserName = '<USER_NAME>') group by datepart(HOUR, cast(endtime-2 as smalldatetime))In the sample SQL Query above, I am looking for all of the task audit activity (for the specified tasks) for a specific user by hour. The part of the query you want to focus on is
and ActivityUserID in (select lUserID from HSV_ACTIVITY_USERS where sUserName = '<USER_NAME>')The ActivityUserID in the task audit table will match up to the lUserID field in the HSV_ACTIVITY_USERS table. sUserName will be the actual text username. Depending on how you are configured, the name may look like johndoe or johndoe@Native Directory or johndoe@AD, etc. If you query that table, you'll figure it out pretty quickly.
3.) Module ID. I can only partially assist on this one.
This is not also in the HFM database. I suspected it might be floating in workspace; however, can't really find it there either.
I can tell you a couple things though....
#@RID@# Is just a placeholder for Resource ID. The important part is the number behind it. If you do a search on your folders for @RID@, you'll get one hit where it is defined as a constant, but that is it. (I was hoping a file search would reveal a table of the ID's; however, I wasn't that lucky). There is probably a table of values that correspone somewhere, but I haven't found it.
If you do a distinct select, you'll see there's not too many ...
select distinct strmodulename from <APP_NAME>_task_audit#@RID@#10
#@RID@#13
#@RID@#14
#@RID@#16
#@RID@#18
#@RID@#23
#@RID@#30
#@RID@#32
#@RID@#4294967295
#@RID@#45
#@RID@#46
#@RID@#49
#@RID@#52
#@RID@#58
#@RID@#59
#@RID@#65
#@RID@#66
#@RID@#67
#@RID@#68
#@RID@#69
#@RID@#7
#@RID@#9
HyperionReports
How can you determine these values?
The quick and dirty way would be to run a Task Audit Extract for a given date range as this will reveal the Module Name.
Then execute a SQL Query on the Task Audit Table for the same data range. You could then match up the records and deduce the values.
--Get Task Items by Date Range
select (select sUserName from HSV_ACTIVITY_USERS where lUserID = ActivityUserID) as UserName, ActivityCode, ServerName, AppName, cast(StartTime-2 as smalldatetime), cast(EndTime-2 as smalldatetime), strDescription, strModuleName from <APP_NAME>_task_audit where cast(endtime-2 as smalldatetime) between '2011-12-7 00:00:00' and '2011-12-7 23:59:59' order by endtime ascOnce you determine the values, I would create a table in your database to hold them so that you could use them in future queries. I would also recommend you do the same with the activitycodes.

Similar Messages

  • How to query the count of the temporary table from user_objects

    e.g. select count(*) from user_objects where object_type='TABLE'
    According to the SQL,I can query the all table including the temporary table,Can I how to query the count of the temporary table from user_objects excluding the permanent table?
    thanks a lot!

    select count(*)  from user_objects where object_type='TABLE' and temporary = 'Y'

  • How to query the database in an Entity Object (EO)

    I am using JDeveloper 11.1.2.2.0
    I am Forms developer working in a new ADF project and need some help from the ADF gurus, I am just a ADF beginner.
    Maybe hits question has a easy solution, but I don't know how to implement this:
    I have simplified my scenario, but this is what I Need to do:
    One database table DBTABLE with 3 columns (C1,N1,D1) C1-varchar2; N1-Numeric; D1-Date.
    In the DBTABLE I have the following data:
    ONE; 10; 01/10/2012
    ONE; 20; 02/10/2012
    TWO; 15; 02/10/2012
    ONE; 15; 03/10/2012
    I have created an ADF EO for the DBTABLE with all 3 attributes, then I have created another transient numeric attribute T1.
    My requirement is when I create a new record and set attribute C1=ONE the transient attribute T1 should show sum(N1) from DBTABLE where D1>= 01/10/2012 and D1 < 03/10/2012.
    In this case when I create a new record should the shown in T1 a total of 10+20 = 30.
    I know how to use the EOImpl getters and setters, and how to set the T1 attribute when C1 is set. My problem is how to calculate the total T1.
    How can I implement this in ADF? It is possible to implement this in the EO? It is possible to make the query select sum(N1) from DBTABLE where D1>= 01/10/2012 and D1 < 03/10/2012 and return the value to the EO attribute?
    Thank you in advance

    Hi Peter
    Thank you for your suggestions, both of them are interesting but unfortunately they do not solve my problem, or at least I don’t know how.
    I will try to better explain my problem
    I have te table DBTABLE and another related table called DBDATES with colums(C1,DT1,DT2,TARGET) where I record periods of time and desired target. For instance my DBDATES table could have the following records
    ONE; 01/01/2012; 31/01/2012; 100
    ONE; 01/02/2012; 29/02/2012; 90
    ONE; 01/03/2012; 31/03/2012; 95
    TWO; 01/01/2012; 31/01/2012; 140
    Exist a FK between both tables in the C1 column.
    I have created an EO for the table DBTABLE with the tree persistent attributes (C1, N1, D1) an transient attribute (T1). The (C1,D1) is my DB primary key.
    When I create a new record in the DBTABLE and based in the actual date I need to query the DBDATES table to check which is my TARGET and the valid target dates. For Instance if a record for person ONE is created on February 12, my TARGET is 90 from 01/02/2012 to 29/02/2012.
    At the same moment I need to check the total amount of items record to the person ONE during the full target period.
    Select sum(N1)
    From DBTABLE
    Where D1 between V2 and V3
    And C1= V1;
    Bind variables:
    V1 = ‘ONE’;
    V2 = ‘01/10/2012’ – queried from DBDATES
    V3 = ‘03/10/201’ – queried from DBDATES
    In resume, for a determined person when I create a new record in the DBTABLE I need to know their target for the actual period and how much as been record until now.
    I don't know if is possible to solve this without using the View Objects, because I need to query the DBTABLE for a time frame and with bind variables.
    Thank you in advance for your help.

  • How to Access the  XI_AF_MSG table

    Hi Experts,
    I request you to please let meknow that how can I access the different JAVA tables like XI_AF_MSG table or the AUDIT tables.
    Actualy my requirement is to trace the audit log for a  particular message ID in the Adapter Engine.This audit trace is not same as the audit log that found in the PI7.0  Runtime WorkBench.For exmaple.--
    a message failed in the adapter engine after successfuly processed from PI Integration Engine. Now I want to trace the USERID by whom the message is resent or canceled.
    please let me know how can I achive this and how can I access the different tables in JAVA layer.
    Thanks
    Sugata Bagchi Majumder

    These 3 are the tables that are for XI Adapter in ABAP Stack.
    SWFRXICNT
    SWFRXIHDR
    SWFRXIPRC
    You can also try the following tables.
    SXMSAEADPMOD                   XI: Adapter and Module Information
    SXMSAEADPMODCHN                XI: Adapter Module Chains
    SXMSAEAGG                      XI: Adapter Runtime Data (Aggregated)
    SXMSAERAW                      XI: Adapter Runtime Data (Raw Data)
    Cheers,
    Sarath.
    Award if helpful.

  • How to decrease the dynamic table data loading time

    hi
    i have problem with dynamic table.
    when i execute the the table with passing a query , getting lot of time for loading the table data.( it takes 30sec for every 100 rows.)
    pls help me how to overcome this problem.
    thanks advance.

    Yes, This is oracle application...
    We can move into other tablespace as well. But concern is how to improve the alter table move command performance.
    Is there any specific parameter apart from the nologging and parallel server..
    If it is taking 8 hours , can some have experience that nologging will save how much time. or is there any risk in doing in production.
    Regards

  • How to mark the physical tables as cacheable

    Hi All,
    Can someone please tell me how to mark the physical tables as cacheable.
    Thnaks a lot

    Hi,
    by default they are cacheable...
    You can see it on repository, physical layer, right clik on table, properties, on general tab, check cacheable...
    You can specify peristence time...
    See this article, you will find an image with table properties:
    http://obieeblog.wordpress.com/2009/01/19/obiee-cache-is-enabled-but-why-is-the-query-not-cached/
    Regards
    Nicoale
    Edited by: Nicolae Ancuta on 26.05.2010 09:15

  • How to query for two tables

    Hi,
    I have this problem, How can query a two table?
    Table A ->  Table B
    id               table-a_id
    name          table_b_name
    the relationship is one-to-many
    How can I get the result?
    Hope my question make sense
    cheers.
    thanks a lot.

    I bet you have more luck looking for an answer in a SQL forum.

  • How to query the flat files?

    Hi
    How to query the flat files that are used in Etl From EBS source.

    That can be done in OBIEE. Save the flat file as .csv format. Then go to ODBC Administrator on windows machine where you BI server is running, and create an System DSN and select "Microsft Access Text Driver (*.txt, *.csv)" as driver type.
    Next, import tables in RPD using this ODBC connection. Rest of the steps as same as building model from a table source.
    Hope this helps.

  • How to Query a database table of a remote system in a program.

    How to Query a database table of a remote system in a program.
    Thanks in adv.
    -Satish

    1.Create an RFC(SE37) in Source (To Where you want to get data)
    IMPORTING MATNR
    EXPORTING : SYS TYPE SY-SYID
                         I_MARA TYPE MARA
    SELECT SINGLE * FROM MARA INTO I_MARA WHERE MATNR EQ MATNR
    2.Copy the same RFC to Target(From Where you want to get data)
    3.Create a RFC destination(SM59.) in Source
    Enter the connection type as 3 and enter the target host  and system number ( may be 00)
    4.Create a program to calling RFC in Source.
    PARAMETERS: p_matnr LIKE mara-matnr.
    PARAMETERS: p_dest LIKE rfcdes-rfcdest DEFAULT 'NONE'.
    DATA: system LIKE sy-sysid.
    DATA :i_mara TYPE mara.
    CALL FUNCTION 'XX_RFC_GET_TEST' DESTINATION p_dest
      EXPORTING
        matnr                 = p_matnr
      IMPORTING
        sys                   = system
        i_mara                = i_mara
    :-Gopeekrishnan

  • How to query the Product short code of EBS products?

    I need to get all the Product short code of all EBS products. Is there any table record such kinds of short codes? thanks!

    Hi,
    However, these product codes are not associated with corresponding products and product families.
    do you know how to query the product name , product short codes and product familiy together?Script to get Codelevels Summary in R12 and 11i
    Re: Script to get Codelevels Summary in R12 and 11i
    PS: all these tables are public to query or just allow oracle internal usage?As Apps user, you should be able to query these tables. For other database users, you need to check if the users have select privilege to access the tables or not.
    Regards,
    Hussein

  • How to create the custom table?

    Hi, how to create the custom table and how to integrate the table with defferent R/3?
    my requiremnt is i have to create the two tables and those i have to integrate with the existed R/3 and using those R/3 i have to update my custom tables .....can give me some idea?
    Tks
    DPk

    how to create the custom table
    There are two approach in creating a table.
    1. Bottom-up approach
    2. Top-down approach.
    Both are valid and you can choose which approach is suitable for you. I always use the bottom-up approach. Here are the steps to create the tables with this approach.
    1. SE11 will take you to the DDIC and enter the name of the new table to be created. Let us say Zname. Click create.
    2. Enter the short discription of the table and enter the field of the table. If it is primary key and you have to check the box.
    3. Enter the data element and double click it, you will be asked to save and will take you to data element discription page. Enter the short discription of the data element and enter the information of domain like the length of field and type of field.
    4. If you wanted to use the existing domain then its fine, or else, you have to create one. Enter the domain name in the data element page and double click it. Page will ask to save and jump to domain creation page.
    5. In the domain page, you have to save the information which you have already given in the data elements page and check it. Before going to data element page, you have to activate the domain.
    6. Go to data element page and save, check and activate.
    7. Go to main table page and save, check, and activate.
    8. Also, you have to save the technical settings of the table.
    The table is now ready for operation. You can use it in your program or you can use it to enter information.
    Check table: It is the table which will have all the information about the Foreign keys which are the primary keys in the check table.
    It can be created by creating the foreign key from the main table. Click foreign key in the main table and it will take you to a page which will ask for table name and field to which foreign key relation has to be associated. Enter the information and you can create the check table automatically.
    SM30 is used for maintenance of the table, that is to realease the errors occured during the creation of the table.
    how to integrate the table with defferent R/3
    Transport the Table to the another server/client/qas/prd
    Kanagaraja L

  • How to download the custom Tables to xls from the system?

    Hi
    How to download the custom Tables to xls from the system?
    Vijay

    Hi,
    Goto SE11, in the table name field give Z*, and click on display. You will get the list of Z tables.
    Regards,
    Prabu

  • Please help : How to make the anomalistic table just like below?

    Hi all,
    How to make the anomalistic table just like below? Anyone can give the way detail or thoughtway ?
    http://61.132.17.188/webber/table.gif

    This is just a suggestion.
    If you put your "JTable" in a "JScrollPane", then you can add any "java.awt.Component" to the corner of the "JScrollPane" -- using the "setCorner()" method (of "JScrollPane").
    I would suggest making a custon "JPanel" and overriding its "paintComponent()" method to draw a diagonal line (and the required text) on it.
    You can find out more about how to do this from the links I provided in my first reply.
    Hope this helps.
    Good Luck,
    Avi.

  • How to import the internal table into subroutine as parameter

    how to import the internal table into subroutine as parameter, and its structure can be recognized inside the subroutine

    Hi Yong,
    try this:
    parameters: p_tabnm like dd03l-tabname.
    field-symbols: <fs_tabname> type standard table.
    data: itab_ref type ref to data.
    create data itab_ref type standard table of (p_tabnm)
                         with default key.
    assign itab_ref->* to <fs_tabname>.
    select * from (p_tabnm) into table <fs_tabname>.
    perform subroutine tables <fs_tabname>
                       using p_tabnm.
    *&      Form  subroutine
          text
         -->P_<FS_TABNAME>  text
         -->P_P_TABNM  text
    form subroutine  tables   p_tabname type standard table
                     using    p_tabnm.
    Here p_tabname already has the structure of the table you gave as input
    parameter
    endform.                    " subroutine

  • How to create the fact table

    pleae let me know how to create the fatc table by using pl/sql packages
    Edited by: 792988 on Sep 6, 2010 3:34 AM

    Please let us know something about your fact table.
    There's no create_fact_table() procedure that could satisfy everybody.

Maybe you are looking for

  • ADCS Error -8257 occurred at ISOTP.vi

    Hello everyone, I have a new problem with ADCS I'm trying to read the Ecu DTC with the "ReadDTCByStatus.vi" making the request: 18 00 FF 00 (in hex). The Ecu has 3 errors in memory and then responds with a consecutive frame. I've set the globals Dia

  • Pro*C 8051 problem AIX -- Linux

    Hello. This is my problem trying to port an application from AIX to Linux. I installed redhat 6.0 on PII350 128Mb ram. kernel 2.2.5 I installed Oracle 8051 enterprise edition, the glibcpatch, inserted the defines: define=_STDIO_H define=_STRING_H def

  • HTMLLoader Breaks HTTP Attachments

    It seems that it is not possible to replicate standard browser behavior with Browser Attachments. If I go to any website that allows the downloading of a file to disk, an Air application can't be created such that it can save that HTTP attachment tha

  • Call of a method from x users

    I have a class A with a public method B on a server Users access this particular method via RMI. The question: If the Users called the method B (at the same time) from the same instance of A, did they use the same method or a separate one. One "insta

  • Fubar with my external hard drive and not all Match items will play in iTunes on my Air but will on Apple TV. Any thoughts?

    My entire library is on iTunes Match however after a recent fubar with my external hard drive, whilst I can play all my music through Apple TV I can't access it all on my Air. This was the original device used to download. Any thoughts? There doesn't