Pokud se rozhodnete provést upgrade Documentum software, je potřeba prověřit konzistenci objektů v repository. Tato potřeba může vyvstat i při běžném provozu, kdy některými neodbornými zásahy do docbáze může dojít k nekonzistencím jejího obsahu.
Dnes se podíváme, jak na to…
Máme dvě možnosti:
- V Documentum Administrator spustit job dm_consistency_checker a poté se podívat na logy.
- Spustit skript consistency_checker ručně z příkazové řádky.
Jelikož první způsob je velmi triviální, popíšeme si zde ten druhý.
Co k tomu potřebujeme? V podstatě všechny potřebné nástroje se nacházejí v instalaci binárek Documentum Content server. Takže k doinstalaci nepotřebujeme rozhodně nic dalšího. Potřebujeme tyto programy:
- dmbasic (na Windows dmbasic.exe)
- consistency_checker.ebs
Postup je takovýto:
- Přihlásíme se na Content server a spustíme příkazovou řádku.
- V ní se přesuneme do adresáře
DM_HOME/bin
(u Windows zpravidla C:Documentumproduct<číslo.verze>bin). - Zde se nachází program
dmbasic
. - Zadáme následující příkaz
dmbasic -fconsistency_checker.ebs -eEntry_Point -- <jmeno_repository> <vlastnik> <heslo>
Výstupem je log, kde můžeme zjistit případné nekonzistence a na základě těchto informací provést opravu.
Connected to the server as testrepo. CONSISTENCY CHECKER ------------------- The Consistency Checker will run 83 checks against the docbase. The goal of the Consistency Checker is to detect docbase inconsistencies as early as possible so that they may be easily fixed. Each check consists of a SQL Query that is run against various tables in the docbase to validate objects and referential integrity. . . . Beginning Consistency Checks..... Docbase Name: testrepo Server Version: 6.5.0.117 SP1 Win32.Oracle Database: Oracle ###################################################################### ## ## ## ## ## CONSISTENCY_CHECK: Users & Groups . . . Checking for ACLs with non-existent users Checking for ACLs with missing dm_acl_r table entries Checking for sysobjects with acl_domain set to non-existent user WARNING CC-0009: Sysobject with r_object_id '0b03687780129691' has acl_domain entry of 'iskrt' which is not a valid user Rows Returned: 1 Checking for sysobjects that belong to non-existent users WARNING CC-0010: Sysobject with r_object_id '090368778001b298' belongs to owne r 'odb ' which is not a valid user WARNING CC-0010: Sysobject with r_object_id '090368778001b29c' belongs to owne r 'odb ' which is not a valid user WARNING CC-0010: Sysobject with r_object_id '090368778001b2a9' belongs to owne r 'odb ' which is not a valid user Rows Returned: 3
V závěru výpisu můžeme vidět několik záznamů typu WARNING. U nich vidíme kód sestávající se z CC-<číslo>
– v tabulce na konci článku můžeme vidět popis jednotlivých kódů.
Může se stát (na Windows), že nebude nalezen soubor consistency_checker.ebs. Aby k tomu nedošlo zadáme příkaz takto:
dmbasic -fC:Documentumproduct<cislo.verze>installadminconsistency_checker.ebs ...
Potom skript proběhne bez problémů.
V následující tabulce je přehled některých nekonzistencí, které jsou označeny číselnými kódy a odkazem na řešení dané nekonzistence.
Číslo | Popis | DQL dotaz | Odkaz na řešení |
CC-0001 | Checking for users with non-existent group | ||
CC-0002 | A group contains a non-existing user in users_names attribute | select a.users_names as p1, a.r_object_id as p2 from dm_group_r a where a.users_names is not NULL and a.users_names <> ‘ ‘and not exists (select b.user_name from dm_user_s b where b.user_name = a.users_names and r_is_group = 0) | https://solutions.emc.com/emcsolutionview.asp?id=esg83317 |
CC-0007 | Check ACLs with non-existent users | http://solutions.emc.com/emcsolutionview.asp?id=esg29545 | |
CC-0010 | Check Objects for invalid users | select a.r_object_id as p1, a.owner_name as p2 from dm_sysobject_s a where a.i_is_deleted = False and not exists (select b.user_name from dm_user_s b where b.user_name = a.owner_name) | https://solutions.emc.com/emcsolutionview.asp?id=esg82963 |
CC-0011 | Check objects for non-existent users | https://solutions.emc.com/emcsolutionview.asp?id=esg20466 | |
CC-0023 | Root version does not exist any more | select a.r_object_id as p1, a.i_chronicle_id as p2 from dm_sysobject_s a where a.i_chronicle_id <> ‘0000000000000000’ and not exists (select * from dm_sysobject_s b where b.r_object_id = a.i_chronicle_id) | http://solutions.emc.com/emcsolutionview.asp?id=esg29545 |
CC-0024 | Sysobject references non-existent i_antecedent_id | select a.r_object_id as p1, a.i_antecedent_id as p2 from dm_sysobject_s a where a.i_antecedent_id <> ‘0000000000000000’ and not exists (select * from dm_sysobject_s b where b.r_object_id = a.i_antecedent_id) | http://solutions.emc.com/emcsolutionview.asp?id=esg29545 |
CC-0037 CC-0038 |
Entry for only dm_document exists but remaining all entries in tables dm_sysobject and related tables like dmr_content | https://solutions.emc.com/emcsolutionview.asp?id=esg102630 | |
CC-0045 | dmi_package is pointing to a non-existent workflow | select a.r_object_id as p1, a.r_workflow_id as p2 from dmi_package_s a where not exists (select b.r_object_id from dm_workflow_s b where b.r_object_id = a.r_workflow_id) | http://solutions.emc.com/emcsolutionview.asp?id=esg29545 |
CC-0046 | Workflow object references non-existent sysobject | http://solutions.emc.com/emcsolutionview.asp?id=esg29545 | |
CC-0059 | Sysobject referencing non-existent policy objects | http://solutions.emc.com/emcsolutionview.asp?id=esg29545 | |
CC-0060 | Check for any policy objects that reference non-existent types in included_type. | select a.r_object_id, a.included_type from dm_policy_r a where a.included_type <> ” and not exists (select b.name from dm_type_s b where b.name = a.included_type) | https://solutions.emc.com/emcsolutionview.asp?id=esg27295 |
CC-0074 | The type is pointing to a non-existing index in dmi_index. | select a.name,a.s_index_attr from dm_type_s a where not exists(select b.r_object_id from dmi_index_s b where b.r_object_id=a.s_index_attr) | http://solutions.emc.com/emcsolutionview.asp?id=esg29545 |
CC-0079 | ACL instance refers non-existence ACL Template | https://solutions.emc.com/emcsolutionview.asp?id=esg82881 | |
CC-0080 | ACL instance refers non-existence Alias Set | https://solutions.emc.com/emcsolutionview.asp?id=esg82881 |
Pingback: Příručka pro Documentum Consistency Checker 1.část » IT notes © Michal Šika
Pingback: Příručka pro Documentum Consistency Checker – část 2. » IT notes © Michal Šika