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

Similar Messages

  • Problem with OLAP SAPBI SHOWING Server in not responding

    Hi All,
    Problem with OLAP SAPBI SHOWING Server in not responding
    SBO0001)",
    Iam Creating a universe , When iam Retriving my olap cube query it showing the error "Server in not responding (SBO0001)",
    Thanks In advance
    Praveen Kumar Yagnamurthy

    I am receiving this same error.  I have these additional details:
    CS: COM Provider CLSID not specified or erroneous
    In my case, this is for a universe that I created in BOE XI R2 sp5.4 and migrated up to BOE XI 3.2 sp2.  This connection uses OLEDB.  I have the same situation with another universe that I migrated over that uses an ODBC connection and it works fine.
    In my case, I am not using OLAP.

  • Where I can find examples with OLAP DML to update the cube cells?

    Hi,
    Where I can find examples with OLAP DML to update/calculate the cube measure/cells?
    I would like to insert data into the cube by OLAP DML.
    Regards,
    TomB

    Not sure about examples but this is how you should proceed
    1. Limit all your dimension to the leaf level values.
    lmt financialperiod to '200901'
    lmt geography to 'XYZ'
    lmt product to 'LAPTOP'
    2. Limit your measure variable to one measure(this is applicable if you have more than one stored measure in the cube).
    for 10g
    lmt <cube name>prtmeasdim to '<MEASURE NAME>'
    for 11g
    lmt <cube name>measuredim to '<MEASURE NAME>'
    3. Write into the variable.
    for 10g
    <cube name>prttopvar = 100 -- this variable is created for a compressed & partitioned cube. for uncompressed cube the variable name is <cube name>_stored.
    Thanks
    Brijesh

  • Query AW with OLAP DML

    Hi,
    i would like to access and query my cube. Is it possible to do it without building a view? Can I do it just using OLAP DML? Where can I find an example?
    thank you

    Yes. You can query using OLAP DML. Try this in the OLAP Worksheet (within the AWM)
    (Assuming you have attached to the AW)
    allstat
    limit dimName1 to 'dimValue1'
    limit dimName2 to 'dimValue2'
    report measName1
    Hope this helps,
    Swapan.

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

  • Equivalent to ROLAP :insert, update, delete in OLAP DML?

    I have a ROLAP star schema. The process update is in Real Time using triggers in the operational tables. When an update in the operational table occur the trigger call a store procedure where : 1- find de fact row using dimensions key, 2-the messure value is update.
    Question:? How to do the same in MOLAP 11g . What are the OLAP DML commands to use?
    Thank's

    in these case what about data duplication? :
    1- the production db
    2- the star schema
    3- the molap cube
    i have 12 fact tables with millions of records.
    my abstract scenario view:
    production table:
    pk field1 field2 field3
    1 A B Z
    2 A B Y
    3 A B X
    4 A B Z
    5 A C Z
    6 A C Z
    7 E B Z
    8 E C Y
    star schema:
    dim_field1 table:
    pk field1
    1 A
    2 E
    dim_field2 table:
    pk field2
    1 B
    2 C
    fact table:
    pk id_field1 id_ field2 count
    1 1 1 4
    2 1 2 2
    3 2 1 1
    4 2 2 1
    my abstract real time update process:
    case a) change in the 4 row production table: from field2 value (B) to field2 value(C)
    step 1: search in the fact table with id_field1 value (1) and id_field2 value (1).. row 1
    step 2: count=count-1= 4-1 ( if result count=0 then delete these row 1 )
    step 3: search in the fact table with id_field1 value(1) and id_field2 value(2) ...row 2
    step 4: if that combination exists
    then count=count+1
    else insert a new fact row with count=1 and id_field1 value(1) and id_field2 value(2)
    is possible to do that with OLAP DML , please a need an example about how to do?
    Thanks

  • OLAP DML - Book

    Hi
    Can anyone suggest a good book for gettig to grips with OLAP DML?
    Thanks
    Melanie

    As Anthony said, probably the best guides you'll get to the OLAP DML are the online documentation - which also have the benefit of being free! In all honesty, the online docs are about the best & most comprehensive guide to OLAP DML, and these should be your primary source of detailed information on 9i OLAP and OLAP DML.
    If you want to buy a book, there aren't any (as far as I'm aware) that are exclusively about OLAP DML (or the old Express 4GL, which is more or less the same), but a couple that might be of interest to you are;
    - Oracle9iR2 Data Warehousing by Lillian Hobbs http://www.amazon.com/exec/obidos/ASIN/1555582877
    This covers all the 9iR2 BI&W tools, and has a chapter on the OLAP Option and OLAP DML
    - Oracle Express OLAP by Sergei Arkhipentov http://www.amazon.com/exec/obidos/ASIN/1584500840/
    Not just about Express (it also covers Disco, OWB etc) but has several chapters on Express 4GL
    hope this helps
    Mark

  • Help me? (A olap dml problem)

    1.there is a example about olap dml in oracle's document:
    DBMS_AW.EXECUTE('limit product to top 10 based on
    PctChgSalesYrAgo
    (product 'ALL PRODUCTS' customer 'ALL CUSTOMERS'
    time ‘YEAR TO DATE 2001’))
    DBMS_AW.EXECUTE('limit customer to customer.level 'TOP')
    DBMS_AW.EXECUTE(‘limit time to time.level 'YEAR')
    SELECT PERCENT.CHANGE.SALES.GROWTH FROM SALES.AW.VIEW
    2.My problem:
    what's PERCENT.CHANGE.SALES.GROWTH? how generate?
    what's SALES.AW.VIEW? how generate?
    please help me!

    It looks like SALES.AW.VIEW is a view created to allow relational reporting against an Oracle Analytic Workspace (MOLAP cube)
    My guess would be:
    1) There is a purely relational star schema that holds the sales data
    2) An analytic workspace was created from the star schema
    3) The analytic workspace was enabled for BI / discoverer viewing, which creates the relational views that know how to retrieve data from the Analytic workspace.
    To play around with this, use the "Warehouse" category in OEM to define the relational star schema dimensions and measures, and then create an Analytic workspace using the Analytic Workspace Manager.
    Hope this helps,
    Scott

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

  • Updated OLAP DML Reference 10.2 posted to OTN

    The Oracle OLAP DML Reference has been updated with corrections for Oracle Database 10.2. As you may not be aware, this document corresponds to the OHJ Help for Analytic Workspace Manager. You can find the revised doc at :
    http://www.oracle.com/technology/products/bi/olap/OLAP_DML_10.2.zip
    NOTES :
    * The part number is same as the original 10.2 version, however it has an October 2005 date on it.
    * Once AWM 10.2.0.2 is released, it will contain the updated, corresponding OHJ Help. AWM 10.2.0.1.0 and 10.2.0.1.0A contain the original 10.2 OHJ Help.

    I'm thinking I don't have a real operational problem here, but I do like to tie up any loose ends and keep things as clean as possible.
    Ditto....we had many more invalid objects after the upgrade than before and they were all OLAP related.  As we weren't using OLAP we did the cleanup to avoid any future issues.
    It seems odd to me that if one selects to install Standard Edition One, it would still install EE options at all ..... just to have DBUA choke on them later.
    Our Oracle support guy was a bit confused as to why the OLAP removal scripts didn't exist on our server.  This was expected for Standard Edition but not Enterprise Edition.  Something has probably happened during some migration/upgrade to cause this.  In any case removing the objects manually including the public OLAP synonyms resolved our issues.

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

  • I have problem with login in sql Server give me support .pre login handshake

    I have problem with login in sql Server give me support .pre login handshake

    The following threads are on the same topic:
    http://www.sql-server-performance.com/forum/threads/pre-login-handshake-error-when-connecting-to-db.687/
    http://stackoverflow.com/questions/12308340/sql-server-2000-connection-error-pre-login-handshake
    http://dbaspot.com/sqlserver-server/458011-error-occurred-during-pre-login-handshake-microsoft-sql-server-error-10054-a.html
    Kalman Toth Database & OLAP Architect
    IPAD SELECT Query Video Tutorial 3.5 Hours
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Creating a Cube using pure OLAP DML

    This should be quite simple, but neither reading OLAP_*.pdf nor googling helped me, so maybe you can give me a hint where to look:
    I want to create dimensions, populate them, create a cube, and finally populate it, using just OLAP DML (i.e. no DBMS_AW or CWM/CWM2 packages).
    1) How can I execute OLAP DML? Right now I'm using sqlplus, wrapping each line in execute dbms_aw.execute(...);
    There's some better way, right? :)
    2) Can someone give me a link to a simple tutorial, showing how to create a cube et c.? Right now I'm as far as
    AW CREATE olaptest1
    DEFINE dimfoo DIMENSION TEXT AW olaptest1
    DEFINE dimbar DIMENSION TEXT AW olaptest1
    SQL SELECT DISTINCT(foo) FROM footable ORDER BY 1 INTO :dimfoo
    (the latter one fails, telling me that "quux is not a vaild olaptest1!dimfoo")
    3) Have I understood this correctly: I only need an Catalog if I want to work with AWM or DBMS_AWM, not if I just use DML?

    I'm not sure exactly why you want to do this.
    I guess I didn't explain very clearly :)
    We (i.e. the company I work for) creates software (in C++) which needs to work with a lot of data which is in an Oracle-DB.
    As the analysis done by the SW would profit (performance-wise) from the layout of the data in an cube, we want to get the data in a cube.
    But information like the number of dimensions isn't known beforehand (as that's sth. that's dependent on the site the customer uses the SW on, and can
    change with time), the software has to do the creation of dims and the cube itself.
    (For the curious ones: http://www.centerpoint.eu.com/ )
    And as OLAPI isn't available for C++ (at least afaics), I'd really want to do this in PL/SQL.
    If you do use standard form, you then allow yourself the
    option of using the various tools later
    That's really not needed :)
    You can always build the original AW using
    AWM, then save the build script it generates, and use
    that to do subsequent builds.
    Is that build-script in OLAP DML? How do I save it?
    BTW, in addition to the SPL INFILE command, there is
    the DBMS_AW.INFILE plsql routine, which saves you
    some quotes :-).
    dbms_aw.execute('infile ''work_dir/my.inf''') vs
    dbms_aw.infile('work_dir/my.inf')
    I hate superfluous quotes :)
    Thanks Jim!

  • What are right parameter types of ODCIIndexInsert in case of creating indextype WITH ARRAY DML option (documentation mismatch)

    Hello.
    During developing Domain Index for Oracle 11.2.0.1.0 (problem also appears in 12с) i was faced with misunderstanding of parameter types of function
    ODCIIndexInsert in case of creating indextype  WITH ARRAY DML option
    According to Oracle documentation
    http://docs.oracle.com/cd/E11882_01/appdev.112/e10765/ext_idx_ref.htm#i76892
    In case of  WITH ARRAY DML option Oracle will invoke ODCIIndexInsert with following signature
    FUNCTION ODCIIndexInsert(
      ia ODCIIndexInfo,
      ridlist ODCIRidList,
      newvallist varray_of_column_type,
      env ODCIEnv)
    RETURN NUMBER
    In my case indexed column has datatype NUMBER so i defined varray_of_column_type as SYS.ODCINumberList
    STATIC FUNCTION ODCIIndexInsert(ia in sys.ODCIIndexInfo, ridlist in sys.ODCIRidList,  newvallist in sys.ODCINumberList, env in SYS.ODCIEnv) RETURN NUMBER
    Indextype was created as
    CREATE INDEXTYPE test_index_type
    FOR
    test_eq(number, number)
    USING index_methods
    WITH ARRAY DML(number, sys.ODCINumberList)
    WITH LOCAL RANGE PARTITION
    WITH SYSTEM MANAGED STORAGE TABLES;
    or
    CREATE INDEXTYPE test_index_type
    FOR
    test_eq(number, number)
    USING index_methods
    WITH ARRAY DML
    WITH LOCAL RANGE PARTITION
    WITH SYSTEM MANAGED STORAGE TABLES;
    (problem occurs in all cases)
    CREATE TABLE test_table (id NUMBER (19,0));
    CREATE INDEX test_index ON test_table(id) INDEXTYPE IS test_index_type;
    When attempting to insert data in the table
    insert into test_table values (1);
    oracle raise exception
    Error starting at line 53 in command:
    insert into test_table values (1)
    Error at Command Line:53 Column:1
    Error report:
    SQL Error: ORA-29925: cannot execute SCOTT.INDEX_METHODS.ODCIINDEXINSERT
    ORA-06553: PLS-306: wrong number or types of arguments in call to 'ODCIINDEXINSERT'
    ORA-06553: PLS-306: wrong number or types of arguments in call to 'ODCIINDEXINSERT'
    29925. 00000 -  "cannot execute %s"
    *Cause:    The specified function does not exist or does not have an
               appropriate signature.
    *Action:   Implement the function with the appropriate signature.
    So my question is.
    Is it normal behavior  of oracle (according to documentation)?
    What is correct signature of ODCIIndexInsert function in case of INDEXTYPE creation with 'WITH ARRAY DML' option and fact that indexed column has NUMBER datatype?
    By the way if i define indextype without 'WITH ARRAY DML' option signature is clear, and working. But this approach doesn't satisfies our performance needs.
    Also if i define index type with option 'WITH ARRAY DML WITHOUT COLUMN DATA' and use signature
    static function ODCIIndexInsert(ia sys.odciindexinfo,   ridlist sys.odciridlist, env sys.ODCIEnv) return number
    Everything works too. But this approach doesn't satisfies our business needs.
    Is it a way to define ODCIIndexInsert  parameter types (in case of indexing number column)  so that batch inserting works according to documentation ?
    FUNCTION ODCIIndexInsert(
          ia ODCIIndexInfo,
          ridlist ODCIRidList,
          newvallist varray_of_column_type,
          env ODCIEnv)
    I am attaching full sql script to recreate environment and reproduce the problem.
    Type definition:
    CREATE OR REPLACE TYPE index_methods AS OBJECT
      step number,
      STATIC FUNCTION ODCIGetInterfaces(ifclist OUT SYS.ODCIObjectList) RETURN NUMBER,
      STATIC FUNCTION ODCIIndexCreate (ia SYS.ODCIIndexInfo, parms VARCHAR2, env SYS.ODCIEnv) RETURN NUMBER,
      STATIC FUNCTION ODCIIndexAlter (ia sys.ODCIIndexInfo, parms IN OUT VARCHAR2, altopt number, env sys.ODCIEnv) RETURN NUMBER,
      STATIC FUNCTION ODCIIndexDrop(ia SYS.ODCIIndexInfo, env SYS.ODCIEnv) RETURN NUMBER,
      STATIC FUNCTION ODCIIndexExchangePartition(ia SYS.ODCIIndexInfo, ia1 SYS.ODCIIndexInfo, env SYS.ODCIEnv) RETURN NUMBER,
      STATIC FUNCTION ODCIIndexUpdPartMetadata(ia sys.ODCIIndexInfo, palist sys.ODCIPartInfoList, env sys.ODCIEnv) RETURN NUMBER,
      STATIC FUNCTION ODCIIndexInsert(ia in sys.ODCIIndexInfo, ridlist in sys.ODCIRidList,  newvallist in sys.ODCINumberList, env in SYS.ODCIEnv) RETURN NUMBER,
      STATIC FUNCTION ODCIIndexDelete(ia SYS.ODCIIndexInfo, rid VARCHAR2, oldval number, env SYS.ODCIEnv) RETURN NUMBER,
      STATIC FUNCTION ODCIIndexUpdate(ia SYS.ODCIIndexInfo, rid VARCHAR2, oldval number, newval number, env SYS.ODCIEnv) RETURN NUMBER,
      STATIC FUNCTION ODCIIndexStart(sctx IN OUT index_methods, ia SYS.ODCIIndexInfo,
        op SYS.ODCIPredInfo, qi sys.ODCIQueryInfo, strt number, stop number, cmpval number, env SYS.ODCIEnv) RETURN NUMBER,
      MEMBER FUNCTION ODCIIndexFetch(self IN OUT index_methods, nrows NUMBER, rids OUT SYS.ODCIridlist, env SYS.ODCIEnv) RETURN NUMBER,
      MEMBER FUNCTION ODCIIndexClose(self IN index_methods, env SYS.ODCIEnv) RETURN NUMBER
    CREATE OR REPLACE TYPE BODY index_methods IS
    STATIC FUNCTION ODCIGetInterfaces(ifclist OUT sys.ODCIObjectList) RETURN NUMBER IS
    BEGIN
      ifclist := sys.ODCIObjectList(sys.ODCIObject('SYS','ODCIINDEX2'));
      RETURN ODCIConst.Success;
    END ODCIGetInterfaces;
    STATIC FUNCTION ODCIIndexCreate (ia sys.ODCIIndexInfo, parms VARCHAR2,  env sys.ODCIEnv) RETURN NUMBER IS
    BEGIN
      RETURN ODCIConst.Success;
    END ODCIIndexCreate;
    STATIC FUNCTION ODCIIndexDrop(ia sys.ODCIIndexInfo, env sys.ODCIEnv) RETURN NUMBER IS
    BEGIN
      RETURN ODCIConst.Success;
    END ODCIIndexDrop;
    STATIC FUNCTION ODCIIndexAlter (
      ia sys.ODCIIndexInfo,
      parms IN OUT VARCHAR2,
      altopt NUMBER,
      env sys.ODCIEnv)
    RETURN NUMBER IS
    BEGIN
      RETURN ODCIConst.Success;
    END ODCIIndexAlter;
    STATIC FUNCTION ODCIIndexUpdPartMetadata(
      ia sys.ODCIIndexInfo,
      palist sys.ODCIPartInfoList,
      env sys.ODCIEnv)
    RETURN NUMBER IS
    BEGIN
      RETURN ODCIConst.Success;
    END ODCIIndexUpdPartMetadata;
    STATIC FUNCTION ODCIIndexExchangePartition(
      ia sys.ODCIIndexInfo,
      ia1 sys.ODCIIndexInfo,
      env sys.ODCIEnv)
    RETURN NUMBER IS
    BEGIN
      RETURN ODCIConst.Success;
    END ODCIIndexExchangePartition;
    STATIC FUNCTION ODCIIndexInsert(
       ia sys.ODCIIndexInfo,
       ridlist sys.ODCIRidList,
       newvallist sys.ODCINumberList,
       env sys.ODCIEnv)
    RETURN NUMBER IS
    BEGIN
      return ODCIConst.Success;
    END;
    STATIC FUNCTION ODCIIndexDelete(
       ia SYS.ODCIIndexInfo,
       rid VARCHAR2,
       oldval number,
       env SYS.ODCIEnv)
    RETURN NUMBER IS
    BEGIN
      return ODCIConst.Success;
    END;
    STATIC FUNCTION ODCIIndexUpdate(
       ia SYS.ODCIIndexInfo,
       rid VARCHAR2,
       oldval number,
       newval number,
       env SYS.ODCIEnv)
    RETURN NUMBER AS
    BEGIN
      return ODCIConst.Success;
    END;
    STATIC FUNCTION ODCIIndexStart(
      sctx IN OUT index_methods,
      ia SYS.ODCIIndexInfo,
      op SYS.ODCIPredInfo,
      qi sys.ODCIQueryInfo,
      strt number,
      stop number,
      cmpval  number,
      env SYS.ODCIEnv)
    RETURN NUMBER AS
    BEGIN
      sctx := index_methods(1);
      return ODCIConst.Success;
    END;
    MEMBER FUNCTION ODCIIndexFetch(
      self IN OUT index_methods,
      nrows NUMBER,
      rids OUT SYS.ODCIridlist,
      env SYS.ODCIEnv)
    RETURN NUMBER AS
    BEGIN
      return ODCIConst.Success;
    END;
    MEMBER FUNCTION ODCIIndexClose(self IN index_methods, env SYS.ODCIEnv) RETURN NUMBER AS
    BEGIN
      return ODCIConst.Success;
    END;
    end;
    Problem workaround:
    --drop function test_eq_fun;
    CREATE FUNCTION test_eq_fun(a number, b number) RETURN NUMBER AS
    BEGIN
      IF a = b then
        RETURN 1;
      ELSE
        RETURN 0;
      END IF;
    END;
    --drop operator test_eq;
    CREATE OPERATOR test_eq
    BINDING (number, number) RETURN NUMBER
    USING test_eq_fun;
    --drop indextype test_index_type;
    CREATE INDEXTYPE test_index_type
    FOR
    test_eq(number, number)
    USING index_methods
    WITH ARRAY DML(number, sys.ODCINumberList)
    WITH LOCAL RANGE PARTITION
    WITH SYSTEM MANAGED STORAGE TABLES;
    CREATE INDEXTYPE test_index_type
    FOR
    test_eq(number, number)
    USING index_methods
    WITH ARRAY DML
    WITH LOCAL RANGE PARTITION
    WITH SYSTEM MANAGED STORAGE TABLES;
    --drop table test_table;
    CREATE TABLE test_table (id NUMBER (19,0));
    CREATE INDEX test_index ON test_table(id) INDEXTYPE IS test_index_type;
    insert into test_table values (1);

    I get single for 1 row and batch for 2 or more rows in the following simplified simulation.
    SCOTT@orcl12c> DESC SYS.ODCINUMBERLIST
    SYS.ODCINUMBERLIST VARRAY(32767) OF NUMBER
    SCOTT@orcl12c> CREATE OR REPLACE TYPE index_methods AS OBJECT
      2  (
      3    step number,
      4    STATIC FUNCTION ODCIGetInterfaces(ifclist OUT SYS.ODCIObjectList) RETURN NUMBER,
      5    STATIC FUNCTION ODCIIndexCreate (ia SYS.ODCIIndexInfo, parms VARCHAR2, env SYS.ODCIEnv) RETURN NUMBER,
      6    STATIC FUNCTION ODCIIndexAlter (ia sys.ODCIIndexInfo, parms IN OUT VARCHAR2, altopt number, env sys.ODCIEnv) RETURN NUMBER,
      7    STATIC FUNCTION ODCIIndexDrop(ia SYS.ODCIIndexInfo, env SYS.ODCIEnv) RETURN NUMBER,
      8    STATIC FUNCTION ODCIIndexExchangePartition(ia SYS.ODCIIndexInfo, ia1 SYS.ODCIIndexInfo, env SYS.ODCIEnv) RETURN NUMBER,
      9    STATIC FUNCTION ODCIIndexUpdPartMetadata(ia sys.ODCIIndexInfo, palist sys.ODCIPartInfoList, env sys.ODCIEnv) RETURN NUMBER,
    10    STATIC FUNCTION ODCIIndexInsert(ia in sys.ODCIIndexInfo, rid in VARCHAR2,  newval in NUMBER, env in SYS.ODCIEnv) RETURN NUMBER,
    11    STATIC FUNCTION ODCIIndexInsert(ia in sys.ODCIIndexInfo, ridlist in sys.ODCIRidList,  newvallist in your_type, env in SYS.ODCIEnv) RETURN NUMBER,
    12    STATIC FUNCTION ODCIIndexDelete(ia SYS.ODCIIndexInfo, rid VARCHAR2, oldval number, env SYS.ODCIEnv) RETURN NUMBER,
    13    STATIC FUNCTION ODCIIndexUpdate(ia SYS.ODCIIndexInfo, rid VARCHAR2, oldval number, newval number, env SYS.ODCIEnv) RETURN NUMBER,
    14    STATIC FUNCTION ODCIIndexStart(sctx IN OUT index_methods, ia SYS.ODCIIndexInfo,
    15       op SYS.ODCIPredInfo, qi sys.ODCIQueryInfo, strt number, stop number, cmpval number, env SYS.ODCIEnv) RETURN NUMBER,
    16    MEMBER FUNCTION ODCIIndexFetch(self IN OUT index_methods, nrows NUMBER, rids OUT SYS.ODCIridlist, env SYS.ODCIEnv) RETURN NUMBER,
    17    MEMBER FUNCTION ODCIIndexClose(self IN index_methods, env SYS.ODCIEnv) RETURN NUMBER
    18  );
    19  /
    Type created.
    SCOTT@orcl12c> CREATE OR REPLACE TYPE BODY index_methods IS
      2  STATIC FUNCTION ODCIGetInterfaces(ifclist OUT sys.ODCIObjectList) RETURN NUMBER IS
      3  BEGIN
      4    ifclist := sys.ODCIObjectList(sys.ODCIObject('SYS','ODCIINDEX2'));
      5    RETURN ODCIConst.Success;
      6  END ODCIGetInterfaces;
      7
      8  STATIC FUNCTION ODCIIndexCreate (ia sys.ODCIIndexInfo, parms VARCHAR2,  env sys.ODCIEnv) RETURN NUMBER IS
      9  BEGIN
    10    RETURN ODCIConst.Success;
    11  END ODCIIndexCreate;
    12
    13  STATIC FUNCTION ODCIIndexDrop(ia sys.ODCIIndexInfo, env sys.ODCIEnv) RETURN NUMBER IS
    14  BEGIN
    15    RETURN ODCIConst.Success;
    16  END ODCIIndexDrop;
    17
    18  STATIC FUNCTION ODCIIndexAlter (
    19    ia sys.ODCIIndexInfo,
    20    parms IN OUT VARCHAR2,
    21    altopt NUMBER,
    22    env sys.ODCIEnv)
    23  RETURN NUMBER IS
    24  BEGIN
    25    RETURN ODCIConst.Success;
    26  END ODCIIndexAlter;
    27
    28  STATIC FUNCTION ODCIIndexUpdPartMetadata(
    29    ia sys.ODCIIndexInfo,
    30    palist sys.ODCIPartInfoList,
    31    env sys.ODCIEnv)
    32  RETURN NUMBER IS
    33  BEGIN
    34    RETURN ODCIConst.Success;
    35  END ODCIIndexUpdPartMetadata;
    36
    37  STATIC FUNCTION ODCIIndexExchangePartition(
    38    ia sys.ODCIIndexInfo,
    39    ia1 sys.ODCIIndexInfo,
    40    env sys.ODCIEnv)
    41  RETURN NUMBER IS
    42  BEGIN
    43    RETURN ODCIConst.Success;
    44  END ODCIIndexExchangePartition;
    45
    46  STATIC FUNCTION ODCIIndexInsert(
    47      ia sys.ODCIIndexInfo,
    48      rid VARCHAR2,
    49      newval NUMBER,
    50      env sys.ODCIEnv)
    51  RETURN NUMBER IS
    52  BEGIN
    53    dbms_output.put_line ('single');
    54    return ODCIConst.Success;
    55  END;
    56
    57  STATIC FUNCTION ODCIIndexInsert(
    58      ia sys.ODCIIndexInfo,
    59      ridlist sys.ODCIRidList,
    60      newvallist your_type,
    61      env sys.ODCIEnv)
    62  RETURN NUMBER IS
    63  BEGIN
    64    dbms_output.put_line ('batch');
    65    return ODCIConst.Success;
    66  END;
    67
    68  STATIC FUNCTION ODCIIndexDelete(
    69      ia SYS.ODCIIndexInfo,
    70      rid VARCHAR2,
    71      oldval number,
    72      env SYS.ODCIEnv)
    73  RETURN NUMBER IS
    74  BEGIN
    75    return ODCIConst.Success;
    76  END;
    77
    78  STATIC FUNCTION ODCIIndexUpdate(
    79      ia SYS.ODCIIndexInfo,
    80      rid VARCHAR2,
    81      oldval number,
    82      newval number,
    83      env SYS.ODCIEnv)
    84  RETURN NUMBER AS
    85  BEGIN
    86    return ODCIConst.Success;
    87  END;
    88
    89  STATIC FUNCTION ODCIIndexStart(
    90    sctx IN OUT index_methods,
    91    ia SYS.ODCIIndexInfo,
    92    op SYS.ODCIPredInfo,
    93    qi sys.ODCIQueryInfo,
    94    strt number,
    95    stop number,
    96    cmpval  number,
    97    env SYS.ODCIEnv)
    98  RETURN NUMBER AS
    99  BEGIN
    100    sctx := index_methods(1);
    101    return ODCIConst.Success;
    102  END;
    103
    104  MEMBER FUNCTION ODCIIndexFetch(
    105    self IN OUT index_methods,
    106    nrows NUMBER,
    107    rids OUT SYS.ODCIridlist,
    108    env SYS.ODCIEnv)
    109  RETURN NUMBER AS
    110  BEGIN
    111    return ODCIConst.Success;
    112  END;
    113
    114  MEMBER FUNCTION ODCIIndexClose(self IN index_methods, env SYS.ODCIEnv) RETURN NUMBER AS
    115  BEGIN
    116    return ODCIConst.Success;
    117  END;
    118  end;
    119  /
    Type body created.
    SCOTT@orcl12c> CREATE FUNCTION test_eq_fun(a number, b number) RETURN NUMBER AS
      2  BEGIN
      3    IF a = b then
      4       RETURN 1;
      5    ELSE
      6       RETURN 0;
      7    END IF;
      8  END;
      9  /
    Function created.
    SCOTT@orcl12c> CREATE OPERATOR test_eq
      2  BINDING (number, number) RETURN NUMBER
      3  USING test_eq_fun
      4  /
    Operator created.
    SCOTT@orcl12c> CREATE INDEXTYPE test_index_type
      2  FOR
      3  test_eq(number, number)
      4  USING index_methods
      5  WITH ARRAY DML(number, your_type)
      6  WITH LOCAL RANGE PARTITION
      7  WITH SYSTEM MANAGED STORAGE TABLES
      8  /
    Indextype created.
    SCOTT@orcl12c> CREATE TABLE test_table (id NUMBER (19,0))
      2  /
    Table created.
    SCOTT@orcl12c> CREATE INDEX test_index ON test_table(id) INDEXTYPE IS test_index_type
      2  /
    Index created.
    SCOTT@orcl12c> insert into test_table values (1)
      2  /
    single
    1 row created.
    SCOTT@orcl12c> insert into test_table
      2  select 2 from dual union all
      3  select 3 from dual
      4  /
    batch
    2 rows created.
    SCOTT@orcl12c> insert into test_table select deptno from dept
      2  /
    batch
    4 rows created.
    SCOTT@orcl12c> insert into test_table select object_id from user_objects
      2  /
    batch
    34 rows created.
    SCOTT@orcl12c>

Maybe you are looking for

  • I can no longer see my emails sent to me

    A day ago all emails can be recieved BUT cannot be viewed in the inbox window?? The count of the emails shows up but no emails are in the inbox. I was able to find the emails in USERS>MAIL>INBOX but they are a strange "emix" file, so they will not im

  • Mail on iCloud

    Apple i Cloud is an amateurial service notwithstanding we pay for it. It makes Blackberry looks like a giant! They need a serious cut on their share values!!!

  • New InDesign Sample, Blog Post

    Fellow CS Developers, I've just posted a new sample panel for InDesign on the CS SDK team blog, at: http://blogs.adobe.com/cssdk/2010/08/makesideheads-a-complete-indesign-cs5-panel-2.html MakeSideHeads is a fairly complete InDesign CS5 panel--it's on

  • Can't uninstall or install!

    I want to use a webcam on yahoo, but it refuses to work, so I decided to uninstall and do it all again, but when I try to reinstall, it says the program is already installed, yet I still can't use the webcam. Help?

  • My Mac Mini won't stay connected to the internet.

    I am using an Airport base station.  I get max bars on my menu bar.  I routunely connect to the internet with my laptop, my iphone and two ipads.  Never a problem.  I launch Safari or Firefox from my mini and get the message "you are not connected to