OLAP DML Programs

Hi,
I am very much new in OLAP. My question is that in the OLAP Analytics workspace, there is a node "OLAP DML Programs ".
Could you please tell me when it is used ? Can this DML program use for calculating program ?
Can we say , it is the language to replace general ETL process for populating the FACT & Aggregrate table ? Is it possible by writing the DML language , we can populate the FACT & Aggregrate table ? If it is then please give an example and if not then clarify when it is used ?
Many Thanks,
Pallab Mandal

This can be done very easliy. Here is what I did.
1. Create a table called OLAP_LOG - with columns OLAP_DATE, OLAP_MESSAGE, OLAP_PROGRAM. Note that this is along the same lines as olapsys.XML_LOAD_LOG table.
2. In OLAP create a function (lets call is OLAP_LOG_MSG) which will take two arguments which are text values (one for a message, second one for program name).
3. Within OLAP_LOG_MSG olap program you will do an INSERT statement into OLAP_LOG table. In the OLAP_DATE column you can put in SYSDATE, the next two columns will be populated by the two arguments.
4. In all your olap programs, wherever you are doing a SHOW statement at the same place also do a call to OLAP_LOG_MSG with the arguments. I put it in all my olap programs, including the error section.
It has worked out very very very well....
Enjoy!!!
- Nasar
.

Similar Messages

  • How do I view data from OLAP DML program or statement?

    Hi
    I'm struggling to find any information on this topic anywhere on the net:
    How to view data produced by an Oracle OLAP DML program or statement.
    Background :
    I am using the latest AWM to create and maintain dimensions, cubes and measures. However, I've noticed that AWM, Discoverer OLAP, BI Beans, Excel Plug-In et al only provide a fixed set of formula and expressions.
    For example, I wanted to created a Standard Deviation (STDEV) on measure. After much searching I learnt that I could do this by creating a custom measure in AWM by importing a measure defined in an XML dcoument as it's not provided by AWM. The output in Discoverer OLAP on the surface seems to give the correct results, however when drilling from high level to lower level of time time dimension hierarchy Discoverer includes the parent value in the calculation and renders the values incorrect.
    My alternative is to use OLAP DML, as it provides a richer range of formuale and calculations possibilities and I was hoping to use this functionality to do create the measures. I have the distinct impression, however, that OLAP Worksheet is the only interface out there to do this.
    It seems very primitive and limited with regards to data output, almost like SQL*Plus in many ways.
    The burning questions I have are :
    1) Do I need to write DML programs to perform these custom measure calculations and add them to cubes or do I import the custom measures via AWM and XML?
    2) If the answer to question 1 is DML programming, is there a way of viewing the OLAP data output through a GUI interface without embedding the statements in SQL.
    3) Has anyone experienced or noticed the same problem with Discoverer OLAP, AWM Viewer that I mentioned above? i,e, statistical functions performed on whole dimension hierarchy rather than lower levels.
    I'm hoping someone out there knows what I am trying to do or get at. Keith, any ideas or suggestions?
    Thanks
    Kind Regards
    Greg

    Hi Greg,
    There are two ways to achieve what you want. Both require the use of custom calculations which cannot be created via the calculation wizard within AWM. To do this the easiest way is step outside of AWM and use the Excel Calculation utility that is on the OLAP OTN home page:
    Creating OLAP Calculations using Excel
    http://download.oracle.com/otn/java/olap/SpreadsheetCalcs_10203.zip
    Readme
    http://www.oracle.com/technology/products/bi/olap/OLAP_SpreadsheetCalcs.html
    (Oracle OLAP DML Reference contains a list of all the OLAP functions that can be used to create a custom calculation. http://www.oracle.com/technology/products/bi/olap/OLAP_DML_10.2.zip)
    The Excel tool lets you assign your own formula to a measure and then uploads that measure definition into your AW. It is possible to import a custom calculation template into AWM using the menu option on the Calculated Measure node of each cube, but it is safer to use the Excel Worksheet as this directly uses the public XML API and is always best to use a public API rather than hacking XML templates.
    There are two types of custom calculation:
    1) Formula: using a formula you can directly call any of the OLAP functions. For example to create a measure that returns the standard deviation for a measure then you would enter the following as the formula for your calculated measure:
    stddev(sales_revenue, time)
    The easiest way to test if the measure is working as expected is to use the data viewer within AWM.
    2) Programs - if the function you need is not provided or you want to do special processing to return a result you can create an OLAP DML program which can return a result. To do this use OLAP Worksheet to define the program and add a datatype to the DEFINE statement, such as :
    DEFINE PRG_SD_SALES PROGRAM DECIMAL
    In the program return the value you have calculated within your program. Within the program you can do just about anything but be aware that your program is going to fire for every cell within your virtual cube so it must be efficient and fast to execute. For a measure then you would enter the following as the formula for your calculated measure:
    prg_sd_sales(time, products, geographies, channels).
    The actual program code would look something like this:
    DEFINE PRG_SD_REVENUE PROGRAM DECIMAL
    PROGRAM
    argument T_TIME TIME
    argument T_PRODUCT PRODUCTS
    argument T_GEOGRAPHY GEOGRAPHIES
    argument T_CHANNEL CHANNELS
    variable D_RETURN decimal
    TEMPSTAT TIME, PRODUCTS, GEOGRAPHIES, CHANNELS
    do
    limit PRODUCTS to T_PRODUCT
    limit CHANNELS to T_CHANNEL
    limit GEOGRAPHIES to T_GEOGRAPHY
    limit TIME to T_TIME
    limit TIME add descendants using TIME_PARENTREL
    limit TIME keep TIME_LEVELREL 'CAL_MONTH'
    D_RETURN = stddev(SALES_REVENUE)
    doend
    return D_RETURN
    END
    This code computes a standard deviation the all months within the specified time range, at year level for all 12 months, at quarter level for the three months within the quarter ans returns NA at the month level.
    As the code executes within a implicit loop you can only change the status fo dimensions that for part of that implicit by using the TEMPSTAT command. To test the program at the command line use the OLAP Worksheet and the SHOW command to just return one cell of data, DO NOT SIMPLY USE THE RPR COMMAND because you will have to wait for the whole cube to be returned. If you want to use the RPR command make sure you limit your base dimensions first! You can use PRGTRACE to debug your program code it is not working as expected. Again, the easiest way to test if the measure is working as expected is to use the data viewer within AWM, although this will not return debug information so send all your debug output to a file to capture any errors and/or trace the execution flow.
    Hope this helps
    Keith Laker
    Oracle EMEA Consulting
    BI Blog: http://oraclebi.blogspot.com/
    DM Blog: http://oracledmt.blogspot.com/
    BI on Oracle: http://www.oracle.com/bi/
    BI on OTN: http://www.oracle.com/technology/products/bi/
    BI Samples: http://www.oracle.com/technology/products/bi/samples/

  • OLAP DML Program Help

    Greetings,
    I am trying to write a DML program to read data from each active cell displayed in a crosstab, and parse through various information. For each cell, I want to capture the value of the measure, and the level and value of each dimension, apply some logic, apply a value to another measure related to the original, and then persist that new value into that cell for the second measure.
    There are a couple of problems that I am running into. First of all, I am performing some testing to fully understand the logic, but it seems that via the OLAP Worksheet, DML programs do not like to accept command-line parameters. This is necessary as I will have a few different programs that communicate via parameters rather than global variables. Secondly, within my DML programs, I have had no problem whatsoever creating and selecting data from a sql cursor when my where clause contains static data. However I will need the flexibility to determine at runtime the status of a dimension, and select via sql depending upon that value. This is not currently possible as any variable substitution within the where clause of a sql declare cursor statement generates an error. If anyone has a suggestion or an idea of what I am doing wrong, please reply.

    Is it the usage of the host variable syntax within the sql define cursor statement which did the trick ... ":_objecttype" instead of "_objecttype".
    I've used the following syntax in olap dml programs in 10gR2 (only 1 filter in the sql statement though)...
    "where pr.user_id = :_appuser" ... _appuser is a text variable (not argument) defined locally in the program.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • OLAP DML program 10g Help!!

    I have a OLAP DML program that I am invoking as follows
    call pmtdim_user_sec(_aw 'MG_OU' 'OPERATING_UNIT')
    The intent is to use the OPERATING_UNIT or parameter in 3rd place as a condition for cursor in the program.
    e.g. below for the sql for cursor.
    select PF_OBJ_ID from ps_cgf_ac_security@act_link -
    where OPRID =USER and PF_OBJECT_TYPE = 'OPERATING_UNIT'
    However when I use it in the program as below I get a failure during opening of cursor. The same thing when hardcoded per this SQL works fine? Am I doing anything incorrect. I tried using objtype and objecttype variables below in the where condition without any luck.
    Program below:
    " pmtdim_user_sec -PROGRAMS
    arg _aw text "fully qualified AW name e.g. AWADMFDL.FDL
    arg dimname   text  "Dimension ID on which PERMITREAD needs to be set
    arg _objtype   text  "Object type for row level security
    vrb _dim1      text
    vrb _dimlist   text
    vrb _used      text
    vrb _usedlist  text
    vrb _finallist text
    vrb _uservalue text
    vrb _userlist  text
    vrb _objecttype text
    show 'beginning of the program'
    show _dimname
    show _objtype
    trap on failure
    badline = y
    "multi aw and object fetching
    _dim1 = joinchars(_aw '!' _dimname)
    _used = joinchars(_aw '!' _dimname '_USED_IS_IT')
    _objecttype = joinchars('\'' _objtype '\'')
    show ' objecttype :'
    show _objecttype
    show 'before cursors'
    sql declare c2 cursor for -
    select PF_OBJ_ID from ps_cgf_ac_security@act_link -
    where OPRID =USER and PF_OBJECT_TYPE = _objecttype
    push &_dim1
    "Initializing
    _dimlist = na
    _usedlist = na
    _finallist = na
    _userlist = na
    show 'before opening of cursor'
    sql open c2
    show 'opening cursor'
    if sqlcode ne 0
    then goto failure
    show 'before while'
    while sqlcode eq 0
    do
    show 'before fetch'
    sql fetch c2 into :_uservalue
    show 'after fetch'
    if exists (_uservalue)
    then
    if isvalue(&_dim1 joinchars(_uservalue))
    then dimlist = joinlines(dimlist _uservalue)
    else goto failure
    doend "while
    sql close c2
    show 'end of opening of a cursor'
    _finallist = joinlines(_dimlist)
    _finallist = uniquelines(_finallist)
    show 'Final List '
    show _finallist
    if _finallist ne na
    then do
    lmt &_dim1 to _finallist
    &joinchars('lmt ' _dim1 ' add descendants using ' _dim1 '_parentrel')
    "&joinchars('lmt ' dim1 ' add ancestors using ' dim1 '_parentrel')
    &joinchars('consider ' _dim1)
    &joinchars('permit read when instat('_dim1 ' ' _dim1 ')')
    doend
    pop &_dim1
    return
    failure:
    pop &_dim1
    signal errorname errortext
    return errortext

    Is it the usage of the host variable syntax within the sql define cursor statement which did the trick ... ":_objecttype" instead of "_objecttype".
    I've used the following syntax in olap dml programs in 10gR2 (only 1 filter in the sql statement though)...
    "where pr.user_id = :_appuser" ... _appuser is a text variable (not argument) defined locally in the program.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Logs from OLAP DML Programs

    Is there any way to get a continuous stream of logs when an OLAP DML program is running ( eg. A Loop ). I am on 9.2.0.5 currently. The logs are being dumped only after the program has finished execution but not when it is running. Can this behavior be changed ?
    Any help is appreciated.
    Thanks
    Swapan.

    This can be done very easliy. Here is what I did.
    1. Create a table called OLAP_LOG - with columns OLAP_DATE, OLAP_MESSAGE, OLAP_PROGRAM. Note that this is along the same lines as olapsys.XML_LOAD_LOG table.
    2. In OLAP create a function (lets call is OLAP_LOG_MSG) which will take two arguments which are text values (one for a message, second one for program name).
    3. Within OLAP_LOG_MSG olap program you will do an INSERT statement into OLAP_LOG table. In the OLAP_DATE column you can put in SYSDATE, the next two columns will be populated by the two arguments.
    4. In all your olap programs, wherever you are doing a SHOW statement at the same place also do a call to OLAP_LOG_MSG with the arguments. I put it in all my olap programs, including the error section.
    It has worked out very very very well....
    Enjoy!!!
    - Nasar
    .

  • Direct olap dml programming

    What's the best way to practice in olap dml without installation OWB ?
    Thanks

    Hi,
    I found the issue , a value for measure was pushed and that time this error was happening,Reason was
    the value passed was .01 , but since the Number format was ',' for a decimal point value passed was ,01
    Turning the Number format to '.' for decimal points resolved the issue.

  • CAN i CALL OLAP DML THROUGH JDBC IN JAVA PROGRAM

    I HAVE ORACLE V 9.2.0.1.0 AND AFTER CREATING A CUBE FROM ENTERPRISE CONSOLE I HAVE TO GO WITH EITHER SQL PACKAGES OR OLAP DML PROGRAMS ,SO PLS GIVE ME PROPER WAY AND LINK OF SOURCES TO WORK WITH OLAP DML IN JAVA PROGRAMS
    CAN I USE AS PREPARED STATEMENT OR CREATE STATEMENT IN JAVA
    TO CALL OLAP DML? BECAUSE NORMALLY WE MUST USE OLAP WORKSHEET TO EXECUTE OLAP COMMANDS
    Message was edited by:
    user594151

    The access OLAP objects via Java you have two options. You can code directly against the OLAP API and I think someone has already provided you with the link to the supporting documentation. The OLAP API docs provide worked examples on access OLAP metadata and retrieving OLAP data. However, this is extremely low level coding. An alternative is to use the Business Intelligence Beans. Oracle Business Intelligence Beans enables developers to productively build business intelligence applications that take advantage of the rich OLAP functionality in the Oracle database. OracleBI Beans includes presentation beans - graph and crosstab, data beans - query and calculation builders and persistence services, which may be deployed in both HTML client and Java client applications. OracleBI Beans is seamlessly integrated into Oracle JDeveloper to provide the most productive development environment for building custom BI applications. For more information goto the the BI Beans home page
    http://www.oracle.com/technology/products/bib/index.html
    Specifically on executing OLAP DML see the following example:
    Developing a Dashboard Application with Oracle BI Beans:
    http://www.oracle.com/technology/products/bib/1012/viewlets/MS%20Developing%20Executive%20Insight.html
    Adding controls to execute OLAP DML      This viewlet demonstrates how to quickly and easily add the controls to execute OLAP DML models that can be executed to update the What If presentation.
    http://www.oracle.com/technology/products/bib/1012/viewlets/Pages/What_If_Analysis_Part_4_viewlet_swf.html
    Hope this helps
    Keith Laker
    Oracle EMEA Consulting
    BI Blog: http://oraclebi.blogspot.com/
    DM Blog: http://oracledmt.blogspot.com/
    BI on Oracle: http://www.oracle.com/bi/
    BI on OTN: http://www.oracle.com/technology/products/bi/
    BI Samples: http://www.oracle.com/technology/products/bi/samples/

  • How to deploy OLAP DML scripts or programs?

    Once finishing developing a set of OLAP DML scripts in AWM
    How can I deployed them to production environment?
    Is there a command-line equivalence for OLAP worksheet?
    ( something like sqlplus @file, which execute
    a set of commands store in file )
    Thanks
    Warren

    OLAP Worksheet found within AWM is a command line interface to Oracle that you can use with Oracle Database 9.2 or later to do the following:
    * Execute most OLAP DML commands
    * Edit OLAP DML programs, formulas, aggmaps, and models
    * Execute SQL statements
    To execute a saved OLAP DML program simply type the name at the bottom input pane in OLAP Worksheet and and hit the Enter key. Also, you can invoke an OLAP DML program that does not return a value by using the CALL command. Please refer to the OLAP DML Language Help found in OLAP Worksheet or the following Developer's Guide to the OLAP DML:
    http://otn.oracle.com/products/bi/pdf/DMLguide.pdf

  • Creating variables in OLAP DML - 11g

    Hi Experts,
    My understanding is that the OLAP metadata is exposed to GUI via formulas only. if I create a variable in OLAP DML worksheet, is it possible to expose it to cube view, and awm by formulas/programs etc?
    Kind Regards

    In OLAP Worksheet you can select 'SQL Mode' from the Options menu and run the SELECT statement there. Alternatively you can run the SELECT statement from inside an olap dml PROGRAM. Here is an example.
    DEFINE LIST_AWS PROGRAM
    PROGRAM
      VARIABLE _owner    TEXT
      VARIABLE _aw       TEXT
      VARIABLE _errortext TEXT
      VARIABLE _id_width INTEGER
      TRAP ON HADERROR NOPRINT
      " SQL Names are 30 characters long
      _id_width = 30
      " Declare a SQL cursor to get the list of AWs
      SQL DECLARE AW_SQL CURSOR FOR -
      SELECT OWNER, AW_NAME FROM ALL_AWS
      " Open the cursor
      SQL OPEN AW_SQL
      " Loop through the results
      WHILE SQLCODE EQ 0
      DO
        IF _aw EQ NA
        THEN DO
               " First loop, so print report headings
               SHOW JOINCHARS(RPAD('OWNER', _id_width) ' ' 'AW')
               SHOW JOINCHARS(RPAD('-' _id_width '-' ) ' ' RPAD('-' _id_width '-'))
             DOEND
        ELSE DO
               " Print aw and owner names
               SHOW JOINCHARS (RPAD(_owner, _id_width) ' ' _aw)
             DOEND
        " Fetch next row into local varialbes
        SQL FETCH AW_SQL INTO :_owner, :_aw
      DOEND
      " A SQLCODE of 100 is OK,since it means end of records
      IF SQLCODE EQ 100
      THEN DO
             SQL CLOSE AW_SQL
             SQL CLEANUP
             RETURN
          DOEND
      HADERROR:
       SHOW SQLERRM
       SQL CLEANUP
    ENDAnd here is what I see when I call it as the GLOBAL user.
    call list_aws
    OWNER                      AW
    SYS                      EXPRESS
    SYS                      AWMD
    SYS                      AWCREATE
    SYS                      AWCREATE10G
    SYS                      AWXML
    SYS                      AWREPORT
    GLOBAL                      GLOBAL

  • Tip: Improving The Performance Of OLAP DML Table Inserts

    Quick Oracle OLAP Tip:
    If you need to write the contents of a variable, or a group of variables, to a relational table, you would normally use the SQL INSERT command. Normal practice is to loop round all of the variables' dimension values, inserting the variable values into the relational tables one by one, until the variable has been completely loaded into your database table.
    Oracle 9i OLAP however introduces two new commands, SQL PREPARE and SQL EXECUTE (http://download-west.oracle.com/docs/cd/B10501_01/olap.920/a95298/sql5.htm#1027902) , that allow us to prepare our INSERT statement in such a way that it uses bind variables to pass values to the Oracle tables. Bind variables are generally a 'good thing' and reduce the amount of time Oracle has to spend parsing your SQL insert statements. In addition, you can specify additional options with SQL PREPARE to specify 'direct path' insertions (quicker as they bypass the normal SQL engine and directly load data into Oracle blocks), nologging (to eliminate redo log generation), and to nominate individual partitions to load data in to. It's worth noting that there's an error in the current OLAP DML documentation that suggest that any OLAP DML insert operation into an Oracle table locks the entire table, preventing other AW processes from inserting into the table until you commit. This is actually incorrect, and full-table locking only occurs if you use the DIRECT=YES option, which locks the table in the same way that SQL*Loader locks the table as they both use the Direct Path API.
    However, an even better solution than using SQL EXECUTE and SQL PREPARE is to use the OLAP_TABLE feature in Oracle 9i (http://download-west.oracle.com/docs/cd/B10501_01/olap.920/a95295/olap_tab.htm#73729) to create a view against your AW variable, then use this view as the source for a "INSERT INTO table SELECT * FROM source" SQL statement, optionally using the /*+ INSERT APPEND */ option if you want to carry out direct path insertions. By using OLAP TABLE and having the SQL engine insert multiple variable values into our target table, rather than having an OLAP DML program loop through the variable and carry out multiple single-row insertions, we were able to increase our write performance by an order of magnitude compared to our earlier SQL INSERT command. One thing to bear in mind though is that, if you are running many copies of the program concurrently, using direct path insertions may well cause lock contention, as each process will obtain an exclusive table lock while the direct insertion takes place. In the case of concurrent processes, it may be better to use conventional path insertions (but still use SQL PREPARE and EXECUTE, or OLAP TABLE) as these only require row-level exclusive locks.

    you can use Execution plain
    http://stackoverflow.com/questions/7359702/how-do-i-obtain-a-query-execution-plan
    and add index.
    Index according to the fields you ask queries can improve performance greatly larger!
    You can use the statistics for building indexes:
    http://www.mssqltips.com/sqlservertip/2979/querying-sql-server-index-statistics/
    Tzuri Ben Ezra | My Certifications:
    CompTIA A+ ,Microsoft MCP, MCTS, MCSA, MCITP |
    FaceBook: Tzuri FaceBook | vCard:
    Tzuri vCard | 
    Microsoft ID:
    Microsoft Transcript 
     |

  • Creating KPI using OLAP DML

    Hi all,
    How do we develop KPI (Key Performance Indicators) using OLAP DML in AWM 10g R2 (Analytical Workspace Manager)? I am new to this tool. Can anybody help me with a sample code. If there is any other way of implementing KPI in Oracle BI, kindly quote that example as well.
    Kieth, if you can answer my question and give me a sample OLAP DML code, i will be more than happy.
    Thanks in advance

    In 10g this is not quite as simple as 11g. To create a custom measure that calls an OLAP DML program you need to either:
    1) Download the Excel Utility from the OLAP home page on OTN:
    http://download.oracle.com/otn/java/olap/SpreadsheetCalcs_10203.zip
    but check the readme first:
    http://www.oracle.com/technology/products/bi/olap/OLAP_SpreadsheetCalcs.html
    or
    2) Use Warehouse Builder to manage your AWs. OWB allows you to automatically create custom calculations that call OLAP DML programs.
    If you look at this posting on the Oracle OLAP Blog you will find an example of how to create an OLAP DML program and reference it from a calculated measure:
    http://oracleolap.blogspot.com/2008/03/creating-calculated-measure-cube.html
    Keith Laker
    Oracle EMEA Consulting
    OLAP Blog: http://oracleOLAP.blogspot.com/
    OLAP Wiki: http://wiki.oracle.com/page/Oracle+OLAP+Option
    DM Blog: http://oracledmt.blogspot.com/
    OWB Blog : http://blogs.oracle.com/warehousebuilder/
    OWB Wiki : http://wiki.oracle.com/page/Oracle+Warehouse+Builder
    DW on OTN : http://www.oracle.com/technology/products/bi/db/11g/index.html

  • 11g - Listing Workspaces in OLAP DML

    Hi All,
    Is there a way in OLAP worksheet, to list all the workspaces accessible to the user?
    It can be done by querying the data dictionary - "select * from all_aws;" but this information should be available in AW and OLAP DML too?
    Regards, Neelesh

    In OLAP Worksheet you can select 'SQL Mode' from the Options menu and run the SELECT statement there. Alternatively you can run the SELECT statement from inside an olap dml PROGRAM. Here is an example.
    DEFINE LIST_AWS PROGRAM
    PROGRAM
      VARIABLE _owner    TEXT
      VARIABLE _aw       TEXT
      VARIABLE _errortext TEXT
      VARIABLE _id_width INTEGER
      TRAP ON HADERROR NOPRINT
      " SQL Names are 30 characters long
      _id_width = 30
      " Declare a SQL cursor to get the list of AWs
      SQL DECLARE AW_SQL CURSOR FOR -
      SELECT OWNER, AW_NAME FROM ALL_AWS
      " Open the cursor
      SQL OPEN AW_SQL
      " Loop through the results
      WHILE SQLCODE EQ 0
      DO
        IF _aw EQ NA
        THEN DO
               " First loop, so print report headings
               SHOW JOINCHARS(RPAD('OWNER', _id_width) ' ' 'AW')
               SHOW JOINCHARS(RPAD('-' _id_width '-' ) ' ' RPAD('-' _id_width '-'))
             DOEND
        ELSE DO
               " Print aw and owner names
               SHOW JOINCHARS (RPAD(_owner, _id_width) ' ' _aw)
             DOEND
        " Fetch next row into local varialbes
        SQL FETCH AW_SQL INTO :_owner, :_aw
      DOEND
      " A SQLCODE of 100 is OK,since it means end of records
      IF SQLCODE EQ 100
      THEN DO
             SQL CLOSE AW_SQL
             SQL CLEANUP
             RETURN
          DOEND
      HADERROR:
       SHOW SQLERRM
       SQL CLEANUP
    ENDAnd here is what I see when I call it as the GLOBAL user.
    call list_aws
    OWNER                      AW
    SYS                      EXPRESS
    SYS                      AWMD
    SYS                      AWCREATE
    SYS                      AWCREATE10G
    SYS                      AWXML
    SYS                      AWREPORT
    GLOBAL                      GLOBAL

  • AWM    OLAP-DML Expression to large?

    Hello all!
    I have a problem with my AW or with my AW -Manager. I used OLAP-DML Expressions ,and when I write longer Expressions, I got:
    oracle.express.idl.util.OlapiException: java.sql.SQLException: Keine weiteren Daten aus Socket zu lesen.
    So no more data from socket. I have to restart AW Manager. I can compile the Expressio nwithout error, but when I save the Expression I get the error.
    I use AWM 11.2.0.3.0A
    Her an example:
    This function very well:
    if time_utility eq 'CURRENT_DAY' then CUB_MEMBER_TRANSACTION_F_TVON / CUB_MEMBER_TRANSACTION_F_DURATION else -
    if time_utility eq '12MONTHS' then lag(CUB_MEMBER_TRANSACTION_F_TVON / CUB_MEMBER_TRANSACTION_F_DURATION, 12, zeit, RELATION ZEIT_LEVELREL) else -
    if time_utility eq 'CURRENT_DAY28' then lag(CUB_MEMBER_TRANSACTION_F_TVON / CUB_MEMBER_TRANSACTION_F_DURATION, 28, zeit, RELATION ZEIT_LEVELREL) else -
    if time_utility eq 'CURRENT_DAY7' then lag(CUB_MEMBER_TRANSACTION_F_TVON / CUB_MEMBER_TRANSACTION_F_DURATION, 7, zeit, RELATION ZEIT_LEVELREL) else -
    if time_utility eq 'CURRENT_MONTH' then CUB_MEMBER_TRANSACTION_F_TVON / CUB_MEMBER_TRANSACTION_F_DURATION else -
    if time_utility eq 'CURRENT_MONTH12' then lag(CUB_MEMBER_TRANSACTION_F_TVON / CUB_MEMBER_TRANSACTION_F_DURATION, 12, zeit, RELATION ZEIT_LEVELREL) else -
    if time_utility eq 'DELTA_CD7' then LAGPCT(CUB_MEMBER_TRANSACTION_F_TVON / CUB_MEMBER_TRANSACTION_F_DURATION, 7, zeit, RELATION ZEIT_LEVELREL) else -
    if time_utility eq 'DELTA_CD28' then LAGPCT(CUB_MEMBER_TRANSACTION_F_TVON / CUB_MEMBER_TRANSACTION_F_DURATION, 28, zeit, RELATION ZEIT_LEVELREL) else -
    if time_utility eq 'DELTA_CM12' then LAGPCT(CUB_MEMBER_TRANSACTION_F_TVON / CUB_MEMBER_TRANSACTION_F_DURATION, 12, zeit, RELATION ZEIT_LEVELREL) else -
    if time_utility eq 'MTD' then if extchars(zeit,1,3) eq 'DAY' then mvtot(CUB_MEMBER_TRANSACTION_F_TVON / CUB_MEMBER_TRANSACTION_F_DURATION,1-convert(joinchars(extchars(zeit,5,2)) int),0,1,zeit) else CUB_MEMBER_TRANSACTION_F_TVON / CUB_MEMBER_TRANSACTION_F_DURATION else -
    if time_utility eq 'MTD1' then if extchars(zeit,1,3) eq 'DAY' then  mvtot(CUB_MEMBER_TRANSACTION_F_TVON / CUB_MEMBER_TRANSACTION_F_DURATION,convert (ADD_MONTHS(convert( joinchars( '01' extchars(zeit,7,8)), date  'DMY'), -1) - convert( joinchars(  extchars(zeit,5,8)), date  'DMY'),int)  ,convert(ADD_MONTHS(convert(extchars(zeit,5,8), date  'DMY'), -1)  -  convert(extchars(zeit,5,8), date  'DMY'),int),1,zeit) else CUB_MEMBER_TRANSACTION_F_TVON / CUB_MEMBER_TRANSACTION_F_DURATION else -
    if time_utility eq 'MTD12' then if extchars(zeit,1,3) eq 'DAY' then mvtot(CUB_MEMBER_TRANSACTION_F_TVON / CUB_MEMBER_TRANSACTION_F_DURATION,convert (ADD_MONTHS(convert( joinchars( '01' extchars(zeit,7,8)), date  'DMY'), -12) - convert( joinchars(  extchars(zeit,5,8)), date  'DMY'),int)  ,convert(ADD_MONTHS(convert(extchars(zeit,5,8), date  'DMY'), -12)  -  convert(extchars(zeit,5,8), date  'DMY'),int),1,zeit) else CUB_MEMBER_TRANSACTION_F_TVON / CUB_MEMBER_TRANSACTION_F_DURATION else -
    if time_utility eq 'YTD' then if extchars(zeit,1,3) eq 'DAY' then if convert(extchars(zeit,8,2), int) GE 10  AND  convert(extchars(zeit,8,2), int) LE 12 THEN   mvtot(CUB_MEMBER_TRANSACTION_F_TVON / CUB_MEMBER_TRANSACTION_F_DURATION, convert(convert(joinchars( '01.10.'  extchars(zeit,11,2)), date  'DMY')   - convert( joinchars(  extchars(zeit,5,8)), date  'DMY'),int)  , 0,1,zeit)   ELSE   mvtot(CUB_MEMBER_TRANSACTION_F_TVON / CUB_MEMBER_TRANSACTION_F_DURATION, convert( ADD_MONTHS( convert(joinchars( '01.10.'  extchars(zeit,11,2)), date  'DMY'),-12)   - convert( joinchars(  extchars(zeit,5,8)), date  'DMY'),int)  , 0,1,zeit) else CUB_MEMBER_TRANSACTION_F_TVON / CUB_MEMBER_TRANSACTION_F_DURATION else -
    if time_utility eq 'YTD1' then if extchars(zeit,1,3) eq 'DAY' then if convert(extchars(zeit,8,2), int) GE 10  AND  convert(extchars(zeit,8,2), int) LE 12 THEN   mvtot(CUB_MEMBER_TRANSACTION_F_TVON / CUB_MEMBER_TRANSACTION_F_DURATION, convert( ADD_MONTHS (convert(joinchars( '01.10.'  extchars(zeit,11,2)), date  'DMY'),-12)   -convert( joinchars(  extchars(zeit,5,8)), date  'DMY'),int), convert(ADD_MONTHS(convert(extchars(zeit,5,8), date  'DMY'), -12)  -  convert(extchars(zeit,5,8), date  'DMY'),int),1,zeit)  ELSE mvtot(CUB_MEMBER_TRANSACTION_F_TVON / CUB_MEMBER_TRANSACTION_F_DURATION, convert( ADD_MONTHS (convert(joinchars( '01.10.'  extchars(zeit,11,2)), date  'DMY'),- 2 * 12 )   -convert( joinchars(  extchars(zeit,5,8)), date  'DMY'),int), convert(ADD_MONTHS(convert(extchars(zeit,5,8), date  'DMY'), - 12)  -  convert(extchars(zeit,5,8), date  'DMY'),int),1,zeit) else CUB_MEMBER_TRANSACTION_F_TVON / CUB_MEMBER_TRANSACTION_F_DURATION else -
    CUB_MEMBER_TRANSACTION_F_TVON / CUB_MEMBER_TRANSACTION_F_DURATION
    but this is too much:
    if prod_type_no eq  'PROD_TYPE_L1_Call' then ( -
    if time_utility eq 'CURRENT_DAY' then CUB_MEMBER_TRANSACTION_F_TVON / CUB_MEMBER_TRANSACTION_F_DURATION else -
    if time_utility eq '12MONTHS' then lag(CUB_MEMBER_TRANSACTION_F_TVON / CUB_MEMBER_TRANSACTION_F_DURATION, 12, zeit, RELATION ZEIT_LEVELREL) else -
    if time_utility eq 'CURRENT_DAY28' then lag(CUB_MEMBER_TRANSACTION_F_TVON / CUB_MEMBER_TRANSACTION_F_DURATION, 28, zeit, RELATION ZEIT_LEVELREL) else -
    if time_utility eq 'CURRENT_DAY7' then lag(CUB_MEMBER_TRANSACTION_F_TVON / CUB_MEMBER_TRANSACTION_F_DURATION, 7, zeit, RELATION ZEIT_LEVELREL) else -
    if time_utility eq 'CURRENT_MONTH' then CUB_MEMBER_TRANSACTION_F_TVON / CUB_MEMBER_TRANSACTION_F_DURATION else -
    if time_utility eq 'CURRENT_MONTH12' then lag(CUB_MEMBER_TRANSACTION_F_TVON / CUB_MEMBER_TRANSACTION_F_DURATION, 12, zeit, RELATION ZEIT_LEVELREL) else -
    if time_utility eq 'DELTA_CD7' then LAGPCT(CUB_MEMBER_TRANSACTION_F_TVON / CUB_MEMBER_TRANSACTION_F_DURATION, 7, zeit, RELATION ZEIT_LEVELREL) else -
    if time_utility eq 'DELTA_CD28' then LAGPCT(CUB_MEMBER_TRANSACTION_F_TVON / CUB_MEMBER_TRANSACTION_F_DURATION, 28, zeit, RELATION ZEIT_LEVELREL) else -
    if time_utility eq 'DELTA_CM12' then LAGPCT(CUB_MEMBER_TRANSACTION_F_TVON / CUB_MEMBER_TRANSACTION_F_DURATION, 12, zeit, RELATION ZEIT_LEVELREL) else -
    if time_utility eq 'MTD' then if extchars(zeit,1,3) eq 'DAY' then mvtot(CUB_MEMBER_TRANSACTION_F_TVON / CUB_MEMBER_TRANSACTION_F_DURATION,1-convert(joinchars(extchars(zeit,5,2)) int),0,1,zeit) else CUB_MEMBER_TRANSACTION_F_TVON / CUB_MEMBER_TRANSACTION_F_DURATION else -
    if time_utility eq 'MTD1' then if extchars(zeit,1,3) eq 'DAY' then  mvtot(CUB_MEMBER_TRANSACTION_F_TVON / CUB_MEMBER_TRANSACTION_F_DURATION,convert (ADD_MONTHS(convert( joinchars( '01' extchars(zeit,7,8)), date  'DMY'), -1) - convert( joinchars(  extchars(zeit,5,8)), date  'DMY'),int)  ,convert(ADD_MONTHS(convert(extchars(zeit,5,8), date  'DMY'), -1)  -  convert(extchars(zeit,5,8), date  'DMY'),int),1,zeit) else CUB_MEMBER_TRANSACTION_F_TVON / CUB_MEMBER_TRANSACTION_F_DURATION else -
    if time_utility eq 'MTD12' then if extchars(zeit,1,3) eq 'DAY' then mvtot(CUB_MEMBER_TRANSACTION_F_TVON / CUB_MEMBER_TRANSACTION_F_DURATION,convert (ADD_MONTHS(convert( joinchars( '01' extchars(zeit,7,8)), date  'DMY'), -12) - convert( joinchars(  extchars(zeit,5,8)), date  'DMY'),int)  ,convert(ADD_MONTHS(convert(extchars(zeit,5,8), date  'DMY'), -12)  -  convert(extchars(zeit,5,8), date  'DMY'),int),1,zeit) else CUB_MEMBER_TRANSACTION_F_TVON / CUB_MEMBER_TRANSACTION_F_DURATION else -
    if time_utility eq 'YTD' then if extchars(zeit,1,3) eq 'DAY' then if convert(extchars(zeit,8,2), int) GE 10  AND  convert(extchars(zeit,8,2), int) LE 12 THEN   mvtot(CUB_MEMBER_TRANSACTION_F_TVON / CUB_MEMBER_TRANSACTION_F_DURATION, convert(convert(joinchars( '01.10.'  extchars(zeit,11,2)), date  'DMY')   - convert( joinchars(  extchars(zeit,5,8)), date  'DMY'),int)  , 0,1,zeit)   ELSE   mvtot(CUB_MEMBER_TRANSACTION_F_TVON / CUB_MEMBER_TRANSACTION_F_DURATION, convert( ADD_MONTHS( convert(joinchars( '01.10.'  extchars(zeit,11,2)), date  'DMY'),-12)   - convert( joinchars(  extchars(zeit,5,8)), date  'DMY'),int)  , 0,1,zeit) else CUB_MEMBER_TRANSACTION_F_TVON / CUB_MEMBER_TRANSACTION_F_DURATION else -
    if time_utility eq 'YTD1' then if extchars(zeit,1,3) eq 'DAY' then if convert(extchars(zeit,8,2), int) GE 10  AND  convert(extchars(zeit,8,2), int) LE 12 THEN   mvtot(CUB_MEMBER_TRANSACTION_F_TVON / CUB_MEMBER_TRANSACTION_F_DURATION, convert( ADD_MONTHS (convert(joinchars( '01.10.'  extchars(zeit,11,2)), date  'DMY'),-12)   -convert( joinchars(  extchars(zeit,5,8)), date  'DMY'),int), convert(ADD_MONTHS(convert(extchars(zeit,5,8), date  'DMY'), -12)  -  convert(extchars(zeit,5,8), date  'DMY'),int),1,zeit)  ELSE mvtot(CUB_MEMBER_TRANSACTION_F_TVON / CUB_MEMBER_TRANSACTION_F_DURATION, convert( ADD_MONTHS (convert(joinchars( '01.10.'  extchars(zeit,11,2)), date  'DMY'),- 2 * 12 )   -convert( joinchars(  extchars(zeit,5,8)), date  'DMY'),int), convert(ADD_MONTHS(convert(extchars(zeit,5,8), date  'DMY'), - 12)  -  convert(extchars(zeit,5,8), date  'DMY'),int),1,zeit) else CUB_MEMBER_TRANSACTION_F_TVON / CUB_MEMBER_TRANSACTION_F_DURATION else -
    CUB_MEMBER_TRANSACTION_F_TVON / CUB_MEMBER_TRANSACTION_F_DURATION)  ELSE -
    +0+
    Is there a limit for the length of Expressions? Or is there a problem with AW -Manager ??
    Thanks a lot
    Greetings from Berlin
    Michael
    Edited by: Schattenzeit on 13.05.2013 14:54

    Not sure why you are getting error.
    You can put this in an OLAP dml program and call that program in your formula (i.e., calculated measure).
    Some other suggestions:
    (1). Define multiple formulas (or calculated measures) in your AW. For example you can define a separate calc measure for moving total function.
    (2). Try to use OLAP Expression Syntax, instead of OLAP dml.
    IF...THEN..ELSE logic is done using CASE statements in OLAP Expression Syntax. Moving Total and other time-series functions can be done easily also in OLAP Expression Syntax.
    (3). Looks like you probably have a dimension whose members are time-series measures. You can define all the time series measures separately also. Its easier to manage each measure and you can do LOOP_VAR and LOOP_DENSE settings also for better performance.

  • Datetime arithmetics in OLAP DML

    Hi.
    I have some miscalculations in my OLAP DML programs.
    For example I want to subtract 5 min. from some datetime variable
    NLS_DATE_FORMAT = 'dd.mm.yyyy hh24:mi:ss'
    SHOW TO_DATE('10.02.2005 10:00:00') - 1 / 24 / 12
    I've got
    10.02.2005 10:05:00
    I've discovered miscalculation take place only while subtracting fractional numbers. Addition works accurately with any numbers.
    Can anyone help me?
    Thank you.
    Andrew

    Hi Lars
    I'm sorry. I wrote first message from memory and I took arbitrary time value.
    I discovered that problem take place with round day datetime variable.
    For example
    NLS_DATE_FORMAT = 'dd.mm.yyyy hh24:mi:ss'
    SHOW TO_DATE('10.02.2005 00:00:00') - 1 / 24 / 12
    I've got
    10.02.2005 00:05:00
    But that is not a problem in PL/SQL, only in OLAP DML.

  • OLAP DML help

    In the past I regularly used EXPLANG.HLP. I find it more convenient than the pdf or html equivalents. This is now accessed in 10g via a button on the OLAP worksheet. Does anyone know how I can run 10g OLAP DML Help independently of AWM?

    Is it the usage of the host variable syntax within the sql define cursor statement which did the trick ... ":_objecttype" instead of "_objecttype".
    I've used the following syntax in olap dml programs in 10gR2 (only 1 filter in the sql statement though)...
    "where pr.user_id = :_appuser" ... _appuser is a text variable (not argument) defined locally in the program.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Maybe you are looking for

  • User name in email

    My iphone syncronize email with my company Exchange. When I receive an email, the sender's name appears correct but when I open this email, it shows only part of the name. In the screen where shows all email, it appears Eduardo Oliveira Ribeiro, but

  • Install Errors

    All, I am performing a silent install of Oracle 10g r2 and noticed in my install log file two errors. Error: Cannot add user to application access ACL No mapping between account names & security IDs was done. (534) Error: Cannot add user to applicati

  • Forte 30N2 : Message duration SO restart after a crash issue

    In our application, the batch processes are based on a 'Controller-Processor' pattern. A controller starts many processor tasks as parallel processes. The problem is that our Controller process crashed. However, by that time, many processor processes

  • PMISTORE error in VA

    Hi all, I have a File to BAPI scenario with BPM multimessages flow included. Mappings are done successfully and I'm getting no errors in the MM. When I watch my VA logs I have one error: <i>Error sending PMI records to http://sapserver:8001/sap/bc/sp

  • TS1398 Our work connection to WPA-Enterprise now drops after about 5 minutes.

    The wifi now has to be constantly reconnected.  This only started happening after the IOS 6 update. Is nobody else experiencing this?