Home Documentum

DQL Syntax, can you verify what i'm missing?

Hi All,

I'm using a DQL query to delete all items from a folder and its folders (see below).  Can you tell me what i need to add to delete the actual folder as well?  Asking because i'm deleting from a Documentum system that was configured to not allow Delete rights to anyone,...including the Admin :| .  Nothing was documented :| . So, i set up DQman, pointed to the repository and i'm able to delete via DQL.


delete dm_document objects where folder (‘/Cabinet Name’,DESCEND)


Thank you,

DJ



Comments

  • Hi,
    If everything in cabinet already deleted, add following DQL after that 1st delete.
    DQL> delete dm_cabinet object where object_name=‘Cabinet Name’ 
    if there are any subfolders still exist, you would need delete all subfolders recursively first.

    MEOW

  • @wetcat Thanks for replying.  I don't want to delete the entire cabinet, but just a certain folder.  For instance, once i run the DQL below all the contents of the folder are deleted, but i would like for the root folder to be deleted also.

    delete dm_document objects where folder (‘/Cabinet Name/Folder/Folder/Folder<-- this is the root folder’,DESCEND)

  • @DJ_at_Times - your first DQL will only delete the current version of documents.  If you have older versions, they will still be there after you run your DQL statement.  To delete ALL versions, use (ALL) parameter:

    delete dm_document (ALL) objects where folder (‘/Cabinet Name/Folder/Folder/Folder’,DESCEND)

    If you root folder does not any subfolders, then you can just delete the root folder:

    delete dm_folder object where folder (‘/Cabinet Name/Folder/Folder') and object_name='Folder'


    If you root folder has subfolders AND they have subfolders underneath them, then you can try to move them to parent level:

    update dm_folder object move to ‘/Cabinet Name/Folder/Folder/Folder' where folder (‘/Cabinet Name/Folder/Folder/Folder',descend) 

    This update willl fail if the subfolders do not have unique file names.  Then delete them using this:

    delete dm_folder object where folder (‘/Cabinet Name/Folder/Folder/Folder')



  • @DCTM_Guru the MVP of this group! B)   Thanks so much, i will double check and use your DQL syntax to verify.
  • Thanks - only b/c I have been working with DCTM for over 20 yrs
  • @DCTM_Guru and most likely trained properly including lots of documentation at your disposal.  Now imagine being me minus all that :D
  • @DCTM_Guru Last question about this,  the Archive site was setup initially (back in 2007 ?) so that nobody has delete rights, not even the Admin.  Can you think of a config file or another file where that would be specified?  I found the DA site for the archive, but even when providing the Admin "**** mode" I still can't delete.  The Delete option is grayed out.
  • OpenText censored the word **** :/
  • G O D   :D
  • If you are system administrator, you can change the ACL on those documents so that you have delete permissions.  If I recall correctly, if your user acct is not explicitly granted permissions, you will inherit the document owner permissions, which probably doesn't have DELETE permissions given that it is "ARCHIVE".  Once you change the permissions, you should be able to execute the DELETE DQLs from above.
Sign In or Register to comment.