MOSS2007 viewlsts.aspx reports that item count mismatch with document library item count.


This is very common misunderstanding of sharepoint libraries. Draft files can be counted as viewlsts.aspx reports. This meas documents count in document library can be different than actual count also item level security can provide this difference. But the real problem is even if System Admin or Site Administrator somehow can not able to see that documents in document library.

In our scenario we have 14 files that reported by viewlsts.aspx page , but when we login as system admin and browse the library the total file count which is same visible file count , is 13.And this problem is related with Sharepoint 2007 Sp1 which is currently not supported state. (So please upgrade your system as soon as possible to SP2) .So some of files should be check out to a user(s) . Ok than we checked the Document Library Settings->Manage Checked Out files and see nothing ? that’s wierd.

I am sure that the problem checkout to user so How could we find the users ? For troubleshooting issue we have to connect sharepoint db just for select. Don’t forget that  do not change anything in Sharepoint DB this kind of operations are not supported.

First We select all lists for finding Guid of the issued list.

select * from lists where  tp_Title  like ‘%Network Trainings%’
we noted the ListId Guid and SiteId guid from query results :

ListId: B08577CD-A418-4E08-8F6D-33365082FF05
SiteId: E39EF3B7-5679-45DE-8565-97D9C6F9CAB3

Than Getting all files for this list from AllDocs table:

select LeafName,DocLibRowId,[Type],Version,UIVersion,Dirty,IsCurrentVersion,[Level],DraftOwnerId from alldocs where listid=‘B08577CD-A418-4E08-8F6D-33365082FF05’

On results we compre the files for defining which file can not be able to seen by System Admin account:

“BGP  trainings.doc” ‘s DraftOwenerId is set to 960

The userid has changed by site collection so query userinfo table like this.

select * from userinfo where tp_SiteID=‘E39EF3B7-5679-45DE-8565-97D9C6F9CAB3’ and  tp_id=960
Resutls say : Domain****\a90003342 is draftowner

Now you can find the user account from results. we could not find the cause why the system admin account cant see the documents in “Manage Checked out files” also i don’t intend to find reason for unsupported version. We loged in with this user account and able to see all documents.So this is not a common scenario , i always suggest that use latest version of sharepoint sp and cu.

Advertisements

About bpostaci
Sr. Support Escalation Engineer in Microsoft.

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: