Wednesday, November 24, 2010

SharePoint 2007 to 2010 Migration

1. Run the preupgradecheck
psexec \\SP2007Server -u domain\UserID -p yourPWD -s stsadm -o preupgradecheck
Note: I used psexec sysinternal tool, felt easy working from my Pc rather than RDPing to the server

2. Based on Above check we have 2 options out of 4 options

1. In-place upgrade
○ Use existing hardware – servers/farm offline during upgrade
○ Configuration and all content upgraded
○ Farm-wide settings preserved
○ Customizations available after upgrade
○ Recommended for small or non-production environments

2. Database Attach upgrade
○ New hardware
○ Upgrade multiple DBs at a time
○ Server farm settings not upgraded
○ Customizations must be transferred
○ Can consolidate multiple farms into one
○ Recommended if farm level configurations are minimal

3. Hybrid 1: Read-Only Database upgrade
○ Use Database Attach upgrade to preserve existing farm
○ Existing farm is put in read-only mode
○ Create a new farm and attach all content databases
○ Server farm settings not upgraded
○ Recommended over Database Attach

4. Hybrid 2: Detach Database upgrade
○ Use in-place upgrade for farm settings to preserve configurations
○ Detach and upgrade content databases
○ Alternatively, upgrade content databases in a temporary farm
○ Recommended if farm level configurations are significant

3. Pre Upgrade check will give you possible options for you to migrate, I choose Content Database Attach.

4. Identifying the .WSP files to be removed, Clean up your current 2007 environment before you migrate, so that you have less things to worry.

a. Used Bamboo SharePoint Analyzer http://community.bamboosolutions.com/blogs/bambooteamblog/archive/2008/11/06/introducing-bamboo-sharepoint-analyzer.aspx Choose where solution is used Option. To Identify Solutions and Features that have been deployed, displayed per Web App, Site Collection or Site scope
Now they even have client version, so you can run from your local PC.

5. Downloaded the STSADM Extender for automating the deleting away the unwanted web parts
Please Install the http://stsadm.blogspot.com/2007/10/set-web-part-state.html STSADM Extended commands to strip the web parts from the pages.
 
Download from:
SharePoint 2007 STSADM Extension WSP Files (SP2 is Recommended)
MOSS Only STSADM Extensions (x86, x64)
To install for the first time run the following commands (make sure you are in the directory where you downloaded the file):

stsadm -o addsolution -filename Lapointe.SharePoint.STSADM.Commands.wsp

stsadm -o deploysolution -name Lapointe.SharePoint.STSADM.Commands.wsp -immediate -allowgacdeployment

stsadm -o execadmsvcjobs


6. Stsadm -o gl-setwebpartstate -url "http://SP2007Server/default.aspx" -title "Un wanter WP Title like custom Events" -delete -publishUse the Excel sheet to generate the script for us.
You need Primarily 2 main fields Web Page & Display Web Part You get these 2 values from Bamboo Analyzer.
Formula to get script =CONCATENATE("stsadm -o gl-setwebpartstate -url """,[@[Web Page]],""" -title """,[@[Display Web Part]], """ -delete -publish")OR
Manually Strip web parts:
Find the pages then add the ?contents=1 to go to Manage Web part Page; then remove away the web parts & checked in those are checked out by other user(s) Note: Make sure you check out the Page.

7. Taking DB Offline on 2007 Env.
a. STSADM -o deletecontentdb –url "http://SP2007Server/" -databasename "WSS_Content" -databaseserver "SP\SHAREPOINT"

b. USE master
Go
ALTER DATABASE WSS_Content SET OFFLINE WITH
ROLLBACK AFTER 60 SECONDS

c. USE [master]
GO
EXEC master.dbo.sp_detach_db @dbname = N'WSS_Content',
@keepfulltextindexfile = N'true'
GO
8. My assumption is that you already have or created a new web application and site collection
Taking DB Offline on 2010 Env. (newly created site collection)
a. STSADM -o deletecontentdb –url "http://SP2010Server/" -databasename "WSS_Content_SP2010" -databaseserver "SP\SHAREPOINT"

b. USE [master]
GO
EXEC master.dbo.sp_attach_db @dbname = N'WSS_Content',
@filename1 =N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.SHAREPOINT\MSSQL\DATA\SP2007\WSS_Content.mdf'
Note: You can user SQL Manager for attaching the DB, easy too!

c. Run Powershell script
i. Test-SPContentDatabase –name WSS_Content –WebApplication http://SP2010Server

For further identifying the migration issues you may encounter when you attach.

ii. New-SPContentDatabase -Name WSS_Content -WebApplication http://SP2010Server

Thursday, November 18, 2010

Theme Builder for SharePoint 2010

Thinking to creating a cool theme for your site...then download the theme builder from Microsoft http://connect.microsoft.com/ThemeBuilder and you can create cool gradient theme in no time.

Text/Background- Dark 1:
• Page Title Hyperlink Text
• Hover Text
• VB Body Text
• Site Action Menu Text
• Left Navigation Links Text
• Site Setting Page Text Headers
Text/Background - Light 1:
• Body Background
• Toolbar Background
• Quick Launch Borders
• Web Part Header Background
• Site Action Menu Background
• Site Action/Welcome Text Color
• Pop-Up Window Background
Text/Background - Dark 2:
• Top Banner Background
• Left Navigation Header Text
• Recycle Bin/View All Site Content Text
• I Like/Tags Notes Text
• Library Column Text
• Site Action Drop Down Border
• Breadcrumb Current Location Text
• List Description Text
Text/Background - Light 2:
• Browse Tab and hover Background
• Title Container Background
• Top Links/Header 2 Background
• Quick Launch Background
• Web Part Adder Background
Accent 1:
• Quick Launch Hover Text
• Top Link Selected Tab
Accent 2:
• .ms-error
• Rich Text Colored Heading 2 Text Styles
Accent 3:
• Rich Text “Caption” Style Text Color
Accent 4:
• Border Under Web Part Selector
Accent 5:
• Rich Text Colored Heading 4 Text Styles
Accent 6:
• Rich Text Highlight background color
Hyperlink:
• Toolbar Text Color
• VB Body Hyperlink Text
• a:link Class Text Color
Followed Hyperlink:
• .ms-WPBody a:visited

Wednesday, November 10, 2010

Make Links Open In New Window

Well we know, when you add a link to your SharePoint navigation or in a Summary Link Web Part, it gives you the option to "Open link in new window" But when comes to a standard Links list, doesn't give you this option.

Here is The Script to open the link in a new window: (Content Editor web part, or even added to your master page.)

<script language="javascript" type="text/javascript" >

function MakeLinksOpenInNewWindow(){

var tbl = document.getElementsByTagName('table');
for(var i = 0; i < tbl.length; i++)
{
if(tbl[i].getAttribute("summary") == "Links Use the Links list for links to Web pages that your team members will find interesting or useful.")
{
var anc = tbl[i].getElementsByTagName('a');
for(var j = 0; j < anc.length; j++)
{
anc[j].setAttribute('target', '_blank');
}
}
}

}

_spBodyOnLoadFunctionNames.push("MakeLinksOpenInNewWindow");
</script >

Note: You can modify default Summary attribute by editing Links >> List Settings >> General Settings {Title, description and navigation} Description field of that Links list.
Also note that Summary attribute constructed with combination of Name + Description of the List