Friday, March 16, 2012

SQL to check Bb logical file location to physical file location

To check Bb logical file location to physical file location, you can login SQL as bblearn_cms_doc and run below statment. BLOB_ID is filename in file server.

SQL>select ta.full_path, ta.file_id, ta.file_name, tb.creation_date, tb.blob_id from xyf_urls ta, xyf_file_versions tb where ta.file_id = tb.file_id and ta.full_path like '%%%' ;

For example, to find the physical file location on path http://bb.bee-net.com/@@/D3B8DAF70160C72E20CB5A1E84CD221F/courses/1/alex-test/attempt/_10083_1/s/body_check_app_form.doc

SQL>select ta.full_path, ta.file_id, ta.file_name, tb.creation_date, tb.blob_id from xyf_urls ta, xyf_file_versions tb where ta.file_id = tb.file_id and ta.full_path like '%alex-test%10083%' ;

Result:

FULL_PATH
--------------------------------------------------------------------------------
FILE_ID
----------
FILE_NAME
--------------------------------------------------------------------------------
CREATION_ BLOB_ID
--------- ----------
/internal/courses/alex-test/attempt/_10083_1/s/body_check_app_form.doc
19831
body_check_app_form.doc
15-MAR-12 10605


File Server
-------------
[root@bb64 2012]# find . -name 10605.1
./2012-03/2012-03-15/2001/10605.1

No comments:

Post a Comment