Wednesday, July 27, 2011

Upgrading your Content Database to SharePoint 2010 – Database Attach method


lcome back to the second article in this series on upgrading a SharePoint 2007 content database to SharePoint 2010.  In we deep dived into the preupgrade tool that Microsoft made available with SharePoint 2007 SP2 and today we will complete our upgrade journey utilising one of the 3 upgrade models that are available to you by Microsoft.  These are listed as follows;
  1. In-place upgrade
  2. Database attach upgrade to a new farm
  3. Hybrid approach (Read –only databases or Detach databases)
There is a wealth of information regarding these different approaches on the Microsoft TechNet site under theUpgrade and Migration Resource Center for SharePoint 2010. I will also outline other resources at the end of this article for convenience.
The upgrade model that I have chosen in this article series is the Database attach upgrade approach in which I will outline in this step by step guide.  The upgrade choice you choose is dependent on a number of factors such as how much down time can you afford and whether you are moving onto newer hardware.  All three options have their strong and weak points which is outlined in the following TechNet article; Determine Upgrade approach (SharePoint 2010)
This article is assuming that your SharePoint 2010 environment is up and running (albeit in beta form).  I have published a 3 part series in getting your SharePoint 2010 environment up and running that you can access from the following links;
  1. Installing SharePoint 2010 Beta on a Windows 2008 R2 Server
  2. Configuring SharePoint 2010 (Beta) Service Applications and User Profile Service Synchronization
  3. Creating your first SharePoint 2010 Beta Web Application and Site Collection
When using the database attach method to upgrade your databases to SharePoint 2010, you need to be aware that none of your configuration settings in SharePoint 2007 will migrate.  You will need to ensure that you have replicated your 2007 environment in the newly created 2010 farm.  Some of the items to consider include the following;
  • Outgoing email server
  • Alternate Access Mappings (AAM)
  • Quota templates
  • Included paths
  • Install any custom or 3rd party features, including web parts, solutions
  • Custom site definitions
  • Custom CSS
In order for you to perform a database attach upgrade into your SharePoint 2010 environment you need to ensure that you have created a new web application.  If you have not done so, you can follow my step by step guide on Creating your first SharePoint 2010 Beta Web Application and Site Collection.
Step 1 :: Restoring a copy of your SharePoint 2007 content database
Now that we have ensured that all our configuration settings are in place, and that all custom features, web parts and solutions have been re-instated, we can now proceed with our upgrade.  You will need to firstly backup and take a copy of your SharePoint 2007 content database and restore it to the newly created SharePoint 2010 farm.
I’m performing my database restore utilising SQL 2008 Management Console.  Right click on Databases and select Restore Database.
Select your source and destination as follows;
image thumb11 Upgrading your Content Database to SharePoint 2010   Database Attach method
Click on Options and ensure you have selected Overwrite the existing database.
image thumb12 Upgrading your Content Database to SharePoint 2010   Database Attach method
Click OK.
We should receive the following confirmation message once the database has been successfully restored.
image thumb13 Upgrading your Content Database to SharePoint 2010   Database Attach method
Step 2 :: Verifying the Content Database
As you have already noticed from our first article, in particular with the introduction of the preupgrade check tool, Microsoft have done a great job in providing us with the necessary tools to ensure a successful upgrade.  The next tool that we will be using is the Test-SPContentDatabase Windows PowerShell cmdlet.  This cmdlet will test and verify that any custom components that are required for this content database has been installed and configured in the SharePoint 2010 environment.
Test-SPContentDatabase –Name  -WebApplication 
Launch the SharePoint 2010 Management Shell and type the above command, ensuring you have entered your Database Name and URL. e.g. below
Test-SPContentDatabase –Name WSS_Content_Intranet -WebApplication http://intranet.georgekhalil.com
The Test-SPContentDatabase is a great reporting tool that will list any missing setup files, web parts and provide you with information on how to remedy any errors.  It will also specify whether these missing features will block the upgrade from succeeding.
image thumb14 Upgrading your Content Database to SharePoint 2010   Database Attach method
You can either attend to these missing features pre or post-upgrade but this depends on whether there are any items that will block the upgrade from proceeding.  Once you have remedied the above, we can proceed with our next tool, which will add the content database to our Web Application.  The stsadm  addcontenddb command line parameter is as follows;
stsadm -o addcontentdb -url  -databasename 
Before proceeding, ensure that there are currently no databases connected to the web application that we will be attaching to.  You can check this via Central Administration / Application Management / Manage content databases.
image thumb15 Upgrading your Content Database to SharePoint 2010   Database Attach method
If one is listed, you can remove the existing attached database by clicking on the actual database name and then clicking on the “Remove content database” check box.
image thumb16 Upgrading your Content Database to SharePoint 2010   Database Attach method
You will receive the above warning which is safe to ignore.  In this instance we are not deleting the actual database but disassociating it from the selected Web Application.  This is the exact same behaviour that was available to us in SharePoint 2007.
We can now proceed and attach our restored SharePoint 2007 database via the following stsadm command line;
stsadm -o addcontentdb -url  -databasename 
In my instance, the command looked as follows;
stsadm -o addcontentdb -url http://intranet.georgekhalil.com -databasename WSS_Content_Intranet
This will initiate the upgrade process as per the below screen capture.
image thumb17 Upgrading your Content Database to SharePoint 2010   Database Attach method
You will eventually receive a message similar to the below advising that the upgrade was completed albeit with errors in my case.  You should review the upgrade log file which is quite extensive and lengthy, and sure enough the errors were all related to missing features etc which I was already aware of.
image thumb18 Upgrading your Content Database to SharePoint 2010   Database Attach method
We can now verify that the upgrade was completed successfully by first navigating back to Central Administration / Application Management / Manage content databases, which now displays the upgraded database under my designated Web Application.
image thumb19 Upgrading your Content Database to SharePoint 2010   Database Attach method
We can also view the upgrade status page which is located within Central Administration / Upgrade and Migration / Check upgrade status.  The page will list all previous upgrade attempts and summarise the number of errors and warnings that may have been encountered.  In my case, there were a number of features that were not installed in the new SharePoint 2010 farm that the current portal relies on.  All of the upgrade logs are located in the following location, providing you with finer detail on the errors and warnings encountered;
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS
image thumb20 Upgrading your Content Database to SharePoint 2010   Database Attach method
By default, your site will retain it’s 2007 theme which Microsoft have done on purpose and you will need to manually change this 2010 if you wish to do so.  This is referred to as the “Visual Upgrade”, providing site administrators the ability to switch to the new look and feel at their own leisure.  This is a great move by the SharePoint product team as the new interface can be quite overwhelming to begin with.  Think about the move from Office 2003-2007 with the introduction of the new ribbon interface.   There was a week or two of frustration for most users before eventually getting the hang of it and finding the new interface to be more productive.
The below screen capture is my upgraded SharePoint 2010 portal running in “SharePoint 2007 theme mode”.
Capture12007 thumb Upgrading your Content Database to SharePoint 2010   Database Attach method
To perform the Visual upgrade, navigate to Site Actions / Visual Upgrade.
Capture12007a thumb Upgrading your Content Database to SharePoint 2010   Database Attach method

Here you are provided with 3 options in which I will select “Use the new SharePoint user interface, and don’t ask me again”.  After clicking on OK, I am now presented with the same site utilising the default SharePoint 2010 theme.
Capture12010 thumb Upgrading your Content Database to SharePoint 2010   Database Attach method
We have now successfully upgraded one of our SharePoint 2010 content databases housing our main Intranet portal, albeit with some missing web parts and features.  So what’s next on the agenda?  Upgrading My Sites of course!  This will involve attaching and upgrading your Shared Service Provider (SSP) to upgrade your user profile information followed by upgrading the My Sites content database.  This process will be left for a future post.
I hope you have found this 2 part series useful and I am interested hear how many of you have attempted a SharePoint 2010 upgrade and your experiences.
Resources from TechNet
Determine Upgrade approach (SharePoint 2010)
Microsoft SharePoint 2010 Products Upgrade Approaches – Diagrams
Upgrading to SharePoint Server 2010
Preparing to upgrade to SharePoint 2010 Products
Attach databases and upgrade to SharePoint Server 2010
_______________________________________________________________
Articles in this series
  1. Upgrading your Content DB to SharePoint 2010 – Part 1, The preupgradecheck
  2. Upgrading your Content DB to SharePoint 2010 – Part 2, Database Attach method

Configuring outgoing email in SharePoint 2010 with Exchange 2010 – Step by Step Guide


 my last article I provided you with a guide in setting up your SharePoint 2010 farm providing it with the capabilities in receiving incoming email which can then be delivered directly to your SharePoint libraries and or lists.  Today we wrap up our 2 part series on email flow in SharePoint 2010 in which I will provide you with another step by step guide in configuring your SharePoint Farm in order for it to send outgoing emails through your Microsoft Exchange server.
The environment
This article builds on the SharePoint Farm setup that I have documented here. It consists of the following servers which would form a common basis in most large organizations.
  • Windows 2008 R2 server running Active Directory Domain Services
  • Windows 2008 R2 server running SQL 2008 R2
  • Windows 2008 R2 server running SharePoint 2010 RTM
  • Windows 2008 R2 server running Exchange 2010 RTM
  • Windows 7 client running Office 2010 RTM
SharePoint 2010 allows you to configure any SMTP service including the one which I had setup in my previous article to send outgoing email, however we will utilise Exchange 2010 (same instructions apply for Exchange 2007) to provide email delivery to our end users.  Instructions on configuring the SMTP service (i.e. you are not using Microsoft Exchange in your environment) can be found on TechNet.
Creating a Receive Connector in Exchange 2010

If you recall from my previous article when we were configuring incoming email, we created a “Send Connector” in Exchange to forward the messages to the SMTP service that we had configured and installed.  This time round we will create a “Receive Connector” in Exchange 2010.
Launch the Exchange Management Console and navigate to Server Configuration / Hub Transport / New Receive Connector.  The New Receive Connector wizard is invoked.
Enter a descriptive name and ensure “Custom” is selected as the intended use.
image thumb39 Configuring outgoing email in SharePoint 2010 with Exchange 2010   Step by Step Guide
Click Next
Leave “All Available IPv4” in your Local Network settings unless you have specific Exchange IP requirements.
image thumb40 Configuring outgoing email in SharePoint 2010 with Exchange 2010   Step by Step Guide
Click Next
Edit the IP address of your SharePoint 2010 server.
image thumb41 Configuring outgoing email in SharePoint 2010 with Exchange 2010   Step by Step Guide
Click Next
image thumb42 Configuring outgoing email in SharePoint 2010 with Exchange 2010   Step by Step Guide
Click New
You will now notice that our SharePoint 2010 Outgoing mail connector is listed with our default Exchange 2010 Receive Connectors..  image thumb43 Configuring outgoing email in SharePoint 2010 with Exchange 2010   Step by Step Guide
We will now venture into its properties and make a minor permission change.  Click on the “Permission Groups” tab and select Anonymous users.
image thumb44 Configuring outgoing email in SharePoint 2010 with Exchange 2010   Step by Step Guide
Click Apply.
Configuring outgoing email in SharePoint 2010 Central Administration
Launch Central Administration and navigate to System Settings / E-Mail and Test Messages / Configure outgoing e-mail settings.
image thumb45 Configuring outgoing email in SharePoint 2010 with Exchange 2010   Step by Step Guide
Enter your Outbound SMTP server, i.e. your Exchange server where we created our receive connector and specify a From and Reply-to address.
image thumb46 Configuring outgoing email in SharePoint 2010 with Exchange 2010   Step by Step Guide
Click OK
Testing our configuration
Lets navigate to our SharePoint 2010 web application and create an Alert .  In my example I will create an immediate alert for Announcements.
Navigate to your Announcement List and click on List Tools/List and then click on “Alert Me” located in the ribbon interface.
image thumb47 Configuring outgoing email in SharePoint 2010 with Exchange 2010   Step by Step Guide
Select “Set alert on this list” and select your Alert options.  Ensure that you have “send notifications immediately” selected for testing purposes.
image thumb48 Configuring outgoing email in SharePoint 2010 with Exchange 2010   Step by Step Guide
image thumb49 Configuring outgoing email in SharePoint 2010 with Exchange 2010   Step by Step Guide
Click OK
You should receive your notification email that you have successfully subscribed soon after creating your alert.
image thumb50 Configuring outgoing email in SharePoint 2010 with Exchange 2010   Step by Step Guide
I will now create a Test Announcement to ensure that the actual alert is delivered.
image thumb51 Configuring outgoing email in SharePoint 2010 with Exchange 2010   Step by Step Guide
Alas! 5 minutes later (based on the immediate timer job definition schedule) we have received our email alert confirming that our SharePoint configuration with Exchange was successful.
image thumb52 Configuring outgoing email in SharePoint 2010 with Exchange 2010   Step by Step Guide
Did you know that you can also configure outgoing email for a specific Web application?  You might want to do this if you have multiple SharePoint Web Applications hosting specific site collections and would want a different From and or Reply Address setup.
Even though we are now going to configure outgoing email for a specific Web application, you are still required to setup the default farm outgoing email settings as per the above.
Configuring outgoing email for a specific Web application in SharePoint 2010 Central Administration
Launch Central Administration / Application Management / Manage Web Applications.
Select one of your Web Applications and then select “General Settings” from the Ribbon.
image thumb53 Configuring outgoing email in SharePoint 2010 with Exchange 2010   Step by Step Guide
Select “Outgoing E-Mail” from the drop down.
It will pick up your default farm settings that we entered in earlier in which you can now change the From and Reply-to address to something more specific for the selected Web application.
image thumb54 Configuring outgoing email in SharePoint 2010 with Exchange 2010   Step by Step Guide
Click OK
We are done!  I hope you have found this step by step guide in configuring outgoing email in SharePoint 2010 with Exchange useful, and stay tuned as we continue our journey in configuring our SharePoint 2010 Farm.



Configuring the User Profile Service in SharePoint 2010


http://sharepointgeorge.com/2010/configuring-the-user-profile-service-in-sharepoint-2010/I first introduced Service Applications and User Profile Service Synchronization back when SharePoint 2010 was in beta, and as many of you who would have attempted this feat, would have come to realize that there were a couple of known issues, in particular those around utilizing a least privilege model with service accounts.  I’m confident in stating that these issues have now been resolved with RTM and in today’s article I will share with you my step by step guide in setting up the User Profile Service application, focusing on its configuration and administration and how we can enable the creation of user profiles via an Active Directory import .
SharePoint 2010 introduces the notion of “Service Applications” which build’s upon the “Shared Services Provider (SSP)” which was introduced in SharePoint 2007.  Service Applications are individual services that can be configured independently and can be shared across other sites within your farm with some service applications that can also be configured across farms.
The individual service applications provided with SharePoint 2010 are listed as follows;
  • Access Services
  • Business Data Connectivity
  • Document Conversion
  • Excel Services
  • Managed Metadata Service
  • PerformancePoint
  • Search Service
  • Secure Store
  • State Service
  • Visio Graphics Service
  • User Profile Service
This article will build upon our initial SharePoint 2010 install utilizing the least privilege model which I have documented here, so check it out if you haven’t already done so.
Managed Metadata Service
The User Profile service requires that the Managed Metadata Service is setup and configured first before attempting setting up our first User Profile Service.  The Managed Metadata service allows you to utilize managed metadata and provides you with the ability to share content types across sites.  You can read more about Managed Metadata here.
To setup our Managed Metadata Service, navigate to Central Administration / Application Management / Manage Service Applications.
Click New and select “Managed Metadata Service”
Enter the follow details;
Name: Managed Metadata Service
Database Server: 
Database Name: Managed Metadata DB
image thumb55 Configuring the User Profile Service in SharePoint 2010
I will utilize the sp_farm account for the Application Pool Identity.
image thumb56 Configuring the User Profile Service in SharePoint 2010
Click Create.
Lastly, navigate to Central Administration / System Settings / Manage services on server and start the Managed Metadata Web Service.
image thumb57 Configuring the User Profile Service in SharePoint 2010
User Profile Service
Now that we have successfully configured our Managed Metadata service we can now focus our attention on the User Profile Service.  The User Profile Service provides our SharePoint farm with all the social networking features that we have come to love in SharePoint 2007, plus more.  It forms the basis of My Site support, User profile pages, Audiences and some of the newer features in SharePoint 2010 social computing such as social tagging.
Before we begin, we need to ensure that our Farm account (DOMAIN\sp_farm) is listed as a member of the Local Administrator’s group where the User Profile Synchronization (UPS) service will be deployed.  Please make a note to remove the DOMAIN\sp_farm account from the Local Administrator’s group after provisioning the User Profile Synchronization service.  Please also note, that if you ever have to re-provision the UPS service at a later date, that you will need to ensure the DOMAIN\sp_farm account is added back to the Local Administrator’s group.
Let’s now navigate to Central Administration / Application Management / Manage Service Applications.
Click New and select “User Profile Service Application”
image thumb58 Configuring the User Profile Service in SharePoint 2010
The “Create New User Profile Service Application” window pops up in which you will enter the following details; (you will obviously enter in the details based on your environment setup)
Name: User Profiles
Create new application pool: SharePoint – User Profiles
image thumb59 Configuring the User Profile Service in SharePoint 2010
Register a new managed account: e.g. DOMAIN\sp_userprofiles (nb: this account will need to be provisioned in Active Directory first)
image thumb60 Configuring the User Profile Service in SharePoint 2010
Enter your Profile Database server details and database authentication.  You will notice that SharePoint 2010 introduces the ability to configure Failover Server which allows you to associate your SharePoint databases with another SQL server for failover purposes utilising SQL Server database mirroring.   We will not specify a Failover Database server for any of our databases at this present time.
image thumb61 Configuring the User Profile Service in SharePoint 2010
Specify your Synchronization Database which is used to store configuration and staging data for synchronization of profile data such as that from Active Directory.
image thumb62 Configuring the User Profile Service in SharePoint 2010
Next, specify your Social Tagging Database which is used to store tags and notes that are created by users.  Social Tagging is a new feature in SharePoint 2010 which is not only displayed against the items that user’s are tagging, but are also displayed in the user’s activity feed.
image thumb63 Configuring the User Profile Service in SharePoint 2010
Next, select your Profile Synchronization Instance Server.
In the proceeding section, we will not create a My Site Host URL and will leave this for part two of this series.
Click Create.
image thumb64 Configuring the User Profile Service in SharePoint 2010
You should now have the User Profiles service application listed and  started.
image thumb65 Configuring the User Profile Service in SharePoint 2010
We will now venture back into Central Administration / System Settings / Manage services on server.
Scroll down to the User Profile Service and User Profile Synchronisation Service and start both.  The User Profile Service should start without any further user interaction, however the User Profile Synchronization Service will ask for your SharePoint Farm credentials.
image thumb66 Configuring the User Profile Service in SharePoint 2010
Click Ok.
Both services should now be listed as started.
image thumb67 Configuring the User Profile Service in SharePoint 2010
This in turn, will correctly configure and start our ForeFront Identity Manager Windows Services (FIM).
image thumb68 Configuring the User Profile Service in SharePoint 2010
We will now configure our User Profile Connection to our Active Directory Domain.
Navigate to Central Administration / Application Management / Manage Service Applications.
Click on User Profiles / Manage.
image thumb69 Configuring the User Profile Service in SharePoint 2010
Click on Configure Synchronizations connections / Create New Connection.
Enter the follow details;
Connection Name:
Type: Active Directory
Auto discover domain controller or specify a domain controller
Authentication Provider Type: Windows Authentication
Account Name / Password:
Port: 389
image thumb70 Configuring the User Profile Service in SharePoint 2010
Click on Populate Containers
image thumb71 Configuring the User Profile Service in SharePoint 2010
Click OK.
Your connection should now be listed as follows upon successful creation.
image thumb72 Configuring the User Profile Service in SharePoint 2010
We can now easily setup connection filters against our Active Directory User Profile connection by clicking on the connection that was just created and selecting “Edit Connection Filters”.
Specify and Add any User or Group exclusions and then click OK.
image thumb73 Configuring the User Profile Service in SharePoint 2010
Next we will Configure a Synchronization Timer Job via Central Administration / Application Management / Manage Service Applications / User Profiles.
image thumb74 Configuring the User Profile Service in SharePoint 2010
Click Enable
We will finish off by initiating a full synchronization via Central Administration / Application Management / Manage Service Applications / User Profiles / Start Profile Synchronization.
image thumb75 Configuring the User Profile Service in SharePoint 2010
In order to confirm that the import was a success, the Number of User Profiles should now be set to the number of users in your organization, in my case I have 269 dummy users in my Active Directory domain.  Word of note; this will take some time and is considerably slower than an Active Directory User Profile import in SharePoint 2007.
image thumb76 Configuring the User Profile Service in SharePoint 2010
You can also venture into Manage User Profiles and search for users (please take note that SharePoint 2010 does not display any users by default and that you will have to search for them).
image thumb77 Configuring the User Profile Service in SharePoint 2010
Edit a User Profile to ensure that all the necessary Active Directory attributes were successfully imported.
image thumb78 Configuring the User Profile Service in SharePoint 2010
We have now successfully completed a User Profile Synchronization which will form as a basis for User’s My Sites in my next article.  Until then, happy SharePointing!!
References
User Profile Service administration (SharePoint Server 2010) http://technet.microsoft.com/en-us/library/ee721050.aspx
Configure profile synchronization (SharePoint Server 2010) http://technet.microsoft.com/en-us/library/ee721049.aspx