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

Similar Messages

  • 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

  • How to generate OLAP DML code or CWM2 code outside of workspace manager 10g

    I am using AWM 10.2, where I am creating cubes and dimensions etc. I can export the workspace into XML, but i want more, i want to generate definition of my OLAP, i want to see OLAP DML code for creating my workspace. Anybod has an idea ?
    1) How can I generate OLAP DML definition of my existing workspace ?
    Second thing is, that I really don't understand the concept of CWM2, what is this good for ? Is my AWM automatically generating some CWM2 statements and executing it ? Where can i see them ? Why do i need another logical CWM definition when I have regular OLAP definition ?
    2) What is the role of CWM2 in OLAP ? How can i generate CWM2 code outside of my existing workspace ?

    The DESCRIBE command will give you the definition of the object but it won't tell you anything about how objects should be populated. The API for Analytic Workspaces (AW/XML) takes responsibility for both object creation and object maintenance.
    What is it that you might want to accomplish by using OLAP DML to create the objects?

  • XOQ-01600: OLAP DML error "ORA-33858: 11g Cube

    Hi All ,
    I was trying to apply the cube changes after changing the sparsity definition against one of the dimension under Storage tab and it is throwing below error .
    Any reason ?
    An error has occurred on the server
    Error class: Express Failure
    Server error descriptions:
    DPR: cannot create server cursor, Generic at TxsOqDefinitionManager::generic<CommitRoot>
    INI: XOQ-01600: OLAP DML error "ORA-33858: The value of the ampersand-substitution expression is NA." while executing DML "SYS.AWXML!R11_MANAGE_CUBE('MARKET_SALES_CUBE_WORKING.CUBE' 'ALTER' 'NUMBER' SYS.AWXML!___R11_LONG_ARG_VALUE(SYS.AWXML!___R11_LONG_ARG_DIM 1) SYS.AWXML!___R11_LONG_ARG_VALUE(SYS.AWXML!___R11_LONG_ARG_DIM 2) 'TIME.DIMENSION' 'TIME.CALENDER.HIERARCHY' 'TIME.MONTHLY.LEVEL' 'COMPRESSED' 'YES' 'YES' 'MARKET_SALES_CUBE_WORKING.SOLVE.AGGREGATIONDEFINITION' 'NO')", Generic at TxsOqStdFormCommand::execute
    Thanks in advance,
    DxP

    I have seen this kind of error show up if you rename an object (e.g. a measure) and then make further modifications. Did that happen in your case? If you export the cube to XML, delete it from AWM, and then recreate it from XML, then it may resolve the problem. If not, and if it is preventing your from making progress, then I would open a service request since we usually need to enable tracing to resolve this class of error.

  • Whitepaper/Info Budgeting/Planning/Writeback via Oracle OLAP DML

    Hi,
    does anyone know of any whitepaper, manual section, general information regarding writeback, planning, budgeting using Oracle OLAPs DML API? We would like to upgrade our proprietary DataAccess-Layer, which interfaces to Oracle OLAP via the DML-API, to allow writeback.
    As said the documentation for this topic seems to be scarce to none.
    Just to give an example: it is not possible to write back values to the base measures UNITS_CUBE_SALES/COST/UNITS of the UNITS_CUBE in global AW, since all of them are FORMULA objects. The underlying variable to which you can assign values is in 10g UNITS_CUBE_SALES_STORED, whereas in 11g you would limit the ALL_MEASURES_DIM object to the SALES measure and assign a value to a variable named UNITS_CUBE_STORED. Basically this is information I was fishing out of this forum, but didn't find documented in the Oracle manuals.
    Therefor I am wondering, if writeback via the Oracle OLAP DML API is something, which is officially not supported? Or maybe I just didn't look in the right places to find documentation.
    BTW: I am looking at this topic from an ISV point of view.
    Best regards
    Ralf
    Edited by: Ralf Steinstraesser on Aug 18, 2009 5:15 AM

    hello,
    i can only speak about 10 G
    There are 2 modes to attach an aw for writing data.
    http://download.oracle.com/docs/cd/B19306_01/olap.102/b14346/dml_x_arcsin011.htm#i1016126
    1)In rw mode
    Only one user can have an analytic workspace open in read/write at a time
    2)in multi mode
    A workspace that is attached in multiwriter mode can be accessed simultaneously by several sessions
    you find documentation for multi write
    http://download.oracle.com/docs/cd/B19306_01/olap.102/b14346/dml_appcats003.htm#CHDJFJHD
    hope this help you
    jean marc

  • XOQ-00703: error executing OLAP DML command "(SYS.AWXML!R11_INITIALIZE_AW

    Hello!
    Just upgraded from 10.2.0.4 64 bit Windows to 11.2.0.2 64 bit OEL it test environment. DB Compatibility = 11.2.
    SQL> select comp_name,version,status from DBA_REGISTRY where comp_name like '%OLAP%';
    COMP_NAME
    VERSION STATUS
    OLAP Analytic Workspace
    11.2.0.2.0 VALID
    Oracle OLAP API
    11.2.0.2.0 VALID
    OLAP Catalog
    11.2.0.2.0 VALID
    Problem 1: We had 2 AWs in PROD on 10.2.0.4.We can not open any of them in 10g mode.
    Problem 2: When we are trying to create AW in 11G mode we receive this error: XOQ-00703: error executing OLAP DML command "(SYS.AWXML!R11_INITIALIZE_AW
    We have tried to rerun xumuts.plb under sys.
    Log contains following errors:
    =============================================
    BEGIN dbms_aw_build.build('EXPRESS', FALSE); END;
    ERROR at line 1:
    ORA-00600: internal error code, arguments: [xspg: RSALPAGE01], [8128], [], [],
    ORA-06512: at "SYS.DBMS_AW_BUILD", line 107
    ORA-06512: at line 1
    BEGIN dbms_aw_build.build('AWMD', TRUE); END;
    ERROR at line 1:
    ORA-34738: A severe problem has been detected. Analytic workspace operations
    have been disabled.
    ORA-06512: at "SYS.DBMS_AW_BUILD", line 107
    ORA-06512: at line 1
    ==========================================
    and so on for each system AW
    should we raise a SR or somebody has any idea?
    Big thx in advance!
    Regards,
    Kirill
    Edited by: Kirill on Jun 16, 2011 1:34 PM

    I think you should raise an SR on this issue.

  • XOQ-01600: OLAP DML error while executing DML "SYS.AWXML!R11_LOAD_DIM"

    hi all,
    I am trying to do the tutorial Building OLAP 11g Cubes (http://st-curriculum.oracle.com/obe/db/11g/r1/olap/cube/buildicubes.htm), but when I try to "Maintain Cube SALES_CUBE" I get the following error:
    An error has occurred on the server
    Error class: Express Failure
    Server error descriptions:
    INI: error creating a definition manager, Generic at TxsOqConnection::generic<BuildProcess>
    INI: ORA-35571: The maximum number of load errors has occurred. No changes from this step were committed to the database.
    XOQ-01600: OLAP DML error while executing DML "SYS.AWXML!R11_LOAD_DIM", Generic at TxsOqStdFormCommand::execute
    INI: XOQ-01601: error while loading data for Cube Dimension "OLAPTRAIN.PRODUCT" into the analytic workspace, Generic at TxsOqStdFormCommand::callR11LoadDim
    at oracle.olapi.data.source.DataProvider.callGeneric(Unknown Source)
    at oracle.olapi.data.source.DataProvider.callGeneric(Unknown Source)
    at oracle.olapi.data.source.DataProvider.executeBuild(Unknown Source)
    at oracle.olap.awm.wizard.awbuild.UBuildWizardHelper$2.construct(Unknown Source)
    at oracle.olap.awm.ui.SwingWorker$2.run(Unknown Source)
    at java.lang.Thread.run(Thread.java:662)
    Can anyone help me?
    Thanks,
    Carlos

    I have seen this (in 11.1.0.7, I believe) when the metadata cache ("kgl") gets out of synch with the data dictionary. Specifically there is a flag that determines if prefixes get added to dimension members ("use surrogates" in AWM terms) that becomes false instead of true. If you look at the generated SQL in the OUTPUT column of the CUBE_BUILD_LOG you may find that sometimes a prefix is added to dimension members (e.g. "LEAF_LEVEL_" || dim_table.leaf_column) and othertimes it is not (e.g. just dim_table.leaf_column). A workaround if this is the case may be to execute the following (as dba) before building the dimension.
    alter system flush shared_pool;

  • Problem with OLAP DML

    Dear All,
    We are using OLAP DML to work with multi-dimensional data on an Analytic workspace. How do you access pre-stored multi dimensional variables set up in a analytic workspace, using OLAP API's.
    How/Is it possible to load Cube data from a multi-dimensional variable ?
    How or from where do we setup OLAP WORKSHEET to work with OLAP DML ??
    Regards,
    Subhankar

    Jean-Marc,
    I had an email from one of my colleagues in development and has kindly explained some errors in my previous posting. In 10.2 and earlier, relational import/export should do as good a job as EIF, except that these utilities are slower (due to the need to text encode the EIF data) and less granular (you can only export an entire schema at a time).
    Fortunately, there is no need to worry about the various objects that comprise and AW. We manage all that for you directly inside the database.
    However, the performance overhead is enough that for clients with the know-how, it's usually recommended to use EIF instead. That being said, the particular problem you are having seem extreme since you should not see a "15 minutes" to "hangs" slowdown when using relational import.
    Have you tried monitoring the export job via Enterprise Manager to check the wait events which might be occuring when the system hangs? Are there any messages in the alert log?
    It might be a good idea to open a TAR with Support to try and diagnose this issue.
    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

  • 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

  • Auditing OLAP DML queries

    I'm working in my thesys and I want to know if is there a way of watching or even better, auditing queries made with tools like awm. AWM is a good tool with graphical options, but I need to see the exact OLAP DML queries made to the analytical workspace, I mean, a sort of fine-grained auditing. Thanks a lot. By the way, I´m working with Oracle 10G release 2, and my analytic workspace is the one made with the Global schema.

    There are a few options to try, depending on what you want to audit:
    1. Turn on SQL tracing
    2. In AWM OLAP Worksheet, use the RECAP command to list previous DML calls
    3. Turn on DML tracing from OLAP worksheet:
    dbgoutfile dir_alias
    prgtrace=y
    "Open data viewer
    dbgoutfile eof "close file when done.

  • 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] display on screen the output while the program is running

    Hi,
    I'm running a script in AWM that is quite long, and I've placed some few 'show' so that I know what the program is doing, but it won't show on the screen the outputs until the program ends. I guess it writes all the outputs in a kind of buffer and release the content of the buffer at the end of the program.
    How could I have it to release this buffer continuously?
    Thanks

    i think the relational analogy would be an anonymous pl/sql block executing a list of commands while outputting a list of useful dbms_output.put_line log statements:
    Just as with SHOW and olap worksheet cmd line, you cant see the running dbms_output log while the pl/sql program is running... you need to wait for it to complete before you can see the log.
    You can write to a file and close/exit the file each time or you can write to log table and commit each time but i guess, some such heavy lifting is needed if you want to track the long running process mid-way.
    NOTE: For regular operations like dbms_cube.build load/forecast/allocate process/steps, you can always run queries against CUBE_BUILD_LOG etc mid-way. But if it's pure olap dml actions being performed then no neat pre-built handle to check things mid-way exists.

  • Anyone know of a good OLAP DML/DDL  tutorial?  (and NOT reference guide)

    In addition to Analytic Workspace, I am trying to learn how to build cubes using just the OLAP DML / DDL language.
    Oracle and others have published a great deal of reference material on the language of OLAP DML / DDL but I can't find any real tutorials that guide me logically thru the process of creating cubes and all that goes with it (defining dimensions, hierarchies, measures, calculations etc..) All the reference material is spread out in bits and pieces and difficult to efficiently learn from. Does anyone have any good OLAP DML / DDL tutorial links they could recommend? Thanks.

    John W wrote:
    Oracle and others have published a great deal of reference material on the language of OLAP DML / DDL but I can't find any real tutorials that guide me logically thru the process of creating cubes and all that goes with it (defining dimensions, hierarchies, measures, calculations etc..) All the reference material is spread out in bits and pieces and difficult to efficiently learn from. Does anyone have any good OLAP DML / DDL tutorial links they could recommend? Thanks.This is a very difficult task. The OLAP DML/DDL only supports basic multidimensional variables, dimensions (very primitive), and relations. The externally visible cubes and dimensions are a construct of a lot of component objects (a dimension has many primitive dimensions and relations put together to create the higher level DIMENSION that goes with a cube; a cube has multiple variables and other pieces that get put together) in the AW, plus a bunch of metadata objects in the Oracle dictionary.
    You really don't want to try to create your own and expect them to interact with the OLAPI interfaces. It is possible to construct your own version of things, but you'd also have to do your own view generation, etc. There are applications out there that are created from scratch, but they are completely from scratch (including whatever interactions they have via SQL). Whatever you create will not work with any of the Oracle-provided interfaces, nor the recently-announced Simba MDX package.
    Jim

  • OLAP DML question

    Hello,
    I have a question on OLAP DML. Please consider the following example (this is from the sample PERMIT_READ from the supplied global schema). It is an sql import statement which is supposed to be faster than a fetch loop.
    sql import c1 into -
    :_item -
    :_family -
    :_class -
    :_totprod then <product_isvisible (product _item) =  true -
    product_isvisible (product _family) =  true -
    product_isvisible (product _class) =  true -
    product_isvisible (product _totprod) =  true -
    >
    The assumption here is that the cursot c1 has been defined earlier that selects some relational table in four variables.
    The statement then assigns isvisible attribute with true for the different members of product dimension.
    Now here - if the any of the variables (_item, family, class or _totprod) have fetched a value that does not find a match in the dimension I get the following error -
    ERROR: (MXXEQ35) %a %k %j
    %1p is not a valid %2p.
    ERROR: (ORA-34370) Permission to attach analytic workspace GLOBAL.GLOBAL denied by a PERMIT program.
    How can I ignore such errors? and continue with the import execution? If possible, i do not want to use fetch loop.
    THanks.
    pxsheth.

    Here's the full text of the PERMIT_READ program. I added the MATCHSKIPERR but I still get the same errors. I am actually dealing with different dimension here. But that should not matter for the sake of this discussion.
    "* This program scopes the available business_unit dimension members.
    "* This program is called automatically whenever this AW has been attached read-only,
    "* regardless of the mechanism (thru SQL,Discoverer, Spreadsheet Addin, third parties, etc.)
    "* Fine grained access control has been applied to the gc_sec_bu_opr view.
    "* This program reads this table
    "* to determine the business_units and nodes that should be visible to the user
    vrb _bu text
    trap on error
    oknullstatus = yes
    permiterror = no "Do not throw error when attempting to access scoped data
    limit bu to all
    bu_isvisible = NA
    SQL DECLARE c1 CURSOR FOR -
    select business_unit -
    from gcdemo.gc_sec_bu_opr
    sql open c1
    if sqlcode ne 0
    then show sqlerrm
    sql begin
    sql import c1 into -
    :MATCHSKIPERR bu then <buisvisible (bu _bu) =  true>
    sql exception
    sql when others then
    sql null
    sql end
    if sqlcode eq -1
    then show sqlerrm
    SQL close c1
    SQL CLEANUP
    cns bu
    permit read when nafill(bu_isvisible, no)
    alldone:
    return true
    error:
    return false
    "****************************************************************************************

  • 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.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Maybe you are looking for

  • How to install windows 8.1 in macbookpro

    how to install windows 8.1 in macbookpro im using MacbookPro version 10.8.3

  • PHP & ORACLE Connectivity on Solaris

    Hi all, You can check this site for PHP and Oracle connection tutorial. It is intended to installing Apache and PHP with Oracle support and connecting and using Oracle via PHP. Page URL : http://gokmen.selcuk.edu.tr/tutor/orasol/ociphp.php Additional

  • Notification Settings don't stick

    I'm running Yosemite (10.10) I have 3 Macs and this happens on all 3.  (mid 2011 Macbook Air 13", Late 2013 iMac 27", 2013 Macbook Air Retina 15") I go into Notification settings and then click on Messages.  I change the Messages alert style from Ban

  • How to add JDBC Driver to my CLASSPATH

    Hi~ I use MySQL JDBC Driver in my program like that Class.forName("com.mysql.jdbc.Driver");But when I try to run it, I got a ClassNoFound Exception,I hava add mysql-connector-java-5.0.3-bin.jar into my CLASSPATH, but it no use.How to fix it ? Thanks

  • Export dump error

    When executing the following command to export my database, I have this error. How to solve this error? Help me !!! expdp vonkiemviec/vonkiemviec@dev1 directory=data dumpfile=20090506_vonkiemviec_dev.dmp logfile=vonkiemviec.log ; Export: Release 10.2