Skip Headers

Oracle® Database Application Developer's Guide - Workspace Manager
10g Release 1 (10.1)

Part Number B10824-01
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

5 Workspace Manager Metadata Views

Workspace Manager creates and maintains metadata views to hold information about such things as version-enabled tables, workspaces, savepoints, users, privileges, locks, and conflicts. These views are read-only to users. You can use the information in these views to help administer the Workspace Manager environment and diagnose problems.

There are also views created for each version-enabled table, as follows:

5.1 ALL_MP_GRAPH_WORKSPACES

ALL_MP_GRAPH_WORKSPACES contains information about multiparent graph workspaces (explained in Section 1.1.10) for which the leaf workspace can be accessed by the current user.

Related View

5.2 ALL_MP_PARENT_WORKSPACES

ALL_MP_PARENT_WORKSPACES contains information about parent workspaces of multiparent workspaces (explained in Section 1.1.10) that the current user can access.

Related View

5.3 ALL_VERSION_HVIEW

ALL_VERSION_HVIEW contains information about the version hierarchy. It is used by Workspace Manager to perform queries against the xxx_HIST views (described in Section 5.43).

Column Datatype Null? Description
VERSION NUMBER(38) NOT NULL Version number of the workspace identified in the WORKSPACE column.
PARENT_VERSION NUMBER(38)
Version number of the parent version of the version identified in the VERSION column.
WORKSPACE VARCHAR2(30)
Name of the workspace associated with the version number in the VERSION column.

5.4 ALL_WM_CONS_COLUMNS

ALL_WM_CONS_COLUMNS contains information about columns in unique constraints on version-enabled tables on which the current user has one or more of the following privileges: SELECT, INSERT, UPDATE, or DELETE.

Related View

5.5 ALL_WM_CONSTRAINTS

ALL_WM_CONSTRAINTS contains information about constraints on version-enabled tables on which the current user has one or more of the following privileges: SELECT, INSERT, UPDATE, or DELETE. It provides information about the following kinds of constraints: UNIQUE constraint, unique index, PRIMARY KEY constraints, and CHECK constraints.

Related View

5.6 ALL_WM_IND_COLUMNS

ALL_WM_IND_COLUMNS contains information about indexes used for enforcing unique constraints on version-enabled tables on which the current user has one or more of the following privileges: SELECT, INSERT, UPDATE, or DELETE.

Related View

5.7 ALL_WM_IND_EXPRESSIONS

ALL_WM_IND_EXPRESSIONS contains information about functional expressions on functional unique indexes on version-enabled tables on which the current user has one or more of the following privileges: SELECT, INSERT, UPDATE, or DELETE.

Related View

5.8 ALL_WM_LOCKED_TABLES

ALL_WM_LOCKED_TABLES contains information about Workspace Manager locks on rows in version-enabled tables that the current user can access.

Related View

5.9 ALL_WM_MODIFIED_TABLES

ALL_WM_MODIFIED_TABLES contains information about all version-enabled tables that have been modified and on which the current user has one or more of the following privileges: SELECT, INSERT, DELETE, UPDATE.

Related View

5.10 ALL_WM_RIC_INFO

ALL_WM_RIC_INFO contains information about referential integrity constraints in version-enabled tables that the current user can access. Workspace Manager uses this information to provide referential integrity support, which is described in Section 1.9.1.

Related View

5.11 ALL_WM_TAB_TRIGGERS

ALL_WM_TAB_TRIGGERS contains information about triggers that the current user created and for version-enabled tables owned by the current user that have triggers defined on them. If the current user has the CREATE ANY TRIGGER privilege, trigger information is displayed for all version-enabled tables.

Related View

TRIGGER_TYPE is one of the following values:

5.12 ALL_WM_VERSIONED_TABLES

ALL_WM_VERSIONED_TABLES contains information about all version-enabled tables on which the current user has one or more of the following privileges: SELECT, INSERT, DELETE, UPDATE.

Related View

STATE is one of the following values:

5.13 ALL_WM_VT_ERRORS

ALL_WM_VT_ERRORS contains information about the error that occurred during the last call to the DisableVersioning or CommitDDL procedure that specified a table on which the current user has one or more of the following privileges: SELECT, INSERT, DELETE, UPDATE.

Related View

5.14 ALL_WORKSPACE_PRIVS

ALL_WORKSPACE_PRIVS contains information about Workspace Manager privileges in all workspaces that the current user can access.

Related View

5.15 ALL_WORKSPACE_SAVEPOINTS

ALL_WORKSPACE_SAVEPOINTS contains information about savepoints in all workspaces that the current user can access.

Related View

5.16 ALL_WORKSPACES

ALL_WORKSPACES contains information about all workspaces that the current user can access.

Related View

5.17 DBA_WM_SYS_PRIVS

DBA_WM_SYS_PRIVS contains information about all users that have Workspace Manager system-level privileges (that is, privilege names containing _ANY_WORKSPACE, as explained in Section 1.4). This view is only available to users with the WM_ADMIN_ROLE role.

Column Datatype Null? Description
GRANTEE VARCHAR2(30)
User or role to which the system-level privilege was granted.
PRIVILEGE VARCHAR2(22)
Name of the Workspace Manager system-level privilege.
GRANTOR VARCHAR2(30)
User or role that granted the system-level privilege.
GRANTABLE VARCHAR2(3)
YES if grantee was given the grant option (that is, can grant the privilege to other users); NO if grantee was not given the grant option.

5.18 DBA_WORKSPACE_SESSIONS

DBA_WORKSPACE_SESSIONS contains information about all users and workspaces (except for the LIVE workspace). This view is only available to users with the WM_ADMIN_ROLE role. It is useful for monitoring users in the different workspaces.

Column Datatype Null? Description
USERNAME VARCHAR2(30)
User name.
WORKSPACE VARCHAR2(30) NOT NULL Workspace that the user is currently in.
SID NUMBER
Session ID.
STATUS VARCHAR2(8)
ACTIVE if the user currently has an open transaction (that is, a database transaction); INACTIVE if the user does not have an open transaction.

5.19 ROLE_WM_PRIVS

ROLE_WM_PRIVS contains information about privileges that all roles granted to the current user have in each workspace.

Related View

5.20 USER_MP_GRAPH_WORKSPACES

USER_MP_GRAPH_WORKSPACES contains information about multiparent graph workspaces (explained in Section 1.1.10) for which the leaf workspace is owned by the current user. Its columns are the same as those in ALL_MP_GRAPH_WORKSPACES in Section 5.1.

5.21 USER_MP_PARENT_WORKSPACES

USER_MP_PARENT_WORKSPACES contains information about parent workspaces of multiparent workspaces (explained in Section 1.1.10) that the current user owns. Its columns are the same as those in ALL_MP_PARENT_WORKSPACES in Section 5.2.

5.22 USER_WM_CONS_COLUMNS

USER_WM_CONS_COLUMNS contains information about columns in unique constraints on version-enabled tables of which the current user is the owner. Its columns are the same as those in ALL_WM_CONS_COLUMNS in Section 5.4, except it does not contain an OWNER column.

5.23 USER_WM_CONSTRAINTS

USER_WM_CONSTRAINTS contains information about constraints on version-enabled tables of which the current user is the owner. It provides information about the following kinds of constraints: UNIQUE constraint, unique index, PRIMARY KEY constraints, and CHECK constraints. Its columns are the same as those in ALL_WM_CONSTRAINTS in Section 5.5, except it does not contain an OWNER or INDEX_OWNER column.

5.24 USER_WM_IND_COLUMNS

USER_WM_IND_COLUMNS contains information about indexes used for enforcing unique constraints on version-enabled tables of which the current user is the owner. Its columns are the same as those in ALL_WM_IND_COLUMNS in Section 5.6, except it does not contain an OWNER column.

5.25 USER_WM_IND_EXPRESSIONS

USER_WM_IND_EXPRESSIONS contains information about indexes used for enforcing unique constraints on version-enabled tables of which the current user is the owner. Its columns are the same as those in ALL_WM_IND_EXPRESSIONS in Section 5.7, except it does not contain an OWNER column.

5.26 USER_WM_LOCKED_TABLES

USER_WM_LOCKED_TABLES contains information about Workspace Manager locks on rows in version-enabled tables of which the current user is the owner. Its columns are the same as those in ALL_WM_LOCKED_TABLES in Section 5.8.

5.27 USER_WM_MODIFIED_TABLES

USER_WM_MODIFIED_TABLES contains information about version-enabled tables that have been modified and of which the current user is the owner. Its columns are the same as those in ALL_WM_MODIFIED_TABLES in Section 5.9.

5.28 USER_WM_PRIVS

USER_WM_PRIVS contains information about privileges that the current user has in each workspace.

Related View

5.29 USER_WM_RIC_INFO

USER_WM_RIC_INFO contains information about referential integrity constraints in version-enabled tables of which the current user is the owner. Its columns are the same as those in ALL_WM_RIC_INFO in Section 5.10.

Workspace Manager uses this information to provide referential integrity support, which is described in Section 1.9.1.

5.30 USER_WM_TAB_TRIGGERS

USER_WM_TAB_TRIGGERS contains information about triggers that are owned by the current user and that are on version-enabled tables. Its columns are the same as those in ALL_WM_TAB_TRIGGERS in Section 5.11, except that it does not contain the TRIGGER_OWNER column.

5.31 USER_WM_VERSIONED_TABLES

USER_WM_VERSIONED_TABLES contains information about version-enabled tables of which the current user is the owner. Its columns are the same as those in ALL_WM_VERSIONED_TABLES in Section 5.12.

5.32 USER_WM_VT_ERRORS

USER_WM_VT_ERRORS contains information about the error that occurred during the last call to the DisableVersioning or CommitDDL procedure that specified a table of which the current user is the owner and on which the current user has one or more of the following privileges: SELECT, INSERT, DELETE, UPDATE. Its columns are the same as those in ALL_WM_VT_ERRORS in Section 5.13.

5.33 USER_WORKSPACE_PRIVS

USER_WORKSPACE_PRIVS contains information about Workspace Manager privileges in workspaces created by the current user. Its columns are the same as those in ALL_WORKSPACE_PRIVS in Section 5.14.

5.34 USER_WORKSPACE_SAVEPOINTS

USER_WORKSPACE_SAVEPOINTS contains information about savepoints in workspaces created by the current user. Its columns are the same as those in ALL_WORKSPACE_SAVEPOINTS in Section 5.15.

5.35 USER_WORKSPACES

USER_WORKSPACES contains information about workspaces created by the current user. Its columns are the same as those in ALL_WORKSPACES in Section 5.16.

5.36 WM_COMPRESS_BATCH_SIZES

WM_COMPRESS_BATCH_SIZES contains information related to compression capabilities for version-enabled tables. This view is only available to users with the WM_ADMIN_ROLE role.

Column Datatype Null? Description
OWNER VARCHAR2(30) NOT NULL User name of the table owner.
TABLE_NAME VARCHAR2(30) NOT NULL Name of the version-enabled table.
BATCH_SIZE VARCHAR2(23)
TABLE if the table can be compressed as a single batch only; TABLE/PRIMARY_KEY_RANGE if the table can be compressed as a single batch or in multiple batches.
NUM_BATCHES NUMBER
1 if BATCH_SIZE is TABLE, or a number specifying the number of batches to be used for compression operations when a batch size of PRIMARY_KEY_RANGE is used.

5.37 WM_COMPRESSIBLE_TABLES

WM_COMPRESSIBLE_TABLES contains information about version-enabled tables that need to be compressed (if compression is to be performed) between two savepoints in a workspace. To create rows in this view, use the SetCompressWorkspace procedure.

Column Datatype Null? Description
OWNER VARCHAR2(30) NOT NULL User name of the table owner.
TABLE_NAME VARCHAR2(30) NOT NULL Name of the version-enabled table.
WORKSPACE VARCHAR2(256)
Name of a workspace that was set as a result of a call to the SetCompressWorkspace procedure.
BEGIN_SAVEPOINT VARCHAR2(256)
Savepoint on the first version of the compression range. If the firstSP parameter was null in the call to the SetCompressWorkspace procedure, this column contains BEGINNING.
END_SAVEPOINT VARCHAR2(256)
Savepoint on the last version of the compression range. If both the firstSP and secondSP parameters were null in the call to the SetCompressWorkspace procedure, this column contains LATEST.

5.38 WM_EVENTS_INFO

WM_EVENTS_INFO contains information about the capture of Workspace Manager events. For information about Workspace Manager events, see Chapter 2.

Column Datatype Null? Description
EVENT_NAME VARCHAR2(30) NOT NULL Name indicating the type of event.
CAPTURE VARCHAR2(30)
ON if events of this type are being captured; OFF if events of this type are not being captured.

5.39 WM_INSTALLATION

WM_INSTALLATION contains information about the installed release of Workspace Manager. The information includes the Workspace Manager version number (OWM_VERSION) and the Workspace Manager system parameters.

Column Datatype Null? Description
NAME VARCHAR2(100)
Name of an informational item or system parameter pertaining to the current release of Workspace Manager on the system. (System parameters are explained in Section 1.5.)
VALUE VARCHAR2(4000)
Value associated with the informational item or system parameter identified in the NAME column.

5.40 WM_REPLICATION_INFO

WM_REPLICATION_INFO contains information about the Workspace Manager replication environment. For information about using Oracle replication with Workspace Manager, see Appendix C.

Column Datatype Null? Description
GROUPNAME VARCHAR2(30) NOT NULL Name of the main group for replication.
WRITERSITE VARCHAR2(128)
Name of the writer site in the replication environment.

5.41 xxx_CONF Views

There is one conflict view for each version-enabled table. Each conflict view has a name in the form <table_name>_CONF. For example, if the EMPLOYEE table is version-enabled, the EMPLOYEE_CONF metadata view exists.

Each conflict view contains the columns shown in Table 5-1.

Table 5-1 Columns in the xxx_CONF Views

Column Datatype Description
WM_WORKSPACE VARCHAR2(256) Workspace in which the conflict exists.
(One column for each column in original table) (Same as column in original table) Value of the column in this workspace.
WM_VALID WM_PERIOD Time period during which the row is valid, if the table has valid time support (described in Chapter 3).
WM_DELETED VARCHAR2(3) YES if the row has been deleted; NO if the row has not been deleted; NE if the row is nonexistent (does not exist).
WM_CONFLICTPERIOD WM_PERIOD Overlapping period of the rows for which conflicts were detected, if the table has valid time support (described in Chapter 3).

The following example lists the key value and all column values of conflicting rows in the EMPLOYEE table in the current workspace and the parent workspace. This view is available after the SetConflictWorkspace procedure has been called specifying the child workspace (the current workspace in this case).

SELECT * FROM EMPLOYEE_CONF;

If ID, NAME, and CITY are the columns in the EMPLOYEE table, then assume the following values:

WM_WORKSPACE  ID   NAME    CITY     WM_DEL
NEWWORKSPACE  12   SMITH   NASHUA   NO
DiffBase      12   SMITH   NY       NO
LIVE          12   SMITH   BOSTON   NO

The database row identified by ID = 12 was changed in NEWWORKSPACE and LIVE workspaces. In NEWWORKSPACE the city was changed to NASHUA, and in the LIVE workspace the city was changed to BOSTON. When NEWWORKSPACE is merged into LIVE, this row will show up as a conflict. The application must pick between the choices and resolve conflicts in favor of the workspace with the desired value.

The following example begins a conflict resolution session, calls the ResolveConflicts procedure to delete the conflicting row from the NEWWORKSPACE workspace and to insert the value in the parent workspace (LIVE) into both workspaces, commits the transaction, and ends the conflict resolution session.

DBMS_WM.BeginResolve ('NEWWORKSPACE');
DBMS_WM.ResolveConflicts ('NEWWORKSPACE', 'EMPLOYEE', 'ID = 12', 'PARENT');
COMMIT;
DBMS_WM.CommitResolve ('NEWWORKSPACE');

For additional information about conflict resolution, see Section 1.1.4.

5.42 xxx_DIFF Views

There is one difference view for each version-enabled table. Each difference view has a name in the form <table_name>_DIFF. For example, if the EMPLOYEE table is version-enabled, the EMPLOYEE_DIFF metadata view exists. Rows are added to one or more xxx_DIFF views each time the SetDiffVersions procedure is executed.

Each difference view contains the columns shown in Table 5-2.

Table 5-2 Columns in the xxx_DIFF Views

Column Datatype Description
(One column for each column in original table) (Same as column in original table) Value of the column in this workspace.
WM_VALID WM_PERIOD Time period during which the row is valid, if the table has valid time support (described in Chapter 3).
WM_DIFFVER VARCHAR2(256) Branch from which the values in the preceding columns are taken. (See the explanation following this table.)
WM_CODE VARCHAR2(2) One of the following codes describing the change: U (updated), D (deleted), I (inserted), NC (no change), NE (nonexistent).
WM_DIFFPERIOD WM_PERIOD Overlapping period of the rows for which a difference was detected were detected, if the table has valid time support (described in Chapter 3).

The WM_DIFFVER value is in one of the following formats:

If the two-parameter version of the SetDiffVersions procedure was used, the value of savepoint1 or savepoint2 is LATEST.

Note the following about the possible values for WM_CODE:

For more information, including an example showing rows being added to a differences view, see the section on the SetDiffVersions procedure in Chapter 4.

5.43 xxx_HIST Views

There is one history view for each version-enabled table if the table was version-enabled with the hist parameter set to VIEW_W_OVERWRITE or VIEW_WO_OVERWRITE in the call to the EnableVersioning procedure. Each history view has a name in the form <table_name>_HIST. For example, if the EMPLOYEE table is version-enabled with the hist parameter set to VIEW_W_OVERWRITE or VIEW_WO_OVERWRITE, the EMPLOYEE_HIST metadata view exists.

You can use the history views to log and audit modifications to version-enabled tables.

Each history view contains the columns shown in Table 5-3.

Table 5-3 Columns in the xxx_HIST Views

Column Datatype Description
(One column for each column in original table) (Same as column in original table) Value of the column in this workspace.
WM_VALID WM_PERIOD Time period during which the row is valid, if the table has valid time support (described in Chapter 3).
WM_WORKSPACE VARCHAR2(30) Name of the workspace containing the row.
WM_VERSION NUMBER(30) Version number of the row with which the data is associated.
WM_USERNAME VARCHAR2(4000) Name of the user that created the row.
WM_OPTYPE VARCHAR2(1) Type of change operation that was performed on the row: D (delete), I (insert), or U (update).
WM_CREATETIME TIMESTAMP WITH TIME ZONE Time when the row was created or updated.
WM_RETIRETIME TIMESTAMP WITH TIME ZONE Time when the row was deleted or modified.

5.44 xxx_LOCK Views

There is one lock view for each version-enabled table. Each lock view has a name in the form <table_name>_LOCK. For example, if the EMPLOYEE table is version-enabled, the EMPLOYEE_LOCK metadata view exists. (For an explanation of Workspace Manager locking, see Section 1.3.)

Each lock view contains the columns shown in Table 5-4.

Table 5-4 Columns in the xxx_LOCK Views

Column Datatype Description
(One column for each column in original table) (Same as column in original table) Value of the column in this workspace.
WM_VALID WM_PERIOD Time period during which the row is valid, if the table has valid time support (described in Chapter 3).
WM_LOCKMODE VARCHAR2(19) Type of lock: EXCLUSIVE, WORKSPACE EXCLUSIVE, VERSION EXCLUSIVE, or SHARED.
WM_USERNAME VARCHAR2(4000) User name of the owner of the lock.
WM_LOCKINGWORKSPACE VARCHAR2(4000) Name of the workspace in which the lock was placed.
WM_INCURWORKSPACE VARCHAR2(3) YES if the row is contained in the current workspace; NO if the row is not contained in the current workspace.

5.45 xxx_MW Views

There is one multiworkspace view for each version-enabled table. Each multiworkspace view has a name in the form <table_name>_MW. For example, if the EMPLOYEE table is version-enabled, the EMPLOYEE_MW metadata view exists. Rows are added to one or more xxx_MW views each time the SetMultiWorkspaces procedure (described in Chapter 4) is executed.

Each multiworkspace view contains the columns shown in Table 5-5.

Table 5-5 Columns in the xxx_MW Views

Column Datatype Description
(One column for each column in original table) (Same as column in original table) Value of the column in this workspace.
WM_VALID WM_PERIOD Time period during which the row is valid, if the table has valid time support (described in Chapter 3).
WM_MODIFIED_BY VARCHAR2(30) Workspace containing the row that was modified.
WM_SEEN_BY VARCHAR2(4000) Comma-delimited list of workspaces from which the row is visible.
WM_OPTYPE VARCHAR2(1) One of the following codes describing the change: U (updated), I (inserted).

You can use the <table_name>_MW view to see changes in another workspace without leaving the current workspace (for example, to check if there is a conflict with the other workspace). Each row in the view shows the data as it would be in that workspace if the workspace had been merged when the row was inserted in the view.

You can also use the <table_name>_DIFF view (see Section 5.42) to see changes in another workspace without leaving the current workspace; however, the <table_name>_DIFF view can be used for only two workspaces, whereas the <table_name>_MW view can be used for any number of workspaces. In addition, the <table_name>_DIFF view shows deleted rows, whereas the <table_name>_MW view does not show deleted rows.

For more information and several examples, see the information about the SetMultiWorkspaces procedure in Chapter 4.