Skip Headers

Oracle® OLAP DML Reference
10g Release 1 (10.1)

Part Number B10339-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Feedback

Go to previous page
Previous
Go to next page
Next
View PDF

ONATTACH

A program that you write and that Oracle OLAP checks for by name when an AW ATTACH statement executes. Depending on the value returned by the program, Oracle OLAP executes the code within the program immediately after attaching the analytic workspace.


Note:

Oracle OLAP checks for other programs when a user attaches a workspace. See "Programs Executed When Attaching Analytic Workspaces" for more information.

Returns

BOOLEAN

TRUE when Oracle OLAP has successfully set up and attached the analytic workspace; or FALSE when it has not or when the onattach program has thrown an exception.


Note:

You are encouraged to use the normal return values rather than relying on exceptions to create a return value of FALSE.

Syntax

To define a program with the name ONATTACH use the syntax shown in DEFINE PROGRAM. Code the actual program as a user-defined function with the following argument.

ONATTACH ({READ|WRITE|EXCLUSIVE|MULTI} password)

Arguments

See AW ATTACH for explanations of the attachment modes (that is, READ, WRITE, EXCLUSIVE, and MULTI) and password.

Notes


Creating an ONATTACH program

A program with the name of onattach does not exist within an analytic workspace unless you define and write one. You write a onattach as a user-defined functions that returns a BOOLEAN value. You can use the return value to indicate to Oracle OLAP whether or not the user has the right to attach the workspace.

Depending on the statements in the onattach program, the user is granted or denied access to specific objects or sets of object values.For multiwriter attachment, you can use ACQUIRE statements to provide access to individual workspace objects. For read-only and read/write attachment, you can use PERMIT commands that grant or restrict access to individual workspace objects


Note:

All of the objects referred to in a given onattach program must exist in the same analytic workspace.

Examples

For examples of how attachment programs behave, see Example 8-14, "Startup Programs".