Oracle9i OLAP Services Developer's Guide to the OLAP DML
Release 1 (9.0.1)

Part Number A86720-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

Defining and Working with Analytic Workspaces, 12 of 12


Obtaining Analytic Workspace Information

Viewing a complete analytic workspace description

The DBDESCRIBE program displays a complete description of your analytic workspace, including:

Because the output from DBDESCRIBE is frequently very long, you can direct it to a file with the OUTFILE command.

outfile 'filename'
dbdescribe
outfile eof

Obtaining general analytic workspace information

The DATABASE function returns various kinds of information about attached analytic workspaces. For example, you can use the DATABASE function to learn your read or write access rights to an analytic workspace or to determine if an attached analytic workspace has been changed by a user with read/write access.

For the complete syntax for the DATABASE function, see the OLAP DML Reference. The simplified syntax of the DATABASE function is shown below.

DATABASE(choice [database-name])

The keyword you specify for choice determines the type of information that is returned by the DATABASE function. Examples of keywords are: ATTACHED, CHANGED, FILESIZE, NAME, RO, and RW.

For example, the following commands check which analytic workspace is active so the program can choose the appropriate data to report.

if DATABASE(NAME) eq 'MYSALES'
     then report sales.m
     else report gensales

Listing the names of objects in an analytic workspace

You can retrieve a list of the objects in an analytic workspace by using the LISTNAMES program. This program lists all the objects in the analytic workspace, grouped by object type and alphabetized within object type. LISTNAMES shows the total number of each type of object (dimension, variable, and so on).

Example: Listing the names of all of the objects in an analytic workspace

If the demo analytic workspace is attached, issuing the command listnames produces the following output.

11 DIMENSIONs 

19 VARIABLEs 

4 RELATIONs 

2 VALUESETs 

------------- 

-------------- 

----------- 

---------- 

CHOICE 

ACTUAL 

DIVISION.PRODUCT 

PRODUCTSET 

DISTRICT 

ADVERTISING 

MARKET.MARKET 

QUARTERSET 

DIVSION 

BUDGET 

 

 

LINE 

CHOICEDESC 

 

 

MARKET 

DEMOVER 

 

 

MARKETLEVEL 

EXPENSE 

 

 

MONTH 

FAST 

 

 

MONTH 

INDUSTRY.SALES 

 

 

PRODUCT 

NAME.LINE 

 

 

QUARTER 

NAME.PRODUCT 

 

 

REGION 

NATIONAL.SALES 

 

 

YEAR 

PRICE 

 

 

 

PRODUCT.MEMO 

 

 

 

SALES 

 

 

 

SALES.FORECAST 

 

 

 

SALES.PLAN 

 

 

 

SHARE 

 

 

 

UNITS 

 

 

 

UNITS.M 

 

 

Viewing the definitions of OLAP DML objects

To display the definitions of one or more objects, use the DESCRIBE command. For example, you can issue the following command for the demo analytic workspace.

describe price

It produces the following output.

DEFINE PRICE VARIABLE DECIMAL <MONTH PRODUCT>
LD Wholesale Unit Selling Price

If you execute the DESCRIBE command without any object names, all the objects in the current status list of the NAME dimension are described.

Listing objects that are dimensioned by a specific dimension

Use the LISTBY command to retrieve a list of all objects that are dimensioned by, or related to, a given dimension.

Example: Listing objects that are dimensioned by a specific dimension

For example, to find out which objects in the demo analytic workspace are dimensioned by, or related to, MONTH, you can use the following command.

listby month

The following list is displayed.

14 objects dimensioned by or related to MONTH in database DEMO
--------------------------------------------------------------
ACTUAL         ADVERTISING        BUDGET
EXPENSE        FCST               NATIONAL.SALES
PRICE          PRODUCT.MEMO       SALES
SALES.FORECAST SALES.PLAN         SHARE
UNITS          UNITS.M

Obtaining information about OLAP DML objects

To obtain information about OLAP DML objects, you can use the OBJ function.

Example: Obtaining the number of dimensions for the variable

The following command obtains the number of dimensions for the variable UNITS in the demo analytic workspace. The output is shown below the command.

show obj(numdims 'units')
3

Example: Obtaining the data type of a variable

The following command obtains the data type of the UNITS variable. The output is shown below the command.

show obj(data 'units') 
INTEGER

Obtaining information about groups of objects

You often use the OBJ function in conjunction with the LIMIT command and the NAME dimension in order to obtain information about groups of objects. The LIMIT command sets the status of a dimension. This means that it restricts the accessibility of dimension values, which sets a corresponding restriction on any variables or relations that are dimensioned by them. The NAME dimension contains the names of all the objects that are defined in the analytic workspace.

You can use the LIMIT command together with the OBJ function to identify a group of objects with a particular characteristic. Then, you can list the objects in the group using the STATUS command.

Example: Identifying objects by their dimensions

The following commands lists the objects that are dimensioned by both MONTH and PRODUCT.

limit name to obj(isby 'month') and obj(isby 'product')
status name

The output of these commands is shown below.

The current status of NAME is:
ADVERTISING, EXPENSE, NATIONAL.SALES, PRICE, PRODUCT.MEMO, SALES, 
SALES.FORECAST, SALES.PLAN, SHARE, UNITS, UNITS.M

Related information

For more information, see the following table.

IF you want documentation about . . .  THEN see . . . 

the status of a dimension, 

Chapter 6

the entry for the STATUS command in the OLAP DML Reference 

limiting dimensions, 

Chapter 6

the entry for the LIMIT command in the OLAP DML Reference 

the DBDESCRIBE program, LISTBY command, LISTNAMES program, NAME dimension, OBJ function 

the entry for the program, command, or function in the OLAP DML Reference 


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback