Find Content File Spreadsheet

Sometime ago I wrote a blog post detailing how to find an object’s content file on the Content Server’s file store using a data ticket.  Recently I had the opportunity to do that a lot.  To make life a little easier, I created an Excel spreadsheet to do the math.  I cleaned up the spreadsheet and made it available for more general use here if your are interested.

ContentPathExcel

 

 

 

Advertisements

About Scott
I have been implementing Documentum solutions since 1997. In 2005, I published a book about developing Documentum solutions for the Documentum Desktop Client (ISBN 0595339689). In 2010, I began this blog as a record of interesting and (hopefully) helpful bits of information related to Documentum, and as a creative outlet.

6 Responses to Find Content File Spreadsheet

  1. is getpath,c, no longer working? 🙂

    Like

  2. David Ellenberger says:

    In case you are using Oracle as DB, you can try this (see below) Oracle. When selecting from this view, ensure to have a proper where clause.

    David

    create or replace
    FUNCTION hex2dec (hexnum IN CHAR) RETURN NUMBER IS
    i NUMBER;
    digits NUMBER;
    result NUMBER := 0;
    current_digit CHAR(1);
    current_digit_dec NUMBER;
    BEGIN
    digits := LENGTH(hexnum);
    FOR i IN 1..digits LOOP
    current_digit := SUBSTR(hexnum, i, 1);
    IF current_digit IN (‘A’,’B’,’C’,’D’,’E’,’F’) THEN
    current_digit_dec := ASCII(current_digit) – ASCII(‘A’) + 10;
    ELSE
    current_digit_dec := TO_NUMBER(current_digit);
    END IF;
    result := (result * 16) + current_digit_dec;
    END LOOP;
    RETURN result;
    END hex2dec;

    create or replace
    FUNCTION num2hex (N IN NUMBER) RETURN VARCHAR2 IS
    H VARCHAR2(64) :=”;
    N2 INTEGER := N;
    BEGIN
    LOOP
    SELECT RAWTOHEX(CHR(N2))||H
    INTO H
    FROM dual;
    N2 := TRUNC(N2 / 256);
    EXIT WHEN N2=0;
    END LOOP;
    RETURN H;
    END num2hex;

    CREATE OR REPLACE VIEW “CONTENT_FILES_V” (“OBJECT_NAME”, “R_OBJECT_ID”, “I_FULL_FORMAT”, “PARENT_ID”, “R_OBJECT_TYPE”, “SET_TIME”, “SAVEDMINUTESAGO”, “R_HOST_NAME”, “R_INSTALL_OWNER”, “HEX_TICKET”, “FULLPATH”, “CONTENT_SIZE”)
    AS
    SELECT b.object_name,
    a.r_object_id,
    a.i_full_format,
    a.parent_id,
    b.r_object_type,
    TO_CHAR(c.set_time, ‘YYYY-MM-DD HH24:MI:SS’) AS set_time,
    ROUND((sysdate – c.set_time) * 1440,0) AS savedMinutesAgo,
    r_host_name,
    r_install_owner,
    lpad(num2hex(hex2dec(‘80000000′) – REPLACE(c.data_ticket,’-‘,”)),12,’0′) AS hex_ticket,
    i.file_system_path
    ||’\’
    || lower(lpad(SUBSTR(i.r_object_id,3,6),8,’0′)
    ||’\’
    || SUBSTR(m.r_object_id,9,2)
    ||’\’
    || SUBSTR(lpad(num2hex(hex2dec(‘80000000′) – REPLACE(c.data_ticket,’-‘,”)),12,’0’),3,2)
    || ‘\’
    || SUBSTR(lpad(num2hex(hex2dec(‘80000000′) – REPLACE(c.data_ticket,’-‘,”)),12,’0’),9,2)
    || ‘\’
    || SUBSTR(lpad(num2hex(hex2dec(‘80000000′) – REPLACE(c.data_ticket,’-‘,”)),12,’0’),11,2)
    || ‘.’
    || x.dos_extension ) AS fullPath,
    c.content_size
    FROM dmr_content_rv a,
    dm_sysobject_s b,
    dmr_content_s c,
    dm_location_sv i,
    dm_filestore_s h,
    dm_server_config_s m,
    dm_format_s x
    WHERE a.parent_id=b.r_object_id
    AND a.r_object_id=c.r_object_id
    AND h.root =i.object_name
    AND h.r_object_id=c.storage_id
    AND m.r_object_id=
    (SELECT MAX(r_object_id) FROM dm_server_config_s WHERE r_host_name!=’ ‘
    )
    AND a.i_full_format =x.name
    AND c.storage_id! =’0000000000000000′
    AND b.a_storage_type!=’ ‘
    AND c.data_ticket! =0
    AND c.parent_count! =0;

    Like

  3. Pingback: Links to All of My Source Code | dm_misc: Miscellaneous Documentum Information

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: