Oracle upg adm 9i Claude DA COSTA Chap 18 Work Space Manager Page 1/20 WORK SPACE MANAGER



Documents pareils
WEB page builder and server for SCADA applications usable from a WEB navigator

Instructions Mozilla Thunderbird Page 1

that the child(ren) was/were in need of protection under Part III of the Child and Family Services Act, and the court made an order on

Once the installation is complete, you can delete the temporary Zip files..

lundi 3 août 2009 Choose your language What is Document Connection for Mac? Communautés Numériques L informatique à la portée du Grand Public

Les Triggers SQL. Didier DONSEZ. Université de Valenciennes Institut des Sciences et Techniques de Valenciennes

How to Login to Career Page

Règlement sur le télémarketing et les centres d'appel. Call Centres Telemarketing Sales Regulation

DOCUMENTATION - FRANCAIS... 2

Auto-évaluation Oracle: cours de base

Instructions pour mettre à jour un HFFv2 v1.x.yy v2.0.00

VTP. LAN Switching and Wireless Chapitre 4

DOCUMENTATION - FRANCAIS... 2

TP Contraintes - Triggers

COMMANDES SQL... 2 COMMANDES DE DEFINITION DE DONNEES... 2

INDIVIDUALS AND LEGAL ENTITIES: If the dividends have not been paid yet, you may be eligible for the simplified procedure.

Package Contents. System Requirements. Before You Begin

Support Orders and Support Provisions (Banks and Authorized Foreign Banks) Regulations

Exercices sur SQL server 2000

Olivier Mondet

RAPID Prenez le contrôle sur vos données

Le langage SQL pour Oracle - partie 1 : SQL comme LDD

Notes de cours : bases de données distribuées et repliquées

ORACLE 10G DISTRIBUTION ET REPLICATION. Distribution de données avec Oracle. G. Mopolo-Moké prof. Associé UNSA 2009/ 2010

DOCUMENTATION MODULE BLOCKCATEGORIESCUSTOM Module crée par Prestacrea - Version : 2.0

Cours Bases de données 2ème année IUT

OpenPaaS Le réseau social d'entreprise

Langage propre à Oracle basé sur ADA. Offre une extension procédurale à SQL

APPENDIX 6 BONUS RING FORMAT

Le passé composé. C'est le passé! Tout ça c'est du passé! That's the past! All that's in the past!

Improving the breakdown of the Central Credit Register data by category of enterprises

Gestion des prestations Volontaire

Contents Windows

Utiliser une WebCam. Micro-ordinateurs, informations, idées, trucs et astuces

Natixis Asset Management Response to the European Commission Green Paper on shadow banking

ETABLISSEMENT D ENSEIGNEMENT OU ORGANISME DE FORMATION / UNIVERSITY OR COLLEGE:

Configurer la supervision pour une base MS SQL Server Viadéis Services

THE LAW SOCIETY OF UPPER CANADA BY-LAW 19 [HANDLING OF MONEY AND OTHER PROPERTY] MOTION TO BE MOVED AT THE MEETING OF CONVOCATION ON JANUARY 24, 2002

Application Form/ Formulaire de demande

Quick Start Guide This guide is intended to get you started with Rational ClearCase or Rational ClearCase MultiSite.

calls.paris-neuroscience.fr Tutoriel pour Candidatures en ligne *** Online Applications Tutorial

MELTING POTES, LA SECTION INTERNATIONALE DU BELLASSO (Association étudiante de lʼensaparis-belleville) PRESENTE :

POLICY: FREE MILK PROGRAM CODE: CS-4

Contrôle d'accès Access control. Notice technique / Technical Manual

Credit Note and Debit Note Information (GST/ HST) Regulations

Partie 0 : Gestion des tablespace et des utilisateurs... 3

AMENDMENT TO BILL 32 AMENDEMENT AU PROJET DE LOI 32

Nouveautés printemps 2013

Tutoriel de formation SurveyMonkey

Le No.1 de l économie d énergie pour patinoires.

WiFi Security Camera Quick Start Guide. Guide de départ rapide Caméra de surveillance Wi-Fi (P5)

Practice Direction. Class Proceedings

Bases de Données relationnelles et leurs systèmes de Gestion

INSTITUT MARITIME DE PREVENTION. For improvement in health and security at work. Created in 1992 Under the aegis of State and the ENIM

Paxton. ins Net2 desktop reader USB

Faits saillants et survol des résultats du sondage

Compléter le formulaire «Demande de participation» et l envoyer aux bureaux de SGC* à l adresse suivante :

RULE 5 - SERVICE OF DOCUMENTS RÈGLE 5 SIGNIFICATION DE DOCUMENTS. Rule 5 / Règle 5

Supervision et infrastructure - Accès aux applications JAVA. Document FAQ. Page: 1 / 9 Dernière mise à jour: 15/04/12 16:14

ONTARIO Court File Number. Form 17E: Trial Management Conference Brief. Date of trial management conference. Name of party filing this brief

TP11 - Administration/Tuning

Formulaire d inscription (form also available in English) Mission commerciale en Floride. Coordonnées

Exemple PLS avec SAS

Mon Service Public - Case study and Mapping to SAML/Liberty specifications. Gaël Gourmelen - France Telecom 23/04/2007

Get Instant Access to ebook Cest Maintenant PDF at Our Huge Library CEST MAINTENANT PDF. ==> Download: CEST MAINTENANT PDF

SERVEUR DÉDIÉ DOCUMENTATION

English Q&A #1 Braille Services Requirement PPTC Q1. Would you like our proposal to be shipped or do you prefer an electronic submission?

Module Administration BD Chapitre 1 : Surcouche procédurale dans les SGBDS

First Nations Assessment Inspection Regulations. Règlement sur l inspection aux fins d évaluation foncière des premières nations CONSOLIDATION

Motivations (many2many) Motivations (many2one) Sur le thème de la Version. La gestion de version. La gestion de configuration.

Bill 69 Projet de loi 69

Plan. Department of Informatics

PAR RINOX INC BY RINOX INC PROGRAMME D INSTALLATEUR INSTALLER PROGRAM

The new consumables catalogue from Medisoft is now updated. Please discover this full overview of all our consumables available to you.

FILE MANAGEMENT. TABLESPACES TEMPORAIRES Temporaire par défaut autre que system

3615 SELFIE. HOW-TO / GUIDE D'UTILISATION

Copyright 2014, Oracle and/or its affiliates. All rights reserved.

TABLE DES MATIERES A OBJET PROCEDURE DE CONNEXION

F-7a-v3 1 / Bourses de mobilité / Mobility Fellowships Formulaire de demande de bourse / Fellowship Application Form

Frequently Asked Questions

Historisation des données

INVESTMENT REGULATIONS R In force October 1, RÈGLEMENT SUR LES INVESTISSEMENTS R En vigueur le 1 er octobre 2001

Gestion des utilisateurs et de leurs droits

RICHEL SERRES DE FRANCE PAR_ _02432_ALT DATE: 03/02/2012

DOCUMENTATION - FRANCAIS... 2

Acronymes et abréviations. Acronymes / Abbréviations. Signification

AIDE FINANCIÈRE POUR ATHLÈTES FINANCIAL ASSISTANCE FOR ATHLETES

Dans une agence de location immobilière...

Ordonnance sur le paiement à un enfant ou à une personne qui n est pas saine d esprit. Infant or Person of Unsound Mind Payment Order CODIFICATION

Les déclencheurs. Version 1.0. Grégory CASANOVA

et Active Directory Ajout, modification et suppression de comptes, extraction d adresses pour les listes de diffusion

Cedric Dumoulin (C) The Java EE 7 Tutorial

JSIam Introduction talk. Philippe Gradt. Grenoble, March 6th 2015

Name Use (Affiliates of Banks or Bank Holding Companies) Regulations

CETTE FOIS CEST DIFFERENT PDF

Calculation of Interest Regulations. Règlement sur le calcul des intérêts CONSOLIDATION CODIFICATION. Current to August 4, 2015 À jour au 4 août 2015

CEST POUR MIEUX PLACER MES PDF

Transcription:

Oracle upg adm 9i Claude DA COSTA Chap 18 Work Space Manager Page 1/20 Objectifs : WORK SPACE MANAGER Permettre à plusieurs utilisateurs, de lancer des campagnes dexpérimentation dml et ddl sans perturbation des objets de la base. Permettre la fusion merge de toutes les modifications Permettre lintégration des modifications, dans la base de production. Mise en oeuvre : Toutes tables ayant une PK, nappartenant pas au schéma SYS, et dont le nom fait moins de 26 caractères peuvent être versionnées. Le versioning est un état dans lequel on met la table creation de tabname_lt dbms_wm.enableversioningtabname que lon supprime par un "déversionnement : dbms_wm.disableversioningtabname ORACLE introduit les WORKSPACES architecturés à partir dune racine nommée LIVE : dbms_wm.createworkspacewsname Il ny a aucun lien entre les workspaces et les tables versionnées. Lutilisateur se rend dans un workspace avant dagir sur une table versionnée dbms_wm.gotoworkspacewsname On ne peut avoir de versionnement de table parent primary key referenced, sans versionnement de toutes les tables enfant foreign key references : on peut donc avoir versionnement de table enfant seule si elle nest pas elle même parent dune autre table enfant non versionnée : en résumé, child only ou parent + childs au disableversioning dune table, il y a adoption des modifications de lignes les plus récentes entre LIVE => fusion dans LIVE des modifs introduites dans ses enfants et la base de la table. Les modifications effectuées par les utilisateurs introduits dans un Workspace, sur une table versionnée, sapliquent sur une table temporaire de nom tabname_lt, qui comprends les colonnes de la table originale + 4 colonnes supplémentaires : VERSION, TLOCK, DELSTATUS et NEXTVER. Lutilisateur a toujours la capacité de consulter des renseignements sur sa position : connaître la liste de ses privilèges connaître workspace et savepoint courants connaître son workspace courant uniquement privlist := dbms_wm.getprivswmname dbms_wm.getsessioninfovarcurwork,varspname,varsptype varcurwork := dbms_wm.getworkspace

Oracle upg adm 9i Claude DA COSTA Chap 18 Work Space Manager Page 2/20 WORK SPACE MANAGER Mise en oeuvre : CREER CONDITIONS Identifier les scénarios dexpérimentation et les utilisateurs qui expérimenteront Accorder les privilèges dbms_wm.grantsystempriv daccés à des workspaces access_any_workspace, De fusion des workspaces merge_any_workspace, De création des workspaces create_any_workspace, De suppression des workspaces remove_any_workspace, Dannulation de modifs dans workspaces rollback_any_workspace, A lexpérimentateur username, Auquel on accorde ou non le pouvoir daccorder des privilèges wm YES NO Activer le mode versionning pour chaque table expérimentée dbms_wm.enableversioning Citer la table Ecrire historique W pour reuse,wo pour use ou non NONE dans tablename_hist Tablename, VIEW_WO_OVERWRITE NONE Créer le premier workspace fils doffice du wm LIVE dbms_wm.createworkspace wmname Entrer dans le workspace dbms_wm.gotoworkspace wmname

Oracle upg adm 9i Claude DA COSTA Chap 18 Work Space Manager Page 3/20 WORK SPACE MANAGER Mise en oeuvre : UTILISER SERVICES Engager des modifications sur les tables versionnées dml insert update delete ddl dbms_wm.beginddl Tabname constraints create drop alter... trigger index add drop modify... columns add drop enable/disable... integrity commit dbms_wm.commitddl Tabname Positionner des points de retour de façon explicite dbms_wm.createsavepoint Wmname, spname par création dun sous-wm savepoint implicite dbms_wm.createworkspace WmFilsname Revenir à un point de retour -> noaccess mode explicite si pas de SP implicite entre dbms_wm.rollbacktosp Wmname, Spname implicite derniere creation de sous-wm dbms_wm.rollbacktosp Wmname, LATEST tout le workspace si pas de SP implicite entre dbms_wm.rollbackworkspace Wmname Contrôler les accés au workspace dbms_wm.freezeworkspace Wmname, mode daccés noaccess readonly 1writer, utilisateur désigné si 1writer def user current usr1writer, forcer nx param freeze même si déjà "freezed" TRUE FALSE

Oracle upg adm 9i Claude DA COSTA Chap 18 Work Space Manager Page 4/20 WORK SPACE MANAGER Mise en oeuvre : CONCLURE SERVICES : FUSIONNER ET GERER CONFLITS remonter au niveau père avant merge "se mettre au dessus" dbms_wm.gotoworkspace WmPerename Libérer les contrôles daccés au workspace dbms_wm.unfreezeworkspace WmFilsname Pour vérifier conflits avant merge dbms_wm.setconflictworkspace wmfilsname merger père et fils dbms_wm.mergeworkspace WmFilsname Si merge failed ou vérif avortée, résoudre conflit démarrer session résolution de conflit -> 1writer mode dbms_wm.beginresolve WmFilsname identifier mêmes lignes modifiées ds père et fils select * from tablename_conf; wmnames WM_WORKSPACE valeurs des colonnes ds wm TRUE si ligne supprimée ds wm WM_DELETED tabcol1 tabcol2..tabcoln indiquer qui garder vis à vis de quel wmname dbms_wm.resolveconflicts Wmname, quelle table Tabname, quelles lignes whereclause, PARENT CHILD BASE terminer session résolution de conflit il existe aussi rollbackresolve dbms_wm.commitresolve WmFilsename Réïtérer merge accepter fusion commit ;

Oracle upg adm 9i Claude DA COSTA Chap 18 Work Space Manager Page 5/20 WORK SPACE MANAGER Mise en oeuvre : DESACTIVER VERSIONING TABLE Désactiver le mode versionning pour chaque table expérimentée dbms_wm.disableversioning Tablename, Forcer true ou non false la désactivation malgré existence wm autres TRUE FALSE En quoi se traduit un disableversioning de table? : This procedure is used to reverse the effect of the EnableVersioning procedure. It deletes the Workspace Manager infrastructure support structures for versioning of rows, but does not affect any user data in the LIVE workspace. The workspace hierarchy and any savepoints still exist, but all rows are the same as in the LIVE workspace. If there are multiple versions in the LIVE workspace of a row in the table for which versioning is disabled, only the most recent version of the row is kept.. En conséquence: si on a travaillé uniquement dans le LIVE, les lignes nouvellement créées ou mises à jour sont mises en production si on a travaillé dans des sous workspaces que lon a mergé avec le LIVE, les lignes remontées dans le LIVE sont mises en production si on a travaillé dans des sous workspaces et que lon na pas mergé avec le LIVE, toutes modifications ou créations nouvelles, perdues.

Oracle upg adm 9i Claude DA COSTA Chap 18 Work Space Manager Page 6/20 CONSIDERATIONS IMPORT/EXPORT POSSIBLES SUR DES DATABASES DORIGINE "VERSION-ENABLED" AVEC RESTRICTIONS SUIVANTES: FULL DATABASE IMPORT/EXPORT seuls autorisés WM INSTALLE et NON UTILISE sur database destination Database daccueil a WORKSPACE MANAGER installé Database daccueil na aucune table "version-enabled" IGNORE=Y à préçiser obligatoirement à limport ignorer erreurs de création dobjets

Oracle upg adm 9i Claude DA COSTA Chap 18 Work Space Manager Page 7/20 EXEMPLES This is a simplified example of using Workspace Manager to try out some scenarios. In this example, a soft drink cola manufacturer has four products, each with a marketing manager and a marketing budget. Because of an exceptional opportunity for growth in one cola_b market, the company wants to do "what-if" analyses involving different managers and budget amounts. ------------------------------------------------------------------- -- INITIAL SET-UP ------------------------------------------------------------------- -- Create the user for schema objects. CREATE USER wm_developer IDENTIFIED BY wm_developer; -- Grant regular privileges. GRANT connect, resource to wm_developer; GRANT create table to wm_developer; -- Grant WM-specific privileges with grant_option = YES. execute dbms_wm.grantsystempriv ACCESS_ANY_WORKSPACE, MERGE_ANY_WORKSPACE,CREATE_ANY_WORKSPACE, REMOVE_ANY_WORKSPACE,ROLLBACK_ANY_WORKSPACE, wm_developer, YES ; -- CREATE AND POPULATE DATA TABLE -- CONNECT wm_developer/wm_developer -- Cleanup: remove B_focus_2 workspace if it exists from previous run. execute dbms_wm.removeworkspace B_focus_2 ; -- Create a table for the annual marketing budget for several cola soft drink markets in a -- given geography such as city or state. -- Each row will contain budget data for a specific cola. Note: This table does not reflect recommended -- database design. For example, a manager ID should be used, not a name. It is deliberately oversimplified -- for purposes of illustration. CREATE TABLE cola_marketing_budget mkt_id NUMBER PRIMARY KEY, mkt_name VARCHAR232, manager VARCHAR232, -- Here a name, just for simplicity budget NUMBER -- Budget in millions of dollars. Example: 3 = $3,000,000. ;

Oracle upg adm 9i Claude DA COSTA Chap 18 Work Space Manager Page 8/20 EXEMPLES -- Version-enable the table. Specify hist option of VIEW_WO_OVERWRITE so that -- the COLA_MARKETING_BUDGET_HIST view contains complete history information. execute dbms_wm.enableversioning cola_marketing_budget, VIEW_WO_OVERWRITE ; INSERT INTO cola_marketing_budget VALUES1, cola_a, Alvarez,2.0; INSERT INTO cola_marketing_budget VALUES2, cola_b, Baker,1.5; INSERT INTO cola_marketing_budget VALUES3, cola_c, Chen,1.5; INSERT INTO cola_marketing_budget VALUES4, cola_d, Davis,3.5; COMMIT; -- Relevant data values now in LIVE workspace: -- cola_a, Alvarez, 2.0 -- cola_b, Baker, 1.5 -- cola_c, Chen, 1.5 -- cola_d, Davis, 3.5 -- CREATE WORKSPACES -- -- Create workspaces for the following scenario: a major marketing focus in the cola_b area. Managers and budget amounts for each -- One scenario B_focus_1 features a manager with more expensive plans which means more money taken from other areas budgets. -- The other scenario B_focus_2 features a manager with less expensive plans which means less money taken -- from other areas budgets. -- Two workspaces B_focus_1 and B_focus_2 are created as child workspaces of the LIVE database workspace. execute dbms_wm.createworkspace B_focus_1 ; execute dbms_wm.createworkspace B_focus_2 ; -- WORK IN FIRST WORKSPACE -- -- Enter the B_focus_1 workspace and change the cola_b manager to Beasley and raise the cola_b budget amount by 1.5 to bring it to --- 3.0. Reduce all other area budget amounts by 0.5 to stay within the overall budget. execute dbms_wm.gotoworkspace B_focus_1 ; UPDATE cola_marketing_budget SET manager = Beasley WHERE mkt_name = cola_b ; UPDATE cola_marketing_budget SET budget = 3 WHERE mkt_name = cola_b ; UPDATE cola_marketing_budget SET budget = 1.5 WHERE mkt_name = cola_a ; UPDATE cola_marketing_budget SET budget = 1 WHERE mkt_name = cola_c ; UPDATE cola_marketing_budget SET budget = 3 WHERE mkt_name = cola_d ; COMMIT; -- Relevant data values now in B_focus_1 workspace:: -- cola_a, Alvarez, 1.5 -- cola_b, Beasley, 3.0 -- cola_c, Chen, 1.0 -- cola_d, Davis, 3.0

Oracle upg adm 9i Claude DA COSTA Chap 18 Work Space Manager Page 9/20 EXEMPLES -- Freeze this workspace. Prevent any changes until workspace is unfrozen. -- However, first go to the LIVE workspace, because a workspace cannot be frozen if any users including you are in it. execute dbms_wm.gotoworkspace LIVE ; execute dbms_wm.freezeworkspace B_focus_1 ; -- WORK IN SECOND WORKSPACE -- -- Enter the B_focus_2 workspace and change the cola_b manager to Burton and raise the cola_b budget amount by 0.5 to bring it to -- 2.0. Reduce only the cola_d amount by 0.5 to stay within the overall budget. execute dbms_wm.gotoworkspace B_focus_2 ; UPDATE cola_marketing_budget SET manager = Burton WHERE mkt_name = cola_b ; UPDATE cola_marketing_budget SET budget = 2 WHERE mkt_name = cola_b ; UPDATE cola_marketing_budget SET budget = 3 WHERE mkt_name = cola_d ; COMMIT; -- Relevant data values now in B_focus_2 workspace:: -- cola_a, Alvarez, 2.0 no change from LIVE -- cola_b, Burton, 2.0 -- cola_c, Chen, 1.5 no change from LIVE -- cola_d, Davis, 3.0 same manager, new budget -- Create a savepoint B_focus_2_SP1, then change scenario to raise cola_b budget and reduce cola_d budget by 0.5 each. execute dbms_wm.createsavepoint B_focus_2, B_focus_2_SP1 ; UPDATE cola_marketing_budget SET budget = 2.5 WHERE mkt_name = cola_b ; UPDATE cola_marketing_budget SET budget = 2.5 WHERE mkt_name = cola_d ; COMMIT; -- Relevant data values now in B_focus_2 workspace: -- cola_a, Alvarez, 2.0 no change from LIVE -- cola_b, Burton, 2.5 -- cola_c, Chen, 1.5 no change from LIVE -- cola_d, Davis, 2.5 same manager, new budget

Oracle upg adm 9i Claude DA COSTA Chap 18 Work Space Manager Page 10/20 EXEMPLES -- Discard this scenario; rollback to row values at the time savepoint B_focus_2_SP1 was created. First, though, get out of the -- workspace so it can be rolled back no users in it. execute dbms_wm.gotoworkspace LIVE ; execute dbms_wm.rollbacktosp B_focus_2, B_focus_2_SP1 ; -- Go back to the B_focus_2 workspace and display current values should include budget of 2 for cola_b and 3 for cola_d. SELECT * FROM cola_marketing_budget; -- SELECT SCENARIO AND UPDATE DATABASE -- -- Assume that you have decided to adopt the scenario of the second workspace B_focus_2 using that workspace s current values. -- First go to the LIVE workspace, because the other cannot be removed or merged if any users including you are in it. execute dbms_wm.gotoworkspace LIVE ; -- Unfreeze the first workspace and remove it to discard any changes there. execute dbms_wm.unfreezeworkspace B_focus_1 ; execute dbms_wm.removeworkspace B_focus_1 ; -- Apply changes in the second workspace to the LIVE database workspace. -- Note that the workspace is removed by default after MergeWorkspace. execute dbms_wm.mergeworkspace B_focus_2 ; -- Display the current data values which are in the LIVE database workspace, which is the only workspace currently existing. SELECT * FROM cola_marketing_budget; -- DISABLE VERSIONING -- -- Disable versioning on the table because you are finished testing scenarios. -- Also, users with version enabled tables cannot be dropped, in case you want to drop the wm_developer user. -- Set force parameter to TRUE if you want to force the disabling even if changes were made in a non-live workspace. execute dbms_wm.disableversioning cola_marketing_budget, TRUE;

Oracle upg adm 9i Claude DA COSTA Chap 18 Work Space Manager Page 11/20 ACCORDER PRIVILEGES GrantSystemPriv DBMS_WM. GrantWorkspacePriv ACCESS_ANY_WORKSPACE MERGE_ANY_WORKSPACE CREATE_ANY_WORKSPACE FREEZE_ANY_WORKSPACE ACCESS_WORKSPACE MERGE_WORKSPACE CREATE_WORKSPACE FREEZE_WORKSPACE, REMOVE_ANY_WORKSPACE ROLLBACK_ANY_WORKSPACE, Wsname REMOVE_WORKSPACE ROLLBACK_WORKSPACE username role username role YES NO WITH GRANT OPTION WITHOUT GRANT OPTION YES NO WITH GRANT OPTION WITHOUT GRANT OPTION RevokeSystemPriv RevokeWorkspacePriv WM_ADMIN_ROLE granted to a tous les privilèg es avec grant option DBA

Oracle upg adm 9i Claude DA COSTA Chap 18 Work Space Manager Page 12/20 ACTIVER ET CREER HIERARCHIES DBMS_WM. LIVE enableversioning createworkspace tabname gotoworkspace createworkspace wsfils1name createworkspace wsfils2name wsfils1name wsfils2name

Oracle upg adm 9i Claude DA COSTA Chap 18 Work Space Manager Page 13/20 MODIFIER TABLES DBMS_ WM. enableversioning tabname freeze read_only LIVE createworkspace gotoworkspace freeze read_only dmls createsavepoint, spname beginddl tabname Tabname_LTS ddls commitddl rollbackddl tabname gotoworkspace createworkspace

Oracle upg adm 9i Claude DA COSTA Chap 18 Work Space Manager Page 14/20 ANNULER MODIFICATIONS DBMS_ WM. LIVE createsavepoint, spname1 RollbackToSP, spname1 createworkspace RollbackToSP, LATEST RollbackWorkspace freeze no_access BIEN VOIR : Le rollback par dessus un SP implicite établi à la création dun WS fils, est interdit, uniquement vers "LATEST". Il faut détruire ou vider le WS fils au préalable.

Oracle upg adm 9i Claude DA COSTA Chap 18 Work Space Manager Page 15/20 DBMS_ WM. LIVE FUSIONNER ET GERER LES CONFLITS createworkspace BIEN VOIR : Une mise en production des modifications nécessite une fusion merge avec le workspace LIVE. La mep ne sera effective que suite au "disableversioning" de la table BIEN VOIR : MergeWorkspace vise à remonter les modifications, du fils vers le père. Il existe également RefreshWorkspace qui vise à descendre des modifications du père vers le fils gotoworkspace beginresolve freeze 1writer setconflictworkspace Tabname_CONF resolveconflict, wsname tabname col=valeur WM_WORKSPACE LIVE LIVE PERE PERE FILS LIVE FILS WM_WORKSPACE WM_WORKSPACE PERE FILS SELECT * FROM EMPLOYEE_CONF; WM_DELETED WM_DELETED WM_DELETED true/false true/false true/false gotoworkspace freeze 1writer freeze noaccess CommitResolve RollbackResolve mergeworkspace PARENT CHILD BASE wsname WM_WORKSPACE ID NAME CITY WM_DEL NEWWORKSPACE 12 SMITH NASHUA NO DiffBase 12 SMITH NY NO LIVE 12 SMITH BOSTON NO DBMS_WM.BeginResolve NEWWORKSPACE ; DBMS_WM.ResolveConflicts NEWWORKSPACE, EMPLOYEE, ID = 12, PARENT ; COMMIT; DBMS_WM.CommitResolve NEWWORKSPACE ;

Oracle upg adm 9i Claude DA COSTA Chap 18 Work Space Manager Page 16/20 VERROUILLER DBMS_ WM. LIVE BIEN VOIR : username désigne le seul utilisateur autorisé sur le workspace gelé en mode 1writer. TRUE/FALSE force le gel avec les nouvelles options, même si le workspace est déja gelé. FreezeWorkspace, NO_ACCESS READ_ONLY 1WRITER username AUCUN ACCESS AUTORISE AU WORKSPACE SEUL ACCES EN LECTURE SEULE AUTORISE AU WORKSPACE UN SEUL USER par défaut lémetteur, sinon celui indiqué par la suite AUTORISE A ACCEDER AU WORKSPACE TRUE FAL SE GEL AVEC NLLES OPTIONS, MEME SI DEJA GELE. PAS DE GEL SI DEJA GELE UnfreezeWorkspace

Oracle upg adm 9i Claude DA COSTA Chap 18 Work Space Manager Page 17/20 DESACTIVER LE VERSIONNING DUNE TABLE This procedure is used to reverse the effect of the EnableVersioning procedure. LIVE It deletes the Workspace Manager infrastructure support structures for versioning of rows, but does not affect any user data in the LIVE workspace. The workspace hierarchy and any savepoints still exist, but all rows are the same as in the LIVE workspace. If there are multiple versions in the LIVE workspace of a row in the table for which versioning is disabled, only the most recent version of the row is kept.. DisableVersionning, Tabname TRUE/FAL SE DONC, cest cette étape qui constate déventuelles versions de ligne dans le LIVE et nen garde que les plus récentes. createworkspace BIEN VOIR : A Boolean value TRUE or FALSE. DBMS_ WM. gotoworkspace LIVE TRUE forces all data in workspaces other than LIVE to be discarded before versioning is disabled. FALSE the default prevents versioning from being disabled if table_name was modified in any workspace other than LIVE and if the workspace that modified table_name still exists.

Oracle upg adm 9i Claude DA COSTA Chap 18 Work Space Manager Page 18/20 LES VUES ALL_WM_LOCKED_TABLES Table_name Table_owner Locking_workspace Lock_m ode exclusive shared Lock_owner Version ALL_VERSION_HVIEW ALL_WM_VERSIONED_TABLES Table_name Parent_version Workspace Lock_m ode exclusive shared Table_owner Locking_workspace Lock_owner Workspace ALL_WORKSPACES Privilege ACCESS_WORKSPACE MERGE_WORKSPACE CREATE_WORKSPACE FREEZE_WORKSPACE REMOVE_WORKSPACE ROLLBACK_WORKSPACE Grantable no yes ALL_WORKSPACE_PRIVS Grantee Grantor Workspace Createtime Freeze_status Frozen Unfrozen Freeze_mode No_access Read_only 1writer resolve_status yes no Workspace_lockmode Exclusive Shared Parent_workspace Parent_savepoint Ow ner Freeze_owner Resolve_user Savepoint ALL_WORKSPACE_SAVEPOINTS Workspace Ow ner Createtime Position Numéro dordre dans séquence de création removable yes supprimable no non supprimable : implicite avec dépendances enfants canrollbackto yes il ny a pas de SP implicite, entre no il existe un SP implicite, entre. Implicit yes no

Oracle upg adm 9i Claude DA COSTA Chap 18 Work Space Manager Page 19/20 CONNAITRE SA POSITION DBMS_WM. Wsname GetPrivs SELECT DBMS_WM.GetPrivs B_focus_2 FROM DUAL; DBMS_WM.GETPRIVSB_FOCUS_2 --------------------------------------------------------------- ACCESS,MERGE,CREATE,REMOVE,ROLLBACK GetWorkspace SELECT DBMS_WM.GetWorkspace FROM DUAL; GETWORKSPACE --------------------------------------------------------------- B_focus_2, GetSessionInfo varcurworkspace varspname varsptype DECLARE current_workspace VARCHAR230; current_context VARCHAR230; current_context_type VARCHAR230; BEGIN DBMS_WM.GetSessionInfocurrent_workspace, current_context, current_context_type; DBMS_OUTPUT.PUT_LINESession currently in workspace: current_workspace; DBMS_OUTPUT.PUT_LINESession context is: current_context; DBMS_OUTPUT.PUT_LINESession context is on: current_context_type; END; / Session currently in workspace: B_focus_2 Session context is: LATEST Session context is on: LATEST PL/SQL procedure successfully completed.

Oracle upg adm 9i Claude DA COSTA Chap 18 Work Space Manager Page 20/20 CONSIDERATIONS IMPORT / EXPORT Import and Export Considerations Standard Oracle database import and export operations can be performed on version-enabled databases; however, the following considerations and restrictions apply: A database with version-enabled tables can be exported to another Oracle database only if the other database has Workspace Manager installed and does not currently have any versionenabled tables or workspaces that is, other than the LIVE workspace. Only database-wide import and export operations are supported for version-enabled databases. No other export modes such as schema, table, partition, and workspace are supported. For an import operation, you must specify IGNORE=Y. The FROMUSER and TOUSER capabilities of the Oracle9i Import utility are not supported with versionenabled databases.