Documentum Knowledge Tips

•December 23, 2010 • Leave a Comment

1. List attributes of a Custom Type

SELECT distinct attr_name, type_name FROM dmi_dd_attr_info WHERE attr_name not in (SELECT attr_name FROM dmi_dd_attr_info WHERE type_name=’dm_document’) and type_name = ‘yourcustom_type’

2. Select form templates

select * from dm_xfm_form

select r_object_id, object_name,template_type,a_content_type from dm_xfm_form where object_name like ‘H%’

select object_name from dm_xfm_instance where r_object_id in(select r_object_id from dm_xfm_instance_s where is_default=’1′)

3. Select taskspace application names

select * from dmc_taskspace_app

4. Select workqueues

select wq_name from dmc_workqueue where wq_name like ‘hr%’

5. To delete all versions of a dm_process

dql> select r_object_id, r_object_id, object_name, r_version_label from dm_process (all) where object_name = ‘<the process name>’


6.  Create a user

create dm_user object
set user_name = ’employee_rv1′
set user_login_name = ’employee_rv1′
set user_address = ’’
set user_source = ‘inline password’
set user_password = ‘demo’
set default_folder = ‘/Temp’
set user_privileges = 0
set client_capability = 2

7. Create a Role

Create dm_group OBJECT
set group_name = ‘hr_employee_role’
set group_class = ‘role’
set group_address=’’

8. Add User to a Role
Alter group ‘hr_employee_role’ add ‘manager_rv1′,’employee_rv1′

9. Find all roles assigned to a user

select * from dm_group where any i_all_users_names='<user name>’ and group_class=’role’

10. Find all users assigned a specific role

select i_all_users_names from dm_group where group_class=’role’ and group_name = ‘hr_employee_role’

11. Find the folder path of an object

SELECT s.object_name, fr.r_folder_path
FROM dm_sysobject s,dm_sysobject_r sr, dm_folder_r fr
WHERE s.i_is_deleted = 0 AND sr.i_position = -1
AND sr.r_object_id = s.r_object_id
AND fr.r_object_id = sr.i_folder_id
AND fr.i_position = -1
AND FOLDER(‘/Cabinetname’, DESCEND)
ORDER BY fr.r_folder_path,s.object_name

12. Create a dm_folder OBJECT

Create dm_folder OBJECT set object_name = ‘AcceptableDocumentTypes’
link ‘/Picklists’

13. Create a Custom Type

CREATE TYPE “acceptabledoctype” (“doccontentType” string(32)) WITH SUPERTYPE “dm_document”

14. Alter a Custom Type

ALTER TYPE nhspatient MODIFY nhs_dob (SET format_pattern = NULL, SET format_pattern_tag = NULL, SET label_text = ‘Date Of Birth’) PUBLISH;

15. How to run scripts in idql

On command prompt> idql32 <repository name>-uAdministrator -pdemo -rc:\xx.txt

16. List all configured audit events
select r.registered_id, r.event,r.user_namefrom dmi_registry r
where r.is_audittrail =1
17. Across-the-board  audit configuration
select ‘ALL’,r.event,r.user_namefrom dmi_registry rwhere r.is_audittrail = 1
and r.registered_id = ‘0000000000000000’
18. Audit configuration for types
select,r.event,r.user_namefrom dmi_registry r, dm_type t
where r.is_audittrail = 1and t.r_object_id = r.registered_id
19. Audit configuration for Sysobjects
select t.object_name,r.event,r.user_namefrom dmi_registry r, dm_sysobject t
where r.is_audittrail = 1and t.r_object_id = r.registered_id
20. Audit configuration for users
select t.user_name,r.event,r.user_namefrom dmi_registry r, dm_user t
where r.is_audittrail = 1and t.r_object_id = r.registered_id

21. Cleanup

UPDATE dm_document OBJECTS
SET r_lock_owner =”
SET r_lock_machine =”,
SET r_lock_date = date(‘nulldate’)
WHERE CABINET (‘/Patient’, descend)

22. Kill a Job
DQL>select r_object_id from dm_job where object_name = ‘YOUR_JOB_NAME’
DQL>update dm_job object set is_inactive = 1 where r_object_id = ‘JOB_OBJECT_ID’

You can change it from the API.These are the steps to update the Next invocation :
Get the job id using DQL:select r_object_id , object_name from dm_job where object_name= ‘The_job_name’
Connect to Iapi
API>dump,c,r_object_id of your Job
API>fetch,c,r_object_id of your Job
API> set,c,l,a_next_invocation
SET> 11/25/2007 04:00:00

23. Run a Job Manually

execute do_method WITH method = ‘dm_nightlyextract’,
arguments = ‘-docbase_name edmrep -user_name Administrator -password demo -domain dce2008’

24. delete dm_cabinet object

delete dm_cabinet object where object_name= ‘Patient’

25. drop type
drop type patient object_name= ‘Patient’