JavaBlog.fr / Java.lu API DCTM,DFC DCTM,Documentum Documentum : Execution of DQL script via IDQL32, API script via IAPI32

Documentum : Execution of DQL script via IDQL32, API script via IAPI32

Hello,

Just a post concerning the execution of DQL script via IDQL32, and API script via IAPI32.

 
DQL script via IDQL32
Here an example on exportation of unused ACLs in CSV file:

  • Creation of DQL script : script_dql_export_acl_not_used.dql in order to export the unused ACLs in a CSV file named script_dql_export_acl_not_used_result.csv:
    SELECT object_name from dm_acl WHERE object_name like 'dm_45%' and owner_name not like 'dm%' and r_object_id not in 
    ( 
    Select r_object_id  from dm_acl a, dm_sysobject(ALL) s 
    where a.object_name = s.acl_name  and a.object_name like 'dm_45%'
    group by a.object_name, a.r_object_id
    HAVING count(s.object_name)>0
    )
    and object_name not in (select u.acl_name from dm_user u)
    ENABLE (RETURN_TOP 1000000)
    go
    exit
    
  • Execution of script on content server via idql32 Tools. This script requires several parameters.
    C:\Documentum\product\6.5\bin> idql32 mydocbase -Umy_super_user   -Pxxxxx  -RQ:\HUO\script_dql_export_acl_not_used.dql  > Q:\HUO\script_dql_export_acl_not_used_result.csv
    

    Note: Put the password clause in double quote if it contains special characters (& | …) -> “-Pxxxxx”.

 
 
API script via IAPI32
Here an example deletion of unused ACLs:

  • Creation of API script : script_delete_acl_123.api in order to delete the unused ACLs:
    retrieve,c,dm_acl where object_name = 'dm_450xxxxxx000050c'
    destroy,c,l
    retrieve,c,dm_acl where object_name = 'dm_450xxxxxx000053c'
    destroy,c,l
    retrieve,c,dm_acl where object_name = 'dm_450xxxxxx000050f'
    destroy,c,l
    retrieve,c,dm_acl where object_name = 'dm_450xxxxxx0000535'
    destroy,c,l
    retrieve,c,dm_acl where object_name = 'dm_450xxxxxx0000536'
    destroy,c,l
    retrieve,c,dm_acl where object_name = 'dm_450xxxxxx0000537'
    destroy,c,l
    retrieve,c,dm_acl where object_name = 'dm_450xxxxxx0000538'
    destroy,c,l
    retrieve,c,dm_acl where object_name = 'dm_450xxxxxx000053d'
    destroy,c,l
    retrieve,c,dm_acl where object_name = 'dm_450xxxxxx000053e'
    destroy,c,l
    retrieve,c,dm_acl where object_name = 'dm_450xxxxxx000053f'
    destroy,c,l
    retrieve,c,dm_acl where object_name = 'dm_450xxxxxx0000540'
    destroy,c,l
    retrieve,c,dm_acl where object_name = 'dm_450xxxxxx0000539'
    destroy,c,l
    retrieve,c,dm_acl where object_name = 'dm_450xxxxxx000050e'
    destroy,c,l
    retrieve,c,dm_acl where object_name = 'dm_450xxxxxx000053a'
    destroy,c,l
    retrieve,c,dm_acl where object_name = 'dm_450xxxxxx000053b'
    destroy,c,l
    
  • Execution of script on content server via iapi32 Tools.

    This script requires several parameters.

    C:\Documentum\product\6.5\bin>iapi32 mydocbase -Umy_super_user -Pxxxxxx -RQ:\HUO\script_delete_acl_123.api -lQ:\HUO\script_delete_acl_123.log
    

    Note: Put the password clause in double quote if it contains special characters (& | …) -> “-Pxxxxx”.

 
 

That’s all!!!

Huseyin OZVEREN

Leave a Reply

Your email address will not be published.

Time limit is exhausted. Please reload CAPTCHA.

Related Post