locked
Where is my data stored? RRS feed

  • General discussion

  • I have a site with InfoPath forms which collects data from the user.

    How do I find the location where this data is saved in the database?

    Monday, July 8, 2013 4:36 PM

All replies

  • Hi,

    The data are store in the content database of your SharePoint Server. You don't have access to them directly.

    Best regards.

    Gil.

    Tuesday, July 9, 2013 8:26 AM
  • I agree with Giles. You can only access your data from the site. The content database should not be queried unless explicitly requested by MS as part of a hotfix that too only in crtical situtations in production environments.

    It is recommended to keep our hands off from all SharePoint databases.

    Tuesday, July 9, 2013 9:32 AM
  • hi

    if you really want to check it in content database, then start with AllDocs table (although in general you should avoid doing it). If you just need to find the target location of submitted forms, then you need to check properties of the InfoPath forms in designer. Each form may have own location for submitting the data.


    Blog - http://sadomovalex.blogspot.com
    CAML via C# - http://camlex.codeplex.com

    Tuesday, July 9, 2013 1:15 PM
  • Hi,

    even though it isn't allowed to query this DB, I wrote two posts on my blog about where you can find your items:

    http://sharepoint1on1.blogspot.com/2013/03/where-does-sharepoint-store-list-items.html

    http://sharepoint1on1.blogspot.com/2012/10/where-are-my-documents-stored-have-you.html

    Tuesday, July 9, 2013 1:32 PM
  • How do I read the values in Content column of AllDocStreams?
    Wednesday, July 10, 2013 1:41 PM
  • In SQL, you can read it like this:

    SELECT cast([Content] as varchar(max))
    FROM [WSS_Content].[dbo].[AllDocStreams]
    WHERE Id = 'your_guid_goes_here'

    Wednesday, July 10, 2013 1:59 PM
  • The Content column has a long GUID like data.
    Wednesday, July 10, 2013 2:50 PM
  • 1. If your Content column contains data like:

    0x673AF5F34AA3467283627E42EAA5A67A8888AA41253...

    then these are bytes and they can be read with the SQL I gave you.

    2. If your Content column contains data like:

    9fc45088-515d-442f-8f18-f1d9abd3fd2e

    then this is GUID, not data. This means that your document is not stored in SQL db. It is stored on disk and this is its name. This means that you are using External Blob Storage.

    Wednesday, July 10, 2013 3:17 PM
  • In my case, it is stored as 0x673AF5F34AA3467283627E42EAA5A67A8888AA41253...

    When I executed the SQL you gave; I get an error:

    Explicit conversion from data type image to varchar(max) is not allowed.

    Wednesday, July 10, 2013 3:41 PM
  • Try this:

    http://cavemansblog.wordpress.com/2009/04/24/sql-how-to-convert-image-data-type-to-plain-text-and-back/

    Wednesday, July 10, 2013 4:37 PM
  • When I subsituted my value (very long string) from Content column; I get garbage.

    SELECT CONVERT(char(8), 0x436176656D616E00) AS ‘binary to text’

    Wednesday, July 10, 2013 5:02 PM
  • You can't convert it into char(8), try this:

    SELECT CONVERT(varchar(max), [Content])


    Wednesday, July 10, 2013 5:38 PM
  • I have already tried it and it gave me the same garbage.
    Wednesday, July 10, 2013 6:12 PM