Oracle9i Supplied PL/SQL Packages and Types Reference
Release 1 (9.0.1)

Part Number A89852-02
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

DBMS_WM , 10 of 52


CreateWorkspace Procedure

This procedure creates a new workspace in the database.

Syntax

DBMS_WM.CreateWorkspace(
   workspace       IN VARCHAR2
   [, isrefreshed  IN BOOLEAN DEFAULT FALSE]
   [, description  IN VARCHAR2 DEFAULT NULL]
   [, auto_commit  IN BOOLEAN DEFAULT TRUE]);

or

DBMS_WM.CreateWorkspace(
   workspace       IN VARCHAR2,
   isrefreshed     IN BOOLEAN
   [, description  IN VARCHAR2 DEFAULT NULL]
   [, auto_commit  IN BOOLEAN DEFAULT TRUE]);

Parameters

Table 70-10 CreateWorkspace Procedure Parameters  
Parameter  Description 
workspace
 

Name of the workspace. The name is case sensitive, and it must be unique (no other workspace of the same name). 

isrefreshed
 

A boolean value (TRUE or FALSE).

TRUE causes the workspace to be continually refreshed. In a continually refreshed workspace, changes made in the parent workspace are automatically applied to the workspace after a merge or rollback operation in the parent workspace. That is, you do not need to call the RefreshWorkspace Procedure to apply the changes. A continually refreshed workspace must be created as a child of the LIVE workspace.

FALSE causes the workspace not to be continually refreshed. To refresh the workspace, you must call the RefreshWorkspace Procedure.

If you use the syntax without the isrefreshed parameter, the workspace is not continually refreshed. 

description
 

Description of the workspace. 

auto_commit
 

A boolean value (TRUE or FALSE).

TRUE (the default) causes the operation to be executed as an autonomous regular transaction that will be committed when it finishes.

FALSE causes the operation to be executed as part of the caller's open regular transaction (if one exists). If there is no open regular transaction, the operation is executed in a new regular transaction. In either case, the caller is responsible for committing the transaction. 

Usage Notes

The new workspace is a child of the current workspace. If the session has not explicitly entered a workspace, it is in the LIVE database workspace, and the new workspace is a child of the LIVE workspace. For an explanation of database workspace hierarchy, see Oracle9i Application Developer's Guide - Workspace Manager.

An implicit savepoint is created in the current version of the current workspace. (The current version does not have to be the latest version in the current workspace.) For an explanation of savepoints (explicit and implicit), see Oracle9i Application Developer's Guide - Workspace Manager.

While this procedure is executing, the current workspace is frozen in READ_ONLY mode.

This procedure does not implicitly go to the workspace created. To go to the workspace, use the GotoWorkspace Procedure.

An exception is raised if one or more of the following apply:

Examples

The following example creates a workspace named NEWWORKSPACE in the database.

EXECUTE DBMS_WM.CreateWorkspace ('NEWWORKSPACE');

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