Friday, May 28, 2010

Using Session State in SharePoint 2010 - Mark Arend - Site Home - MSDN Blogs

Very good article. In summary, it explains the difference between ASP.NET Session State and State Service and how to enable ASP.NET Session State and it's implications.

If your custom SharePoint code uses ASP.NET session, please be aware of this.

Link to the article

Thursday, May 27, 2010

Date Comparison in FullTextSqlQuery

I found this forum discussion.

Basically according to Steve Curran, the date literal must be surrounded by single quotes and formatted in YYYY-MM-DD format. Note this format does not address date with time value. However, even with this format, the = comparison does not work, for example, reportDate = '2010-05-24'. The >= comparison works.

In order to make equal comparison work, I had to combine > and < together. For example:

reportDate > inputDate.AddDays(-1).ToString("yyyy-MM-dd") and reportDate < inputDate.AddDays(1).ToString("yyyy-MM-dd")

The reportDate is a Date and Time field with Date Only format.

If you know any other approaches, please let me know.

Update: Also find this blog by about datetime comparison. Must read if you do datetime comparison in custom search web part.

Monday, May 24, 2010

preupgradecheck Common Issue Resolution

From George Khalil:

Upgrading your Content DB to SharePoint 2010 – Part 1, The preupgradecheck

Lots of great information on solving some common problems reported by preupgradecheck, such as missing site definition, missing feature, etc. 

SharePoint 2010 Custom Error Page Implementation

Todd's Blog | An Expected Error Has Occurred

SharePoint Content Database Detach Attach Tips

Recently I upgraded SharePoint 2007 farm from SP1 to SP2. I took the hybrid approach, i.e., I detached the content databases before the binary upgrade, then attached those content databases after the binary upgrade. All went well other than one issue and one interesting observation.

The issue: for all the content databases, we have custom value for "Site Level Warning" and "Maximum Number of Sites", after detach and attach, the custom values are gone and I had to create a simple console application to update those values. I could do this manually via central administration, but we have many content databases.

So don't forget to set those values if those values are customized.

The observation: In Central Administration > Application Management > Content databases, you can set the value for Site Level Warning and Maximum Number of Sites to the same value, even the Manage Content Database Settings page says in red on the top "The database capacity setting values must be greater than the number of existing sites in the database, and warning site count must be less than the maximum site count.". Very strange. Maybe just a bug in the UI.

Thursday, May 20, 2010

Content Databse with Modified database schemas

"stsadm -o preupgradecheck" reports that "Failed: Content Databse with Modified database schemas".

Options to fix:

  • User SharePoint Central Administration to backup and restore the questioned content databases to a new content database.
  • Use stsadm mergecontentdbs to the sitecollections in the questioned content database to a new content database.

Moving All SharePoint Databases to a New Database Server

Using backup and restore. Here is the procedure from Steven Haden's Blog:

  1. Using the SharePoint Central Admin, make a full backup the whole farm.
  2. Start the SharePoint Products and Technologies Configuration Wizard and disconnect the web server from the farm
  3. Using the SharePoint Products and Technologies Configuration Wizard define a new farm in the SQL server, that creates a new configuration database
  4. (Updated) Using the SharePoint Central Admin restore the full backup in your new farm, running it twice. Select New configuration to be able to change the Database name.
    1. Restore first the content database
    2. Restore the SSP and its content
Or this article from TechNet:

Move All Databases

When building a new farm, we should consider using sql connection alias to add a layer of abstraction between SharePoint servers and database server.

Monday, May 17, 2010

Laura Rogers:SharePoint 2010 – Where’d “My Links” Go?

SharePoint 2010 – Where’d “My Links” Go?

How to get My Links of SharePoint 2007 back in SharePoint 2010, sort of.

Crazy SharePoint 2010 Database Names

I just finished the installation and initial configuration of SharePoint 2010 RTM development environment on a 2 server environment, with all databases on a separate sql server 2005 server.

By following the Farm Configuration Wizard, I was done in no time. However, a big drawback is the names of the databases created. I know how to rename content databases, including central administration content database, by way of detaching and re-attaching after database renaming. You can use CA UI for all content databases, other than CA content database. Since once the CA admin content db is detached, the CA UI does not work anymore. So to add the CA content db back, you need to use stsadm command, such as
stsadm -o addcontentdb -url "url to the CA" -databasename "db name"
Then the CA UI should be up and running.

The challenge is how to rename or recreate those databases used by service applications with preferred naming pattern . Using Central Admin, I deleted the PerformancePoint Service Application, including the databases, then recreated the service application. However, there is no option to name the database during the creation process using CA UI.

It looks like that the only way to accomplish this is to use PowerShell cmdlets, see

I wish that Microsoft had made this easier for service application database names.

If you have done renaming those service applications databases, could you please share your thoughts and procedures?

Chris O'Brien: Tips for building SharePoint 2010 base VM images

Chris O'Brien: Tips for building SharePoint 2010 base VM images

SharePoint 2010 Training and Resources

From Arpan Shah's Blog:

With information on overview, for developer and IT pro.

http://blogs.msdn.com/arpans/archive/2010/05/15/sharepoint-2010-training-and-resources.aspx

Friday, May 14, 2010

People search not working, peopleresults.aspx page does not exist and people search webparts missing

I have installed SharePoint 2010 and configured Managed Metadata Service, User Profile Service Application, Search Service Application and My Site settings. Also I created a web application with root site collection created with Publishing Portal template. Now I can search documents with no problem.

While doing a people search, it fails complaining that http://server/search/peopleresults.aspx missing. Then I found this article http://www.sharepoint911.com/blogs/laura/Lists/Posts/Post.aspx?List=676af157-7d96-4e15-a987-54b8a3e4d948&ID=53 about similar problem. I followed the steps and realized that those people search web parts, such as people search box, people search core results, are missing in my SharePoint environment. I also tried to enable a whole bunch of features but to no avail.

Finally I found a workaround, here are the steps.

* delete the search subsite created by the publishing portal template
* create a managed path named search, you can name anything you want
* create a site collection under the search managed path, with Enterprise Search Center template
* change the My Site settings to reflect above change
* change search settings of the portal root site collection to reflect above change

I tried to create a subsite under root site collection, but only the Publishing templates are available. That is why I took the managed path route.

Not sure why I ran into the problem at the first place and not sure anybody else experienced this problem or not. Hopefully this can help somebody out there.