Skip Ribbon Commands
Skip to main content

Documentum Resources

:

Articles: recompute r_link_cnt for folders

Documentum Resources
The following SQL was provided by Documentum when we install 6.6 version.  This script will fix the r_link_cnt value for folders.

REM
REM Script to recompute the r_link_cnt for folders.
REM Use only if one or more folder's r_link_cnt have accidentlly
REM been set to negative numbers.
REM
update dm_sysobject_s s set r_link_cnt = 
(select count(*) from dm_sysobject_r b, dm_sysobject_r a where 
b.r_object_id_i = a.r_object_id_i
and
b.r_version_label = 'CURRENT'
and
a.i_folder_id_i = s.r_object_id_i )
where r_object_id like '0c%' or r_object_id like '0b%';