Blog

You probably know that Documentum (in its default state) stores content on the file system and retains a pointer to the content in its database. Likely, you have navigated the file store on the Content Server and discovered directories like ../data/docbase/content_storage_01/00000123/80/00/23/. How in the world does this directory structure relate back to a particular object?

Documentum uses several objects to hold persistence information about content; we will use five of them to determine where the content for an object with r_object_id = '0900000180023d07' resides: dmr_content, dm_format, dm_filestore, dm_docbase_config, and dm_location. The following query will get us all the information we need to assemble the path to the object’s content.

select data_ticket, dos_extension, file_system_path, r_docbase_id from dmr_content c, dm_format f, dm_filestore fs, dm_location l, dm_docbase_config dc where any c.parent_id = '0900000180023d07' and f.r_object_id = c.format and fs.r_object_id = c.storage_id and l.object_name = fs.root

Result:

  • data_ticket = -2147474649
  • dos_extension = txt
  • file_system_path = C:/Documentum/data/docbase/content_storage_01
  • r_docbase_id = 123

The trick to determining the path to the content is in decoding the data_ticket's 2’s complement decimal value. Convert the data_ticket to a 2’s compliment hexidecimal number by first adding 2^32 to the number and then converting it to hex. You can use a scientific calculator to do this or grab some Java code off the net.

  • -2147474649 + 2^32 = (-2147474649 + 4294967296) = 2147492647
  • converting 2147492647 to hex = 80002327

Now, split the hex value of the data_ticket at every two characters, append it to file_system_path and docbase_id (padded to 8 digits), and add the dos_extension. Viola! you have the complete path to the content file.

C:/Documentum/data/docbase/content_storage_01/00000123/80/00/23/27.txt

I think this is a really clever way to manage the creation and assignment of directories and filenames, don’t you? In addition, this scheme guarantees that there is never more than 256 files in a single directory, increasing optimization.

You can do it in reverse also. Say you have file with this path: /80/20/23.txt. What is its r_object_id?

  • converting 80002023 to decimal = 2147491875
  • subtract 2^32: 2147491875 – 4294967296 = -2147475421
  • select r_object_id, object_name from dm_sysobject, s dmr_content c where any c.parent_id = s.r_object_id and c.data_ticket = -2147475421.0

Note: You must append “.0” to the data_ticket value to force DQL to process the variable as a floating point number, otherwise you get an integer overflow error.

Of course, you can always use the GET_FILE administrative method to find an object’s content’s file path. Just remember, that the content ID it is asking for is the r_object_id for the dmr_content object.

This blog was originally posted at msroth.wordpress.com on Sept 9, 2011.

Categories

Related Posts

2 Comments

  1. Ankit

    I want to get path for scanned images stored in tif format in the
    “D:DocumentumdataABC_DMScontent_storage_010003039”

    but when i create further path using the above formula it does not work .
    As data_ticket for all consignments is same so how can i map from a object_id to the path of orignal image

    Reply
  2. Scott Roth

    I’m not sure I follow your question completely, but using the above procedure will produce the file system path for any sysobject in the repository. There is no direct map from an object ID to the storage path, you must use the DQL to extract all of the necessary components and use the math to build the path.

    Reply

Submit a Comment

Your email address will not be published. Required fields are marked *