Your Office Solution Here

Powered by Microsoft China IW(Office/EPM/SharePoint) Team

one method to view binary (if the binary is really just text) in Database

one method to view binary (if the binary is really just text) in Database

  • Comments 1
  • Likes

Problem describe:

Very often we may find some binary column in SharePoint database, i.e. AllDocs -> MetaInfo, Webs -> MetaInfo. It is really just some text stored in binary format. However, since it is rendered in binary format when we run a query, it is hard to see.

 

Solution:

There is a Cast function we can use to view what text those binary is (see below for a sample)  

select top 3 dirname, leafname,

Cast(Cast(metainfo AS VARBINARY(2048)) As varchar(2048)) as metainfo_text

from alldocs where metainfo is not null

 

Comments
  • this solition not working for me

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment