/* These 5 temp tables used to copy global workspace obj(only cmpelment+namespace) into each workpace we do not need to copy from CMPSYSClasses since all the info there are static... by default, the tmp table rows will be deleted on commit. */ create global temporary table WS_TMP_CMPFCOClasses as select * from CMPFCOClasses; create global temporary table WS_TMP_CMPSCOClasses as select * from CMPSCOClasses; create global temporary table WS_TMP_CMPSCOCfgClasses as select * from CMPSCOCfgClasses; create global temporary table WS_TMP_CMPSCOMapClasses as select * from CMPSCOMapClasses; create global temporary table WS_TMP_CMPSCOPrpClasses as select * from CMPSCOPrpClasses; create global temporary table WS_TMP_FCOFOLDERNamespace as select * from FCOFOLDERNamespace; create global temporary table WS_TMP_AllPCTree as select * from AllPCTree; create global temporary table WS_TMP_AllInterlink as select * from AllInterlink; create global temporary table WS_TMP_AllIntralink as select * from AllIntralink; create table workspace_preference ( workspace_owner varchar2(30), workspace_name varchar2(200), workspace_user varchar2(30) unique ); create table ignore_lockerror_set_workspace ( ignore_lockerror number unique ); create or replace view workspace_assignment ( workspace_id, workspace_name, business_name, description, user_name, isWorkspaceOwner, createdBy, creationTimestamp, updatedby, UpdateTimestamp ) as ( select workspace.elementid , workspace.name, workspace.logicalname, workspace.description , users.name , users.isWorkspaceOwner, users.createdBy , users.CreationTimestamp, users.UpdatedBy, users.UpdateTimestamp from cmpworkspace_v workspace, cmpallwbuser_v users where users.workspaceid = workspace.elementid );