ID: esg29545
Related Bugs:
SOLUTION
More specifically the question is what is the impact of the following errors that still exist and how do we clean them up?
Here are the steps to clean them up:
NOTE: PLEASE ENSURE THAT YOU HAVE A DATABASE BACKUP WHICH YOU CAN USE TO RECOVER THE SYSTEM IN THE UNLIKELY EVENT OF A CORRUPTION
You must log on to the database as docbase owner and run the SQL queries;
--- QUERY---: 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)
WARNING CC-0023: Sysobject with r_object_id '09006e7880082141' references a non-existent i_chronicle_id '09006e788008211f'
WARNING CC-0023: Sysobject with r_object_id '09006e788008214b' references a non-existent i_chronicle_id '09006e788008211f'
Problem:
For some reason the root version doesn't exist anymore. Normally, WE CAN delete this object because it does not have a root document
Steps:
- Need to get the dump of the objects and check which version are those and check the all tree
- Need to change in SQL the i_chronicle_id to the lower version and make it the root
In SQL
SQL> update dm_sysobject_s set i_chronicle_id='< who ever is the lower version>' where i_chronicle_id='09006e788008211f';
SQL> commit;
OR
SQL>delete from dm_sysobject_r where r_object_id ='09006e7880082141'
SQL>delete from dm_sysobject_s where r_object_id ='09006e7880082141'
--- QUERY---: 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)
WARNING CC-0024: Sysobject with r_object_id '09006e7880082141' references a non-existent i_antecedent_id '09006e788008211f'
Problem:
In this particular case the i_chronicle_id which is the i_antecedent_id is gone, OR WILL BE DELETED FROM THE STEP ABOVE.
Steps:
- Need to update i_antecedent_id to 16 zeros
SQL> update dm_sysobject_s set i_antecedent_id='0000000000000000' where i_antecedent_id='09006e788008211f';
SQL> commit;
--- QUERY---: select a.r_object_id as p1, a.r_workflow_id as p2 from dmi_workitem_s a where not exists (select b.r_object_id from dm_workflow_s b where b.r_object_id = a.r_workflow_id)
WARNING CC-0043: dmi_workitem object with r_object_id '4a006e7880000119' references non-existent dm_workflow object with id '4d006e788000010c'
WARNING CC-0043: dmi_workitem object with r_object_id '4a006e788000011e' references non-existent dm_workflow object with id '4d006e788000010e'
Problem:
The workitem is pointing to a non-existing workflow instance probable related to a bug.
Steps:
- Dump the dmi_workitem object and set to 16 zeros the r_workflow_id
- Get the r_queue_item_id value and set the item_id to 16 zeros and delete_flag to true as solution of Warning CC-0042
- dm_QueueMgt will cleanup the queue_item and destroy the dmi_workitem object
Workitem:
API> fetch,c,4a006e7880000119
API> set,c,4a006e7880000119,r_workflow_id
SET> 0000000000000000
API> save,c,4a006e7880000119
Queue_item
API> fetch,c,1b006e788001d911
API> set,c,1b006e788001d911,item_id
SET> 0000000000000000
API> set,c,1b006e788001d911,delete_flag
SET> 1
API> save,c,1b006e788001d911
Workitem:
API> fetch,c,4a006e7880000119
API> destroy,c,4a006e7880000119
--- QUERY---: 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)
WARNING CC-0045: dmi_package object with r_object_id '49006e7880000116' references non-existent dm_workflow object with id '4d006e788000010c'
WARNING CC-0045: dmi_package object with r_object_id '49006e7880000118' references non-existent dm_workflow object with id '4d006e788000010e'
Problem:
dmi_package is pointing to a non-existing workflow
Steps:
- Set the r_workflow_id to 16 zeros
- Destroy the dmi_package object
API> fetch,c,49006e7880000116
API> set,c,49006e7880000116,r_workflow_id
SET> 0000000000000000
API> save,c,49006e7880000116
API> fetch,c,49006e7880000116
API> destroy,c,49006e7880000116
--- QUERY---: select ws.r_object_id as p1, pr.r_component_id as p2 from dm_workflow_s ws, dm_workflow_r wr, dmi_package_s ps, dmi_package_r pr where ws.r_object_id = wr.r_object_id AND wr.r_act_state != 2 AND pr.r_component_id > '0000000000000000' AND ws.r_runtime_state IN (1,3) AND ws.r_object_id = ps.r_workflow_id AND wr.r_act_seqno = ps.r_act_seqno AND ps.r_object_id = pr.r_object_id AND not exists (select a.r_object_id from dm_sysobject_s a where a.r_object_id = pr.r_component_id)
WARNING CC-0046: dm_workflow object with r_object_id '4d006e7880002501' references non-existent sysobject with r_component_id '09006e788000dffd'
WARNING CC-0046: dm_workflow object with r_object_id '4d006e7880000d09' references non-existent sysobject with r_component_id '09006e7880006e60'
Problem:
The r_component_id of the dmi_package and is making reference to a workflow instance doesn't exist anymore
Steps:
- Set the r_component_id and r_component_chron_id (Chronicle ID of the object identified at the corresponding index position in r_component_id.) to 16 zeros and destroy it.
- Or set r_component_id to a existing package with his chronicle_id in r_component_chron_id
API> retrieve,c,dmi_package where r_workflow_id='4d006e7880002501'
...
4d0a636280000900
API> set,c,490a636280000900,r_component_id
Set >0000000000000000
...
Ok
API> set,c,490a636280000900,r_component_chron_id
Set >0000000000000000
...
Ok
API> save,c,490a636280000900
...
Ok
OR
API> set,c,490a636280000900,r_component_id
Set >090a636280004c85
...
Ok
API> set,c,490a636280000900,r_component_chron_id
Set >090a636280004655
...
Ok
API> save,c,490a636280000900
...
Ok
Check ACLs with non-existent users
WARNING CC-0007: ACL object with r_object_id '45006e5880000507' has a non-existent user 'test1'
WARNING CC-0007: ACL object with r_object_id '45006e5880000d00' has a non-existent user 'test1'
Problem:
The ACL contains a non-existing user in r_accessor_name attribute
Steps:
- Dump the acl
- Check the index for the non-existing user
- Using remove API call, remove the user per index and also make sure that you remove the same index for r_accessor_permit, r_accessor_xpermit and r_is_group attributes. If CS is 4.2.x this will not have r_accessor_xpermit
In API:
API> fetch,c,450a636280002512
...
Ok
API> dump,c,450a636280002512
...
USER ATTRIBUTES
object_name : peoplesoft_acl
description : peoplesoft permission set
owner_name : Miguel_Test52
globally_managed : F
acl_class : 0
SYSTEM ATTRIBUTES
r_object_id : 450a636280002512
r_is_internal : F
r_accessor_name [0]: dm_world
[1]: dm_owner
[2]: dmadmin
[3]: test1
r_accessor_permit [0]: 3
[1]: 7
[2]: 7
[3]: 7
r_accessor_xpermit [0]: 0
[1]: 0
[2]: 3
[3]: 3
r_is_group [0]: F
[1]: F
[2]: F
[3]: F
r_has_events : F
APPLICATION ATTRIBUTES
INTERNAL ATTRIBUTES
i_is_replica : F
i_vstamp : 1
In this case the index 3 contains the user that we need to remove (test1)
API> remove,c,450a636280002512,r_accessor_name[3]
...
Ok
API> remove,c,450a636280002512,r_accessor_permit[3]
...
Ok
API> remove,c,450a636280002512,r_accessor_xpermit[3]
...
Ok
API> remove,c,450a636280002512,r_is_group[3]
...
Ok
API> save,c,450a636280002512
...
Ok
API> dump,c,450a636280002512
...
USER ATTRIBUTES
object_name : peoplesoft_acl
description : peoplesoft permission set
owner_name : Miguel_Test52
globally_managed : F
acl_class : 0
SYSTEM ATTRIBUTES
r_object_id : 450a636280002512
r_is_internal : F
r_accessor_name [0]: dm_world
[1]: dm_owner
[2]: dmadmin
r_accessor_permit [0]: 3
[1]: 7
[2]: 7
r_accessor_xpermit [0]: 0
[1]: 0
[2]: 3
r_is_group [0]: F
[1]: F
[2]: F
r_has_events : F
APPLICATION ATTRIBUTES
INTERNAL ATTRIBUTES
i_is_replica : F
i_vstamp : 2
API
WARNING CC-0059: The dm_sysobject with id '0900f6ae80002980' references a non-existent policy object with id '46004a1a80003dae'
Need to update the r_policy_id for this object to 0000000000000000
SQL> insert into dm_policy_s values('46004a1a80003dae',2,NULL,'0000000000000000',NULL);
SQL> commit;
--- Query --- 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)
WARNING CC-0074: Type object for type 'dm_folder' references a non-existent dmi_index object for _s table with r_object_id '0000000000000000'
WARNING CC-0074: Type object for type 'dm_document' references a non-existent dmi_index object for _s table with r_object_id '0000000000000000'
WARNING CC-0074: Type object for type 'dm_note' references a non-existent dmi_index object for _s table with r_object_id '0000000000000000'
WARNING CC-0074: Type object for type 'dmi_dist_comp_record' references a non-existent dmi_index object for _s table with r_object_id '0000000000000000'
WARNING CC-0074: Type object for type 'dm_query' references a non-existent dmi_index object for _s table with r_object_id '0000000000000000'
WARNING CC-0074: Type object for type 'dm_script' references a non-existent dmi_index object for _s table with r_object_id '0000000000000000'
WARNING CC-0074: Type object for type 'dm_smart_list' references a non-existent dmi_index object for _s table with r_object_id '0000000000000000'
WARNING CC-0074: Type object for type 'dm_procedure' references a non-existent dmi_index object for _s table with r_object_id '0000000000000000'
Problem:
The type is pointing to a non-existing index in dmi_index
This is a harmless warning you can ignore. BUG# 65798 is logged on this issue and fixed in Content Server 5.3 OR if you really don't want to see this Warning, you can fix it like this;
EXAMPLE;
WARNING CC-0074: Type object for type 'dm_folder' references a non-existent dmi_index object for _s table with r_object_id '0000000000000000'
Steps:
- Confirm the value of the index by doing the following in SQLplus:
SQL> select S_INDEX_ATTR from dm_type_s where name='dm_folder';
S_INDEX_ATTR
----------------
1f001a9880000142
- Check the indexes for this type:
SQL> col index_name format a20
SQL> col column_name format a20
SQL> col column_position format 99999999990
SQL> select index_name,column_name,column_position from user_ind_columns where table_name like 'DM_FOLDER%';
INDEX_NAME COLUMN_NAME COLUMN_POSITION
-------------------- -------------------- ---------------
D_1F001A9880000143 R_OBJECT_ID 1
D_1F001A9880000143 I_POSITION 2
D_1F001A9880000015 R_FOLDER_PATH 1
D_1F001A9880000016 I_ANCESTOR_ID 1
D_1F001A9880000016 R_OBJECT_ID 2
D_1F001A9880000142 R_OBJECT_ID 1
6 rows selected.
SQL>
As you can see the the index name + D_ match with the value of S_INDEX_ATTR last row in the example.
You need to check if this index exists in dmi_index_s and _r
SQL> select count(*) from dmi_index_s where r_object_id='1f001a9880000142';
COUNT(*)
----------
1
SQL> select count(*) from dmi_index_r where r_object_id='1f001a9880000142';
COUNT(*)
----------
1
SQL>
You should not have the object in any of this tables if exists in one of this tables you must delete it.
SQL>delete from dmi_index_s where r_object_id='1f001a9880000142';
SQL>delete from dmi_index_r where r_object_id='1f001a9880000142';
OR
- Set the S_INDEX_ATTR to 16 zeros and then recreate the index using API with unique attribute "R_OBJECT_ID" as is state it above. update S_INDEX_ATTR from dm_type_s to the correct value without the D_ and that will fix the inconsistency
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment