Sunday, July 31, 2011

What is developer dashboard

What is developer dashboard:

SharePoint is very big system and consists of so many modules integrated. We can do lot of customization and all our code will be deployed to SharePoint and end users will use it. But, what if client comes to you with the question, "why my SharePoint site is loading very slow?" How you proceed?
First thing you need to check is all server configurations like is memory is sufficient/ Processor is sufficient etc.. After you found they are more than enough, now it's time to find problem in the code. Till SharePoint 2007, it's very difficult to find which part of the code is taking how much time and analyze it better. But luckily in SharePoint 2010, Microsoft added a very nice feature for developers to detect which module is taking how much time. It will record all the requests and the time to get response etc.... This is what we are calling Developer Dashboard.

The developer dashboard records and display performance statistics of the related code that executed to produce current page.

How to enable/disable it on the specific site?

Method 1: [STSADM]

'On' Mode :
STSADM –o setproperty –pn developer-dashboard –pv On

'Off' Mode:
STSADM –o setproperty –pn developer-dashboard –pv Off

'OnDemand' Mode:
STSADM –o setproperty –pn developer-dashboard –pv OnDemand

Suppose you'd like to only display the developer dashboard if one or more acceptable values are exceeded, there's a way to do that too by running:
STSADM –o setproperty –pn developer-dashboard –pv expensiveoperationsonly

Once you executed the command the output is "Operation executed successfully."

Method 2: Windows Powershell script:
You need to open the windows power shell prompt and copy the below script and hit enter.
$DevDashboardSettings = [Microsoft.SharePoint.Administration.SPWebService]::ContentService.DeveloperDashboardSettings;
$DevDashboardSettings.DisplayLevel = 'OnDemand';
$DevDashboardSettings.RequiredPermissions = 'EmptyMask';
$DevDashboardSettings.TraceEnabled = $true;

The both above methods will enable developer dashboard to entire farm level.

"DevDashboardSettings.RequiredPermissions determines which users will see the developer dashboard. EmptyMask means all users will be able to access developer dashboard. Any mask available in SPBasePermissions object can be used to filter down to a specific group so that only a small subset of users will be able to access developer dashboard."

Now, when you browse to the web site you can't find it immediately on the screen. You need explicitly enable for the page. Find a small image at the corner of the page as shown below.

That image behaves as a toggle button. When you click very first time then the developer dashboard will be enabled for the specific page. When you click again, then it will go off. You can't see that until you click it again.
How it looks like:

Note: This option is page specific level. So, when you enable it and move to another page it's default state is closed/disabled.

Happy SharePointing....

Friday, July 15, 2011

Relink InfoPath forms when migrating SharePoint 2007 to SharePoint 2010


When you move InfoPath form to a new site, if you open the xsf file, the href entry still point to the old site. Change it and it will work fine. 

This is a very good option in SharePoint 2010. Recently i was doing SharePoint Migration from 2007 to 2010 using Meta-Logix Migration Manager. This is a bug in their tool and currenly they don't support this in the tool. They have logged our request and promised to provide this option available in their next release.

Now what: I searched and got this very good option in SharePoint 2010 to relink existing InfoPath 2007 forms to new 2010 form libraries InfoPath form's Content Type.

The only drawback is - It update the modified by column. :(

Here are the steps for performing a Relink operation:
  1. Open the new form library.
  2. Click Modify Columns and Settings to the left of the view.
  3. Under General Settings, click Relink forms to this form library.
  4. In the view presented, select all of the forms that you want to relink.
  5. Click the Relink button.
You can relink all or can do it one at a time.

Thursday, July 14, 2011

Migration - SharePoint 2007 to 2010 Migration using MetaLogix Migration Manager

MetaLogix tool can be configured to migrating the complete site, list,items, libraries or any other library from the source to destination. The following screenshots shows the configuration which have been used till now to migrate all the sites.

Apart from this, you can move security, SharePoint Designer workflows, Content Types, Site Columns etc...

Few things are challenge as they need direct data written to database and the tool is having this option but if you do so you void microsoft license agreement. :(

One of them is workflow history, so if you wanna move history of the workflows in the migration you can not and i believe using the microsoft way you can keep that. As workflow history list keep the reference intact and should work fine.

Any way here are few screenshots on how MetaLogix configured and ready for migration.


Figure 3: Configure Migration Mode

Figure 4: Configure Site Options

Figure 5: Configure List Contents

Figure 6: Configure Web Parts

Figure 7: Configure Permissions

Figure 8: Configure Mappings

Figure 9: Configure Filters

Figure 10: Configure Workflows

Figure 11: Configure General Options

Finally i would say, its a good tool for moving any kind of data as per my experience and can be considered for migration for atleast medium level migration initially.
For any migration issue with MetaLogix tool, you can reach me on, i will try to answer ASAP if possible.