none
MOSS Content Database has more documents than what's seen on browser RRS feed

  • Question

  • Hi,
    I am not sure how sharepoint internally handles stuff, but this is what I see. I am a SQLDBA and one of my company sharepoint group re-organized a site, by moving some files from a document library to another document library. I think she used the content deployment.

    When she see the number of documents in the document library it showed 700 documents. She moved only 50 of them. I went into the database and queried the Docs and DocStreams View and I get the list of all the those documents. I see both the ones that we see on the site as well as something that we do not see on the site.

    SELECT

    ad.DirName, ad.LeafName, TimeCreated, ads.size/1024 as [Size(KB)], SetupPath

    FROM Docs ad, DocStreams ads

    WHERE ad.SiteId = ads.SiteId AND ad.Id = ads.Id

    AND ads.Content IS NOT NULL

    AND extensionForFile not in ('webpart','dwp','master','css','xml','aspx')

    AND DirName like 'abc/abcd1%'

    Order by DirName, LeafName

    Could you please let me know why is this discrepancy and what do we need to do to fix it.  I am sure they are not deleted documents as I am using only the view that filters the deleted documents. I would appreciate and thanks for whoever could give us some light on this.

    I event thought that this could be because of the content management, but it seems like the norm on all the content databases

    Thanks!

    Tuesday, March 3, 2009 5:24 PM

All replies

  • Could you clarify which discrepancy you're referring to?  If you're finding documents in the content database that aren't showing up in the document library, they could be previous versions of documents, or deleted documents, or hidden system files.

    Typically, it's difficult to get much useful information by querying the content database directly because you need to have a thorough understanding of WSS/MOSS table relationships.  You may be better off by using the UI, Powershell scripts, or programmatic solutions to get the information you need. 


    Andre Galitsky
    Tuesday, March 3, 2009 8:47 PM
  • This is what I see on the site that I am referring to.

    I go to the site > View All Site Content > the document library shows 759 documents. I used the query and it also shows close to that. I go into that document library and I see only 100+ documents in the explorer view. Am I doing something wrong ?
    Thanks!
    Wednesday, March 4, 2009 3:07 PM
  • This appears to be a security permissions issue.  In SharePoint doc libraries, if you don't have access to a file or folder, SP usually hides them from you. 

    Log in to SharePoint with a farm administrator account, navigate to the document library and check the number of files.  If you see all 700+ files there, compare the permissions on those files that you can see with your own account versus those you can't.  Then adjust permissions accordingly.

    HTH
    Andre Galitsky
    Wednesday, March 4, 2009 3:52 PM
  • This is not the case, I have the same discrepancy, more documents showing from View All Site Content than in the document library. I am a farm admin, but I also  logged in as the application pool account and still the discrepancy remains

     

     

    Thursday, August 5, 2010 3:51 PM
  • Hi Sean,

    Did you able to find out the answer for this??

    We are also facing the same problem, there is only 1 document I am able to view as a Farm Admin while in All Site content it is showing as 115 . :(

     

    Appreciate your quick response.

    Thanks,

    Dhawal

    Monday, October 11, 2010 5:24 AM
  • I'm not sure I understand the issue. It sounds like you have a library with 750 documents but can only see 100 documents?

    Are you using a view that is filtering your documents?

    Are all documents checked in? (If you dump documents into a library where check-out is required or it has a required column without a default value, SharePoint will check those files out to the user who uploaded them and they will not be visible to other users until the user that uploaded the documents checks them in.)

    Check "manage checked out files" for your document library. Do these files appear now?


    Planet Technologies || SharePoint Task Force
    Monday, October 18, 2010 10:17 PM
  • I don' t recommend opening up the Content database and looking in to it. I suggest you to look at the same document library using SharePoint manager 2007 tool for investigation.

    Did you get error logs during Content deployment ?


    Aravind http://aravindrises.blogspot.com
    Monday, December 13, 2010 5:15 PM
  • Technically, what is in the content database shouldn't bother you. If you see a document inside a document library (in a view), you should see it in Explorer View as well. Are you saying that are not?

    The content database table that you are looking at stores documents from ALL sites and subsites, and all document libraries in the entire content database, which might have many site collections. It is normal to have more items in that table than what is in a single document library.

     


    Living the SharePoint dream...
    Friday, January 7, 2011 3:27 PM