Oracle® OLAP DML Reference 10g Release 1 (10.1) Part Number B10339-02 |
|
|
View PDF |
The REVERT command drops all changes made to the specified objects since they were last updated, resynchronized (using the RESYNC command), or acquired using ACQUIRE the RESYNC phrase, or since the analytic workspace was attached.
Syntax
REVERT [objects] [analytic_workspaces]
Arguments
When you do not specify any parameters, all objects in the current analytic workspace are reverted.
A list of the names, separated by commas, of acquired variables, valuesets, relations, or dimensions in an analytic workspace attached in multiwriter mode or a list of variables, valuesets, relations, or dimensions in an analytic workspace attached in read-only mode.
A list of names, separated by commas, of analytic workspaces attached in either multiwriter or read-only mode. When you specify the name of an analytic workspace attached in multiwriter mode, all acquired variables, valuesets, relations, and dimensions in that workspace are reverted. When you specify the name of an analytic workspace attached in read-only mode, all variables, valuesets, relations, and dimensions in that workspace are reverted. Additionally, regardless of the attachment mode (multiwriter or read-only), all temporary variables and dimensions are emptied, all session-temporary objects are deleted, and all workspace-specific status and environment is reset.
Notes
Reverting a dimension after adding dimension values is not recommended since it can result in suboptimal space allocation for variables dimensioned by the dimension.
Examples
Example 21-5 Using REVERT to Undo Modifications
Assume that you have a variable named budget
in an analytic workspace named myworkspace
. Assume, also, that you need to modify budge
t in several steps but do not want to update the analytic workspace data until all steps are completed. For each step, you want to run several models to find the one that produces desired results. To perform this task, take the following steps:
Attach the analytic workspace in multiwriter mode.
Acquire budget
.
For each step:
Run the appropriate models, performing revert operations between them until you finds the desired model
Update budget
.
Commit and release budget
.
The following code accomplishes these tasks.
AW ATTACH myworkspace MULTI ACQUIRE RESYNC budget ...try model 1a --> not acceptable REVERT budget ...try model 1b --> ok. Done with Step 1 UPDATE MULTI budget ...try model 2a --> not acceptable REVERT budget ...try model 2b --> not acceptable REVERT budget ...try model 2c --> ok. Done with Step 2 UPDATE MULTI budget ...try model 3a --> ok. Done with Step 3. Done with all steps. UPDATE MULTI budget COMMIT RELEASE budget AW DETACH myworkspace