Category Archives: Sharepoint

Site usage statistics out of sync – SharePoint

Last week we had a peculiar issue on the SharePoint GUI(storman.aspx) which provides the information about Storage Space Allocation. The issue is, Storman.aspx(Storage Space Allocation) file was showing more than 100GB used space which is the subjected sitecollection had never reached to 100GB. We had check the database sizes(.mdf & .ldf) and those sizes are not even close to 100GB. Finally, we had concluded that there is some bug in the GUI or this usage statistics out of sync.

I end-up in creating the PowerShell script (as shown in below) to re-sync the usage statistics using RecalculateStorageUsed() Method.

foreach ($spsite in Get-SPSite -url *) {
$oStorage = $spsite.SPBase.Usage.Storage
Write-Host Old Storge: $oStorage
$tSPSite = $spsite.GetSPObject()
$nStorage = $tSPSite.Usage.Storage
Write-Host $tSPSite.Url Updated from $oStorage to $nStorage

Also, we could have use Gary Lapointe’s STSADM extension — which has gl-recalculateusage STSADM command to sync the site usage statistics on SharePoint.

Leave a comment

Posted by on May 3, 2012 in Sharepoint


Info: SSRS in SharePoint Integration Mode vs Native Mode


SQL Reporting Services in SharePoint Integration Mode

When you integrate a report server with an instance of a SharePoint product, items and properties are stored in the SharePoint content databases. This provides a deeper level of integration between the server technologies that effects how content is stored, secured, and accessed.

Storing report items and properties in SharePoint content databases allows you to browse SharePoint libraries for report server content types, secure items using the same permission levels and authentication provider that controls access to other business documents hosted on a SharePoint site, use the collaboration and document management features to check reports in and out for modification, use alerts to find out if an item has changed, and embed or customize the Report Viewer Web part on pages and sites within the application. If you have sufficient permissions within a SharePoint site, you can also generate report models from shared data sources and use Report Builder to create reports.

The report server continues to provide all data processing, rendering, and delivery. It also supports all scheduled report processing for snapshots and report history. The following diagram shows the server components together:

architecture diagram

SQL Reporting Services in Native Mode

Reports are being hosted in a separate server as Native Mode and developers are adding the reports URL in to the SharePoint Pages. When we open a report by clicking the link in SharePoint page, SharePoint redirected to the Report Server URL. Thus, report server is running as an isolated server from the SharePoint.

Leave a comment

Posted by on February 24, 2012 in Reporting Services, Sharepoint


Extract documents from the SharePoint farm

I have been asked to extract all the files from one of the SharePoint farm and put into the share drive where users can access it. I was looking around on the web and we found an article, but SQL query is incorrect in this article as Content Column is not resides in the DOCS Data-view. So, I end-up in modifying this script with creating an INNER JOIN between DOCS and DOCSTREAMS to get the binary content for the files. I have attached here is the code and screenshot of it.


Download the code here

Hope this helps.

1 Comment

Posted by on December 1, 2011 in Sharepoint


E-mail notifications for alerts are not sent when content in a migrated site

[Courtesy: Microsoft Knowledge Base Article]

As mentioned in the subjected above, we have encountered the issue that existing alerts were not firing after the site migration. I digged into the Micrsoft Knowledge Base and I found out the below support article.

There is an awesome tool for SharePoint administrator to update these existing alerts.The new stsadm -o updatealert command was released in the SharePoint Administration Toolkit. For more information and to download the toolkit, visit one of the following Microsoft Web sites, depending on the version of Windows SharePoint Services that you are running.

SharePoint Administration Toolkit x64

SharePoint Administration Toolkit x86

For more information, see the “Microsoft SharePoint Administration Toolkit” white paper. To do this, visit the following Microsoft Web site:




1 Comment

Posted by on September 28, 2011 in Sharepoint


URL Redirection after the Migration – SharePoint

When we done with the migration work from one environment to another environment, obviously stake holder would ask the SharePoint administrator to provide the URL redirection mechanism as users have been accessing the old URL from the favorites, outlook, and shortcuts.

There are multiple options for SP administrator to achieve this task like creating URLMapping element in the web.config, or writing URL Rewriting using HTTP Modules, etc. But these methods are time consuming and we can not test code as we are working on the production migration. So, the only option is to change the redirection URL at the IIS level. Below is the workable and quick solution for this task.

Just set “The exact URL entered above” and “A permanent redirection for this resource” on the IIS and enter your fully qualified host name entry as follows$S$Q

The $S$Q will maintain all URLs on our other host names that enter.

This would redirect all your* HTTP calls to*.

How simple is it right? 🙂

Leave a comment

Posted by on September 28, 2011 in Sharepoint


Retrieve Absoulte URLs in the SharePoint Site Navigation

SharePoint users would love to use the hard-coded URLs in the SharePoint navigation. But they dont know what would be the impact while migrating site from one place to another and also it is really hard to find and replace these URLs as it’s time consuming.

SP administrator should have to use some tool to find out these hard-coded urls and change it manually. The below SQL query would point out the hard-coded URLs in each content databases. Also, I heard some webparts are available at the to find and replace these hard-coded URLs.


select webs.title as SiteName, navnodes.url as AbsoulteUrl, webs.fullurl as location
from navnodes
join webs on navnodes.webid =
where navnodes.url like ‘%http://%’

Leave a comment

Posted by on September 19, 2011 in Sharepoint


External user access denied – SharePoint 2007


It is a real hard to understand the issue from user who is working remotely at client location. Normally, IT support folks used to setup a webex session to see what is happening in their machine to understand the issue. But this method would not apply for a user can not accept or share their desktop due their work environment restrictions.
Only option is to share the screenshot between user computer and IT support professional. But IT support professional could not easily identify the root cause of an issue or troubleshoot the issue using screenshot of user desktop.


I had an experience with external user with same situation as mentioned above. So we decided to gather the information in regards to external user getting access denied. We analyzed the various areas as shown in below.

Things we gathered,
1. User account setup is okay
2. Her account works on Guest VLan on Corporate COE PC (IE7)
3. User account works on IT Support Professional home internet (IE7)
4. User account will not work on NAMSA PC (IE8)

So, it is clearly shows that IE8 is causing the issue.


We advised them to make sure their Trusted Sites zone allows ‘Automatic login with current username and password’.
Open IE, Tools -> Internet Options -> Security -> Trusted Sites.
1. Click ‘Sites’ and make sure the URL is in there.
2. Click ‘Custom Level’, scroll to the bottom and ensure ‘Automatic Logon with current user name and password’ is selected.

Leave a comment

Posted by on July 1, 2011 in Sharepoint