Oracle9i Application Developer's Guide - Workspace Manager Release 2 (9.2) Part Number A96628-01 |
|
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.
USER_WM_VERSIONED_TABLES
(Section 3.18
) and ALL_WM_VERSIONED_TABLES
(Section 3.6
) contain information about version-enabled tables.USER_WM_MODIFIED_TABLES
(Section 3.14
) and ALL_WM_MODIFIED_TABLES
(Section 3.3
) contain information about version-enabled tables that have been modified.USER_WM_VT_ERRORS
(Section 3.19
) and ALL_WM_VT_ERRORS
(Section 3.7
) contain information about the error that occurred during the last call to the DisableVersioning procedure that specified a table on which the current user has one or more of the following privileges: SELECT
, INSERT
, DELETE
, UPDATE
.USER_WORKSPACES
(Section 3.22
) and ALL_WORKSPACES
(Section 3.10
) contain information about workspaces.USER_WORKSPACE_SAVEPOINTS
(Section 3.21
) and ALL_WORKSPACE_SAVEPOINTS
(Section 3.9
) contain information about savepoints.USER_WORKSPACE_PRIVS
(Section 3.20
) and ALL_WORKSPACE_PRIVS
(Section 3.8
) contain information about privileges specific to Workspace Manager.USER_WM_PRIVS
(Section 3.15
) contains information about privileges that the current user has in each workspace.ROLE_WM_PRIVS
(Section 3.12
) contains information about privileges that all roles granted to the current user have in each workspace.USER_WM_LOCKED_TABLES
(Section 3.13
) and ALL_WM_LOCKED_TABLES
(Section 3.2
) contain information about locks placed in the current workspace on rows in version-enabled tables.DBA_WORKSPACE_SESSIONS
(Section 3.11
) contains information about all users in all workspaces other than LIVE
.USER_WM_RIC_INFO
(Section 3.16
) and ALL_WM_RIC_INFO
(Section 3.4
) contain information about referential integrity constraints.USER_WM_TAB_TRIGGERS
(Section 3.17
) and ALL_WM_TAB_TRIGGERS
(Section 3.5
) contain information about triggers defined on version-enabled tables.ALL_VERSION_HVIEW
(Section 3.1
) contains information about the version hierarchy.WM_INSTALLATION
(Section 3.23
) contains information about the installed release of Workspace Manager.WM_REPLICATION_INFO
(Section 3.24
) contains information about the Workspace Manager replication environment.There are also views created for each version-enabled table, as follows:
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 3.28).
ALL_WM_LOCKED_TABLES
contains information about Workspace Manager locks on rows in version-enabled tables that the current user can access.
Related View
USER_WM_LOCKED_TABLES
(Section 3.13) contains information about Workspace Manager locks on rows in version-enabled tables of which the current user is the owner.
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
USER_WM_MODIFIED_TABLES
(Section 3.14) contains information about version-enabled tables that have been modified and of which the current user is the owner.
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.7.
Related View
USER_WM_RIC_INFO
(Section 3.16) contains information about referential integrity constraints in version-enabled tables of which the current user is the owner.
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
USER_WM_TAB_TRIGGERS
(Section 3.17) contains information about triggers that are owned by the current user and that are on version-enabled tables.
TRIGGER_TYPE
is one of the following values:
BIR
: before insert for each rowAIR
: after insert for each rowBUR
: before update for each rowAUR
: after update for each rowBDR
: before delete for each rowADR
: after delete for each rowBIS
: before insert for each statementAIS
: after insert for each statementBUS
: before update for each statementAUS
: after update for each statementBDS
: before delete for each statementADS
: after delete for each statementALL_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
USER_WM_VERSIONED_TABLES
(Section 3.18) contains information about version-enabled tables of which the current user is the owner.
Column | Datatype | Null? | Description |
---|---|---|---|
|
|
|
Name of a version-enabled table. |
|
|
|
Owner (schema) of the table. |
|
|
State of the table: one of the values described following this table. |
|
|
|
History option for the table: |
|
|
|
(Not used for this release.) |
|
|
|
(Not used for this release.) |
|
|
|
|
|
|
|
|
STATE
is one of the following values:
VERSIONED
: The table has been version-enabled.DV
: The table is being version-disabled.EV
: The table is being version-enabled.DDL
: The table is active in a DDL session.BDDL
: The BeginDDL procedure is being performed on the table.CDDL
: The CommitDDL procedure is being performed on the table.LWDV
: The table is being lightweight version-disabled (an internal operation).LWEV
: The table is being lightweight version-enabled (an internal operation).LW_DISABLED
: The table has been lightweight version-disabled (an internal operation).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
_USER_WM_VT_ERRORS
(Section 3.19) 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
.
Column | Datatype | Null? | Description |
---|---|---|---|
|
|
|
Owner (schema) of the table. |
|
|
|
Name of a version-enabled table. |
|
|
State of the table. For example, |
|
|
|
The SQL statement that failed during the processing of the DisableVersioning or CommitDDL procedure. |
|
|
|
Information about the state of the SQL statement that failed during the processing of the DisableVersioning or CommitDDL procedure. |
|
|
|
Error message caused by the SQL statement that failed during the processing of the DisableVersioning or CommitDDL procedure. |
ALL_WORKSPACE_PRIVS
contains information about Workspace Manager privileges in all workspaces that the current user can access.
Related View
USER_WORKSPACE_PRIVS
(Section 3.20) contains information about Workspace Manager privileges in workspaces created by the current user.
ALL_WORKSPACE_SAVEPOINTS
contains information about savepoints in all workspaces that the current user can access.
Related View
USER_WORKSPACE_SAVEPOINTS
(Section 3.21) contains information about savepoints in workspaces created by the current user.
Column | Datatype | Null? | Description |
---|---|---|---|
|
|
|
Name of the savepoint. Explicit savepoints are named by users; implicit savepoints are named by Workspace Manager. |
|
|
|
Workspace in which the savepoint was created. |
|
|
|
|
|
|
Position of the savepoint in the sequence in which savepoints were created. |
|
|
|
Name of the user that created the savepoint. |
|
|
|
Date and time that the savepoint was created. |
|
|
|
Description of the savepoint. |
|
|
|
|
|
|
|
|
ALL_WORKSPACES
contains information about all workspaces that the current user can access.
Related View
USER_WORKSPACES
(Section 3.22) contains information about workspaces created by the current user.
Column | Datatype | Null? | Description |
---|---|---|---|
|
|
Name of the workspace. |
|
|
|
Parent workspace of this workspace. |
|
|
|
Implicit savepoint that was created in the parent workspace when this workspace was created. |
|
|
|
Name of the user that created the workspace. |
|
|
|
Date and time that the workspace was created. |
|
|
|
Description of the workspace. |
|
|
|
|
|
|
|
|
|
|
|
The user allowed to make changes in the workspace; or null if the workspace is not frozen or if it is frozen in |
|
|
|
Name of the user that froze the workspace. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Name of the user that started the conflict resolution session if |
|
|
|
|
|
|
|
|
|
|
|
|
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.
ROLE_WM_PRIVS
contains information about privileges that all roles granted to the current user have in each workspace.
Related View
USER_WM_PRIVS
(Section 3.15) contains information about privileges that the current user has in each workspace.
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 3.2.
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 3.3.
USER_WM_PRIVS
contains information about privileges that the current user has in each workspace.
Related View
ROLE_WM_PRIVS
(Section 3.12) contains information about privileges that all roles granted to the current user have in each workspace.
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 3.4.
Workspace Manager uses this information to provide referential integrity support, which is described in Section 1.7.
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 3.5, except that it does not contain the TRIGGER_OWNER
column.
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 3.6.
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 3.7.
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 3.8.
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 3.9.
USER_WORKSPACES
contains information about workspaces created by the current user. Its columns are the same as those in ALL_WORKSPACES
in Section 3.10.
WM_INSTALLATION
contains information about the installed release of Workspace Manager.
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 |
---|---|---|---|
|
|
|
Name of the main group for replication. |
|
|
Name of the writer site in the replication environment. |
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 3-1.
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.
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 3-2.
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
:
NC
will appear for rows in workspaces that did not change the value when another workspace did change the value. For example, if '<workspace2>, <savepoint2>'
updated the row, the code for that row is U
, but the code for the '<workspace1>, <savepoint1>'
and 'DiffBase'
rows is NC
if they did not modify the row.NE
will appear for 'DiffBase'
if a row is inserted in one or more branches, and NE
will appear for 'DiffBase'
and a branch if only one branch has had any insert operations.For more information, including an example showing rows being added to a differences view, see the section on the SetDiffVersions procedure in Chapter 2.
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.
Each lock view contains the columns shown in Table 3-3.
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 3-4.
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 2) is executed.
Each multiworkspace view contains the columns shown in Table 3-5.
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 3.26) 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.
|
Copyright © 2000, 2002 Oracle Corporation. All Rights Reserved. |
|