Sunday, November 29, 2009

Scopes in MOSS Search

In this post, I am going to discuss about how to create search scopes and limit search results to that scope.

To create a new Search Scope navigate to your Shared Service Provider web site and click on Search Settings. Scroll down and you will see the Search Scopes section. Click on "View Scopes" and click "New Scope" at the top.

clip_image002

Here we will create a new Scope and call it Team Tasks. We'll use the default results page.

clip_image004

From here we can add rules that will define our Scope. In my case I want the scope to be limited to a specific list so I choose web address and in the folder section I paste the URL of my list, excluding any aspx pages. I choose to Include any item that meets this criteria, i.e. any item that is in this list. Click "Ok" and that is it.

clip_image006

Your new Scope will be ready for use once it is complied which usually happens every 15 minutes or so. You can force the compile by going to Search Setting and clicking "Update Now" under the Search Scopes section. Now the question is how you use it.

To use your newly created Search Scope navigate to the Top Level Site Settings and click on "Search Scopes" under "Site Collection Administration".

clip_image008

From there you can see that your new scope is listed under the "Unused Scopes" section. We need to move it to the "Advanced Search" display group. Do this by clicking on that group name and enable it by clicking its check box.

clip_image010

You can now see that the Scope is in the right grouping.

clip_image012

The final step here is to enable the Scopes section of our Advanced Search page. The results are as follows:

clip_image014

Configure Search On MOSS 2007

The following procedures step you through the process of configuring Office SharePoint Server 2007 search services, creating a Web application for the SSP, creating the SSP, and configuring indexing settings.

Start and configure the Search service

  1. On the SharePoint Central Administration home page, click the Operations tab on the top navigation bar.
  2. On the Operations page, in Topology and Services, click Servers in farm.
  3. On the Servers in Farm page, click the server on which you want to configure the search service.
  4. Click Start next to Office SharePoint Server Search.
  5. On the Office SharePoint Server Search Settings page, in the Query and Indexing section, make sure that the Use this server for indexing content and Use this server for serving search queries check boxes are selected.
  6. In the Default Catalog Location section, type a path to a physical folder to store the index files, or use the default location that is specified.
  7. In the Contact E-Mail Address section, specify a valid e-mail address.
  8. In the Service Account section, click Configurable, and in User name and Password, type the user name and password for the user account under which you want the Search service to run. The user account must be a member of the Administrators group on the computer that is running the Search service. If you want to use the principle of least privilege and select a unique user account that does not have administrative rights on your front-end servers or on your back-end database servers, see the Known Issues/Readme for Office SharePoint Server 2007 Beta 2. The user name must be in the format DOMAIN\username.
  9. In the Web Front End And Crawling section, do one of the following:
    • If you are configuring the search service on a server that provides Web services and renders Web content, click No dedicated Web front-end computer for crawling
    • If you are configuring the search service on a server that is a standalone search server that does not provide Web services and render Web content, click Use a dedicated web front end computer for crawling, and then, in Select a web front end computer, click the computer you want to use for crawling.
  10. Click Start.
    Start the Windows SharePoint Services Web Application service

    You must start the Windows SharePoint Services Web Application service on every computer that you want to act as a Web server and was set up using the Complete option during Setup. This service is started by default on servers that were set up using the Web Front End option. To enhance security, you can leave this service turned off on application servers that do not provide Web content to client computers. Also, you do not need to turn this service on to use SharePoint Central Administration on a server.

    1. On the SharePoint Central Administration home page, click the Operations tab on the top navigation bar.
    2. On the Operations page, in Topology and Services, click Servers in farm.
    3. On the Servers in Farm page, click the server on which you want to start the Windows SharePoint Services Web Application service.
    4. Click Start next to Window SharePoint Services Web Application.
    Create the Shared Services Provider
    1. On the SharePoint Central Administration home page, click the Application Management tab on the top navigation bar.
    2. On the Application Management page, in the Office SharePoint Server Shared Services section, click Create or configure this farm's shared services.
    3. On the Manage this Farm's Shared Services page, click New SSPImportant: If you have not created a Web application for the SSP administration site, you need to create one before you create the SSP. If you have already created a Web application for the SSP administration site, skip to step 14.
    4. On the New Shared Services Provider page, click Create a new Web application.
    5. On the Create New Web Application page, in the IIS Web Site section, click Create a new IIS web site, and do not modify the default settings in this section.
    6. In the Security Configuration section, under Authentication provider, select the appropriate option for your environment, and do not modify the default settings in the remainder of this section.
    7. In the Load Balanced URL section, do not modify the default settings.
    8. In the Application Pool section, click Create new application pool.
    9. In Application pool name, enter the name of your application pool or use the default name.
    10. Click Configurable, and in User name and Password, type the user name and password for the user account under which you want the application pool to run. The user account does not have to be a member of any particular security group. It is recommended that you use the principle of least privilege and select a unique user account that does not have administrative rights on your front-end servers or on your back-end database servers. You can use the user account that you specified as the Office SharePoint Server 2007 service account; however, if that user account is a member of a security group that has administrative rights on your front-end servers or your back-end database servers, you will not be following the principle of least privilege. The user name must be in the format DOMAIN\username.
    11. In the Database Name and Authentication section, verify the database information and make sure that Windows Authentication (recommended)is selected.
    12. In the Search Server section, do not modify the default settings.
    13. Click OK. Upon successful creation of the Web application, the New Shared Services Provider page appears.
    14. In the SSP Name section, in Web Application, select the Web application that you created for the SSP, and do not modify any of the default settings in this section.
    15. In the My Site Location section, do not modify any of the default settings.
    16. In the SSP Service Credentials section, in User name and Password, type the user name and password for the user account under which you want the SSP to run. The user account does not have to be a member of any particular security group. It is recommended that you use the principle of least privilege and select a unique user account that does not have administrative rights on your front-end servers or on your back-end database servers. You can use the user account that you specified as the Office SharePoint Server 2007 service account; however, if that user account is a member of a security group that has administrative rights on your front-end servers or your back-end database servers, you will not be following the principle of least privilege. The user name must be in the format DOMAIN\username.
    17. In the SSP Database section, you can either accept the default settings (recommended), or specify your own settings for the database server, the database name, or the SQL authentication credentials.
    18. In the Search Database section, you can either accept the default settings (recommended), or specify your own settings for the search database server, the database name, or the SQL Server authentication credentials.
    19. In the Index Server section, in Index Server, click the server on which you configured the Search service.  Note: If there is no index server listed in the Index Server section, then no server in your farm has been assigned the index server role. To assign the index server role to a server in your farm, follow the instructions in the "Configure the Search service" section earlier in this topic.
    20. In the SSL for Web Services section, click No.
    21. Click OK. Upon successful creation of the SSP, the Success page appears.
    22. On the Success page, click OK to return to the Manage this Farm's Core Services page.
    Configure indexing settings
    1. On the SharePoint Central Administration home page, click the Application Management tab on the navigation bar.
    2. On the Application Management page, in the Office SharePoint Server Shared Services section, click Create or configure this farm's shared services.
    3. On the Manage this Farm's Shared Services page, click SharedServices1.
    4. On the Shared Services Administration page, in Search, click Search Settings.
    5. On the Configure Search Settings page, in the Crawl Settings section, click Default content access account.
    6. In the Default content access account section, in Account, Password, and Confirm Password, type the user name and password for the user account that you want to use to crawl content on your sites. This account must be a domain user account. It is recommended that you use the principle of least privilege and select a unique user account that cannot modify content and does not have administrative rights on your front-end servers or on your back-end database servers. You can use the user account that you specified as the Office SharePoint Server 2007 service account; however, if that user account is a member of a security group that has administrative rights on your front-end servers or your back-end database servers, you will not be following the principle of least privilege. The user account that you specify will be added to the Web application Full Read policy for your farm. The user name must be in the format DOMAIN\username.
    7. Click OK.
    8. In the Crawl Settings section, click Content sources.
    9. On the Manage Content Sources page, click Local Office SharePoint Server sites.
    10. On the Edit Content Source page, in the Crawl Schedules section, under Full Crawl, click Create schedule.
    11. In the Manage Schedules dialog box, configure schedule settings for full crawls of your content, and then click OK.
    12. In the Crawl Schedules section, under Incremental Crawl, click Create schedule.
    13. In the Manage Schedules dialog box, configure schedule settings for incremental crawls of your content, and then click OK.
    14. In the Start Full Crawl section, select the Start full crawl of this content source check box, and then click OK.

    You are done!

    Tuesday, November 3, 2009

    Include Web Parts in Custom Site Definition through ONET.xml

    When you install Windows SharePoint Services 3.0, six Onet.xml files are placed within the setup directory, one in \Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\GLOBAL\XML that applies globally to the deployment, and five in different folders within ...\TEMPLATE\SiteTemplates that apply to each of the five site definitions that ship with Windows SharePoint Services 3.0. They are Blog sites, the central administration site, Wiki sites, Meeting Workspace sites, and team SharePoint sites.

    The global Onet.xml file defines list templates for hidden lists, list base types, a default definition configuration, and modules that apply globally to the deployment. The five Onet.xml files in the \SiteTemplates directory define navigational areas, list templates, document templates, configurations, modules, components, and server e-mail footer sections used in the five site definitions.

    Functions of Onet.xml

    Depending on its particular use, an Onet.xml file can serve multiple functions, such as the following:

    • Define the top and side navigation areas that appear on the home page and in list views for a site definition.
    • Specify the list definitions that are used in each site definition and whether they are available for creating lists on the Create page.
    • Specify document templates that are available in the site definition for creating document library lists on the New page, and specify the files used in the document templates.
    • Define the base list types from which default Windows SharePoint Services lists are derived. (Only the global Onet.xml file serves this function.)
    • Specify the configurations of lists and modules that are used within each site definition.
    • Specify Windows SharePoint Services components.
    • Define the footer section used in server e-mail.

    Web Site Definition Tasks with Onet.xml

    The following kinds of tasks can be performed in a custom Onet.xml to create a custom site definition:

    • Specify an alternate cascading style sheet (CSS) file, JavaScript file, or ASPX header file for a site definition.
    • Modify navigation areas for the home page and list pages.
    • Add a list definition as an option to the Create page.
    • Add a document template for creating document libraries.
    • Define one or more configurations for the site definition, specifying the lists, modules, files, and Web Parts that are included when a site definition configuration is instantiated.

    Include web parts in ONET.xml

    We can include web parts in ONET.xml so that they are available on default page of the site when created with site template.

    I am not going in detail about different sections of ONET file. Assuming you are aware of this. J . You can always get back to me on this.

    First I’ll discuss about how to put a OOTB web part such as shared documents, Announcements, etc. on home page. Here I am discussion about how to put shared documents web part.

    · You need to include feature ID of shared documents in ONET file in <Lists> section which will be activated upon creation of site collection and list will get created. You need not change feature ID of shared documents. You can check it from 12 hive\TEMPLATE\FEATURES\DocumentLibrary\Feature.xml.

    · Put the following line under Lists section of configuration ID 0

    · <List FeatureId="00BFEA71-E717-4E80-AA17-D0C71B360101" Type="101" Title="$Resources:core,shareddocuments_Title;" Url="$Resources:core,shareddocuments_Folder;" QuickLaunchUrl="$Resources:core,shareddocuments_Folder;/Forms/AllItems.aspx" />

    · It should be as below.

    <Configurations>

    <Configuration ID="-1" Name="NewWeb" />

    <Configuration ID="0" Name="Default">

    <Lists>

    <List FeatureId="00BFEA71-E717-4E80-AA17-D0C71B360101" Type="101" Title="$Resources:core,shareddocuments_Title;" Url="$Resources:core,shareddocuments_Folder;" QuickLaunchUrl="$Resources:core,shareddocuments_Folder;/Forms/AllItems.aspx" />

    · Now put below line under Module. Here we can mention where the web part should be placed and the order.

    · <View List="$Resources:core,shareddocuments_Folder;" BaseViewID="0"

    WebPartZoneID="Left"

    WebPartOrder="2" />

    · It should be as below

    <Modules>

    <Module Name="Default" Url="" Path="">

    <File Url="default.aspx" NavBarHome="True">

    <View List="$Resources:core,shareddocuments_Folder;" BaseViewID="0"

    WebPartZoneID="Left"

    WebPartOrder="2" />

    That’s it. Create site collection with custom site template. You should be able to see Shared Documents web part in Left zone on top.

    Monday, October 26, 2009

    SharePoint Migration

    1. Introduction

    There are different approaches to migrate content from SharePoint Portal Server (SPS) 2003 to Microsoft Office SharePoint Server (MOSS) 2007.

    Some of them are,

    1. In-place
    2. Database Migration
    3. Gradual

    This document describes the Database Migration approach in detail.

    2. Database Migration

    This approach is good when moving SharePoint 2003 content to a new hardware/architecture. When compared with other approaches, this is an advanced approach since this requires Server Administrator to install the new version on a separate farm or separate hardware, and then manually migrate databases to the new environment.

    This approach is required for Windows SharePoint Services version 2 environments that are using scalable hosting mode or “Active Directory Directory Service” (ADDS) account creation mode.

    Things to do are.

    1. Have an intermediate server with SharePoint Portal Server 2003 and Microsoft Office SharePoint Server 2007 installed on it.
    2. Install MOSS on a separate farm or separate hardware.
    3. Manually migrate databases (except configuration database) from SPS 2003 server to intermediate server and then finally to new environment.
    4. Attach database to the new farm.

    The process is shown pictorially below,

    clip_image002[6]

    Pros

    ü It allows us moving to new farm or new hardware.

    ü SharePoint Portal Server 2003 is still available and is untouched by upgrade.

    Cons

    • Very complex process that requires many manual steps.
    • Higher risk of errors.
    • Requires additional manual steps to retain original URLs for sites.
    • Search scopes must be recreated and search settings must be reapplied.
    • Requires new server farm, and twice the amount of SQL Server storage space.

    3. Table showing various Migration scenarios

    Sl. No.

    Scenario

    Approach

    Pros/Cons

    1

    SPS2003 to MOSS2007

    Site by Site Migration

    We can decide which sites will be migrated to MOSS 2007 platform

    2

    SPS2003 to MOSS2007

    Content DB to Content DB Migration

    We do not have a choice to decide on which sites will be migrated, all the sites in ContentDB will be migrated to the MOSS platform

    3

    WSS2.0 to MOSS2007

    Site by Site Migration

     

    4

    WSS2.0 to MOSS2007

    Content DB to Content DB Migration

     

    5

    MOSS2007 to MOSS2007

    Site by Site Migration

    We can decide which sites will be migrated to MOSS 2007 platform

    6

    MOSS2007 to MOSS2007

    Content DB to Content DB Migration

    We do not have a choice to decide on which sites will be migrated, all the sites in ContentDB will be migrated to the MOSS platform

    7

    WSS3.0 to MOSS2007

    Site by Site Migration

     

    8

    WSS3.0 to MOSS2007

    Content DB to Content DB Migration

     

    9

    Promoting a subsite to top level Site Collection in SPS2003

    Using SharePoint Migration (smigrate) tool

    We can change the virtual server. Users can’t be migrated.

    10

    Promoting a subsite to top level Site Collection in MOSS2007

    Using Import/Export of stsadm tool

    We can change web application. Users will be migrated.

    4. Two approaches in Database Migration

    There are two approaches in Database Migration are,

    àUsing site backup taken with stsadm utility i.e. for Site By Site migration.

    By this approach, we can decide which sites will be migrated to MOSS 2007 platform.

    àUsing the default content database backup file taken from SQL Enterprise Manager i.e. ContentDB to ContentDB migration.

    By this approach, we do not have a choice to decide on which sites will be migrated, all the sites in that ContentDB will be migrated to the MOSS platform.

    4.1 Site by Site Migration

    Various scenarios in this approach are migrating sites from

    • SPS 2003 to MOSS 2007
    • WSS 2.0 to MOSS 2007

    SPS 2003 to MOSS 2007:-

    Steps involved in this approach briefly are

    1. Take the backup of a 2003 site from SPS2003-Production Server that needs to be migrated using stsadm utility.

    2. Create a new database using the SQL Enterprise Manager on the Intermediate Server.

    3. Make all the other databases offline except newly created one from central administration page so that the restore will happen in the newly created content database.

    4. Run the restore on the Intermediate Server; check in the “Manage content database” so that it is created in the new content database.

    5. Run prescan /all on the intermediate server.

    6. Take the backup of the content database using SQL Enterprise Manager and copy it to the Database Server of MOSS 2007.

    7. Restore the content database using SQL Enterprise Manager on the Database Server.

    8. Attach the content database using stsadm utility

    9. Perform iisreset and browse the site

    Please note that, in this case, Intermediate Server acts as both SPS2003 development environment Front End server as well as MOSS2007 Stage Environment Front End server; hence hereafter “Intermediate Server” term will be used for combined SPS2003 and MOSS2007 operations.

    Steps elaborated

    1. Take the backup of a 2003 site (from SPS2003-Production Server) that needs to be migrated using stsadm utility.

    Site Backup using stsadm tool

    clip_image004[6]

    This tool can be executed from SPS2003 installation folder

    Please open the command prompt on SPS2003 server and change the path to the below location:-

    %drive%\program files\common files\Microsoft shared\web server extensions\60\BIN\

    From this location, please run below mentioned command

    Stsadm operation for backup:-

    Stsadm –o backup –URL <<URL of site to be backup>> -filename <<filename with path where backup file will be stored>>

    Create a new database using the SQL Enterprise Manager on the Database Server of the SPS 2003 Intermediate Server.

    The SQL Enterprise Manager can be opened from

    Start -> Programs -> Microsoft SQL Server

    In the SQL Enterprise Manager window, right click on the server name and select the NewàDatabase option. Specify the Database name and click on the OK button to create the new Database.

    clip_image006[6]

    On the Intermediate Server, make all the content databases offline from Central Administration page so that the site restore which we will perform in the next step, will happen in the newly created content database.

    To carry out this step, on the Intermediate server, please go to Central Admin of SPS 2003 as mentioned below:-

    Start -> Programs -> SharePoint Portal Server -> SharePoint Central Administration

    On this page, please click on

    Configure Virtual Server Settings from the Virtual Server List Page à [click on the specific Virtual Server Name] à Manage Content Databases (which is under Virtual Server Management.)

    Select the “Offline” option from the Database Status dropdown list and click on the OK button to apply this setting.

    clip_image008[6]

    The same process needs to be carried out for all the other content databases. Carry out the restore operation on the intermediate server.


    1. restore the site collection using stsadm tool

    Site Restore using stsadm tool

    clip_image010[6]

    This tool should be executed from SPS2003 installation folder

    Please open the command prompt on the Intermediate Server and change the path to the below SPS 2003 Installation location:-

    %drive%\program files\common files\Microsoft shared\web server extensions\60\BIN\

    From this location, please run below mentioned command

    Stsadm operation for restore:-

    Stsadm –o restore –URL <<URL of site to be backup>> -filename <<filename with path where backup file will be stored>>

    Check “Manage content database” page on Central Administration site of the Intermediate Server. “Current Number of Sites” count for new Content Database must be incremented by 1 (e.g. from 0 to 1). This confirms that the site has been restored in this new Content Database.

    clip_image012[6]

    1. Run prescan /all command from the command prompt i.e. Start -> Run then type cmd and press enter to open the command prompt.

    This tool should be executed from MOSS2007 installation folder

    Please open the command prompt on the intermediate server and change the current path to the below MOSS 2007 installation location:-

    %drive%\program files\common files\Microsoft shared\web server extensions\12\BIN\

    From this location, please run below mentioned command

    prescan /all

    prescan operation start screen:-

    clip_image014[8]


    prescan operation end screen:-

    clip_image016[10]

    Please make sure that you get the “Operation Completed Successfully” screen as shown above before proceeding ahead.

    1. Take the backup of content database using SQL Enterprise Manager on the Database server of SPS 2003 and copy it to the Database Server of MOSS 2007.

    Content Database Backup

    Please go to Start -> Programs -> Microsoft SQL Server -> Enterprise Manager to open the Enterprise Manager on the Database server of SPS 2003.

    Right click on the desired Content Database, select All Actions -> Backup

    Please specify the file name for the Backup and click on the OK button to start the backup operation as shown below.

    clip_image018[10]

    1. Restore the content database using SQL Enterprise Manager on the Database Server of MOSS 2007.

    Content Database Restore

    Please go to Start -> Programs -> Microsoft SQL Server -> Enterprise Manager to open the Enterprise Manager on Database Server of MOSS 2007.

    Right click on the Databases and select Restore from the context menu. Please specify the new database name, select the backup file name and click on the OK button to start the Restore operation.

    clip_image020[10]

    1. Run the stsadm tool to attach the content database to the web application on MOSS 2007 server.

    Attach Content Database to a web application in MOSS 2007 Server

    This tool should be executed from

    %drive%\program files\common files\Microsoft shared\web server extensions\12\BIN\

    Please open the command and change the current path to the above mentioned MOSS 2007 installation location:-

    clip_image022[8]

    Stsadm operation for attaching the content database to the MOSS 2007 web application.

    stsadm –o addcontentdb –URL <<URL of 2007 site collection>> -databasename <<new content database name>> -databaseserver <<database server name>>

    1. Perform IISRESET (From Start -> Run -> type IISRESET and press enter.

    After the IISRESET operation is complete, browse the site with the same URL but with the new server name. E.g. if the original site URL was http://SPS2003Server/sites/TestSite, it should become http://MOSS2007Server/sites/TestSite after migrating it on the MOSS 2007 portal.

    clip_image024[8]

    WSS 2.0 to MOSS 2007:-

    Same as SPS2003 to MOSS2007
    4.2 ContentDB to ContentDB Migration

    Steps involved in this approach briefly are

    1. Take the backup of the default content database of the SPS 2003 site from SPS2003-Production Server using SQL Server Enterprise Manager.
    2. Restore the content database onto SPS 2003’s SQL Server on Intermediate Server
    3. Attach the content database in SPS 2003’s central administration page on Intermediate Server
    4. Run prescan command from the command prompt on Intermediate Server
    5. Take the backup of content database using SQL Enterprise Manager on Database Server of SPS 2003 and copy it to the Database Server of MOSS 2007.
    6. Restore the content database using SQL Enterprise Manager on Database Server of MOSS 2007.
    7. Attach the content database using stsadm utility on MOSS 2007 server.
    8. Perform IISRESET and browse the site


    Steps elaborated

    1. Take the backup of the default content database of the SPS 2003 site from SPS2003-Production Server using SQL Server Enterprise Manager.

    Content Database Backup Operation

    Please open the SQL Server Enterprise Manager on the Database Server of SPS2003 Production Server as mentioned in the previous step.

    Select the database to be backed up and select right click -> backup from the context menu. Specify the file name and click OK button to start the backup operation.

    clip_image026[6]

    1. Restore the content database onto SPS 2003’s Database Server on Intermediate Server

    Content Database Restore Operation

    Please go to Start -> Programs -> Microsoft SQL Server -> Enterprise Manager to open the Enterprise Manager on Database Server of SPS2003 on the Intermediate Server.

    Right click on the Databases and select Restore from the context menu. Please specify the new database name, select the backup file name and click on the OK button to start the Restore operation.

    clip_image028[6]

    1. Attach the content database in Intermediate Server’s SPS 2003 Central Administration page

    How to attach content database to SharePoint 2003 Portal

    After restoring the database using SQL Server Enterprise Manager, go to Manage Content Database on Intermediate Server’s SPS 2003 Central Administration and click on Add a Content Database.

    On the Add Content Database page, select the Specify Database Server Settings radio button, give the server name and the database name which was restored in SQL, and give other values accordingly.

    clip_image030[6]

    1. Run the prescan /all command from the command prompt on the Intermediate Server.

    This tool can be executed from MOSS2007 installation folder

    Please open the command prompt on the Intermediate Server and change the path to below location:-

    %drive%\program files\common files\Microsoft shared\web server extensions\12\BIN\

    prescan start screen

    clip_image032[6]


    prescan end screen

    clip_image016[11]

    Please make sure that you get the “Operation Completed Successfully” screen as shown above before proceeding ahead.

    1. Take the backup of the content database using SQL Enterprise Manager from Database server of SPS2003 and copy it to Database server of MOSS 2007.

    Content Database Backup

    Please open the SQL Server Enterprise Manager on Database Server of SPS2003 as mentioned in the previous step.

    Select the database to be backed up and select right click -> backup from the context menu. Specify the file name and click OK button to start the backup operation.

    clip_image034[6]

    1. Restore the content database using SQL Enterprise Manager on the Database Server of MOSS 2007.

    Content Database Restore

    Please go to Start -> Programs -> Microsoft SQL Server -> Enterprise Manager to open the Enterprise Manager on Database Server of MOSS 2007.

    Right click on the Databases and select Restore from the context menu. Please specify the new database name, select the backup file name and click on the OK button to start the Restore operation.

    clip_image036[6]

    1. Attach the content database using stsadm utility on the Intermediate Server’s MOSS 2007.

    Attach the Content Database to a web application in MOSS 2007 using stsadm utility

    This tool should be executed from MOSS2007 installation folder

    Please open the command prompt on Intermediate Server’s MOSS 2007 and change the current path to the MOSS 2007 installation location as shown below:-

    %drive%\program files\common files\Microsoft shared\web server extensions\12\BIN\

    clip_image038[6]

    From the above location, please run below mentioned command on Intermediate Server

    Stsadm operation for attaching the content database

    stsadm –o addcontentdb –URL <<URL of 2007 site collection>> -databasename <<new content database name>> -databaseserver <<database server name>>

    1. Perform IISRESET from Start -> Run -> IISRESET and press enter to do the IISRESET on Intermediate Server and then browse the site

    iisreset

    clip_image040[6]


    5. Site before migration i.e. on the SPS 2003 platform

    clip_image042[6]


    6. Site after Migration i.e. on the MOSS 2007 platform

    clip_image044[6]


    7. The SharePoint Migration Tool (Smigrate.exe)

    Smigrate.exe is a Microsoft Windows SharePoint Services utility that can be used to back up and restore a Web site on a server running Windows SharePoint Services. This utility is used when migrating a SharePoint Team Services deployment to Windows SharePoint Services. It can also help you migrate sites from one server to another (or to the same server) in 2003 directly.

    We can use the Stsadm.exe command-line tool only to back up and to restore top-level Windows SharePoint Services Web sites. The SharePoint Migration Tool (Smigrate.exe) is a more flexible tool to use in certain backup and restore scenarios. Although the SharePoint Migration Tool does not back up or restore security information, you can use the SharePoint Migration Tool to back up and to restore individual subsites that are contained in top-level Web sites. You do not require local administrative credentials on the server to export a Web site when you use the SharePoint Migration Tool. However, you must be a member of the Administrator site group on the Web site that you want to back up and on the Web site that you want to restore to before you can use the SharePoint Migration Tool (Smigrate.exe) for backup and restore operations.

    Using smigrate to promote a subsite to a top level site collection.

    This tool can be executed from SPS2003 installation folder

    Please open the command prompt on the SPS2003 Production Server and change the path to below location:-

    %drive%\program files\common files\Microsoft shared\web server extensions\60\BIN\

    To backup a subsite:

    1. Enter the following at the command line on SPS2003 server:

    2. smigrate -w <<URL of site to be backup>> -f <<filename with path where backup file will be stored>>

    Example backup:

    smigrate -w http://server -f backup.fwp

    smigrate -w http://server -f c:\backups\backup.fwp

    smigrate -w http://server -f \\share\folder\backup.fwp

    smigrate -w http://server -f c:\backups\backup.fwp -e -y

    To restore a site on SPS2003:

    1. Create a new site on SPS2003 server through the portal site creation wizard. Note the site URL

    2. When you get to the point of applying a template, stop and close the browser. This is because we should not apply the site template as we are restoring site from a backup file.

    3. Enter the following restore command (where siteurl is the url you used in step #1) on SPS2003 server:

    4. smigrate -r -w <<site URL to be restored>> -f <<filename with path of backup file>>

    Example restore:

    smigrate -r -w http://server -f backup.fwp

    smigrate -r -w http://server -f c:\backups\backup.fwp

    smigrate -r -w http://server -f \\share\folder\backup.fwp

    smigrate -r -w http://server -f c:\backups\backup.fwp –x

    Note: We can use stsadm command for creating site with a blank template as below.

    stsadm -o createsite -url <<site URL>> -ownerlogin <<Owner login user ID>> -owneremail <<Owner email ID>>

    8. Migrate content or sites after upgrade

    Migrate content by using import/export

    Migrate a site collection by using backup/restore

    Content DB to Content DB Migration

    After you have completed the upgrade process, you can redistribute content or sites as needed to fit your new environment. It is easiest to move content or sites before you open the sites to users again, so that they do not have to experience more than one outage window.

    Some of the reasons that would prompt you to redistribute content after upgrade include:

    Changing a portal site structure to fit current organizational needs For example, you might need to realign your portal sites and subsites to respond to a reorganization within your company.

    Consolidating Shared Services Providers (SSPs) For Microsoft Office SharePoint Server 2007, we recommend that you have one SSP per region. However, by default, after upgrade you have one SSP per portal site.

    Moving MySites into a dedicated Web application For Office SharePoint Server 2007, it is recommended that you host all MySites on a dedicated Web application, rather than in the same Web application as your portal site.

    If you want to redistribute sites among your content databases, you can use any of the following methods to perform this action:

    Import/Export Use this method to move a subsite into a different site collection, or to move an entire site collection to a different database or Web application. With import/export, you can choose whether or not to include security settings when you import. To migrate content by using this method, use the import and export operations with the Stsadm.exe command-line tool.

    Note: You can import sites only into site collections that are using same language as the exported site.

    Backup/Restore Use this method to move an entire site collection to a different database or Web application. To migrate content by using this method, use the backup and restore operations with the Stsadm.exe command-line tool.

    Content Migration application programming interfaces (APIs) Use this method to move smaller sets of data (down to the list or item level) between sites. For more information about using the Content Migration APIs, see Windows SharePoint Services 3.0 Software Development Kit (http://go.microsoft.com/fwlink/?LinkId=76000&clcid=0x409).

    Content Deployment If you want to migrate or publish content to a new site, you can use the content deployment capability in Office SharePoint Server 2007

    8.1 Migrate content by using import/export

    The import/export feature is based on the new Content Migration APIs. With import/export, you can migrate either subsites or entire site collections, and you can import a subsite into an existing site collection. Like the Smigrate.exe utility in the previous version, import/export requires that the site you import to already exists.

    Note: import/export does not include some site settings, such as Recycle Bin state and alerts. You can import sites only into site collections that are using same language as the exported site.

    Using import/export to promote a subsite to a top level site collection.

    1. Export the subsite or site collection by using the following command on MOSS 2007 server:

    Stsadm.exe -o export -url <URL> -includeusersecurity

    2. In Central Administration site of MOSS2007, on the Manage Content Databases page, set all the databases status to offline except the one that currently contains the subsite or site collection.

    3. Create a blank site or site collection to contain the content you are importing.

    4. Import the subsite or site collection by using the following command on MOSS2007 server:

    Stsadm.exe -o import -url <URL> -includeusersecurity

    5. The includeusersecurity parameter specifies that you want to import the security settings for the subsite or site collection. If you do not need the security settings, you can omit this parameter.

    8.2 Migrate a site collection by using backup/restore

    This can be in the following scenarios of Site by Site Migration

    • MOSS 2007 to MOSS 2007
    • WSS 3.0 to MOSS 2007

    If you want to migrate an entire site collection, you can do so by using the backup and restore operations with the Stsadm.exe command-line tool. First, back up the site collection you want to move, then delete it from the current database and take the database offline. Then, restore the site collection to the new URL. Be sure that there is no site collection already at the new location, or the restore operation will fail.

    Note: If there is a site collection at the destination and you want to overwrite it, you can use the overwrite parameter with the restore operation.

    To use backup/restore to migrate a site collection on MOSS2007 server, use the following process:

    1. Back up the site collection by using the following command on MOSS2007 server:

    Stsadm.exe -o backup -url <URL>

    2. In Central Administration site of MOSS2007, on the Manage Content Databases page, set to offline the database that currently contains the site collection.

    3. Restore the site collection by using the following command on MOSS2007 server:

    stsadm.exe -o restore -url <URL>

    4. In Central Administration, on the Manage Content Databases page, set to online the database that originally contained the site collection.


    8.3 Content DB to Content DB Migration

    In this approach we won’t have a choice of which sites to be migrated. All sites in content database will be migrated.

    This can be used in following scenarios

    • Migrate content DB to a different MOSS Server
    • Migrate from one web app to another web app on same server

    To migrate content DB in MOSS2007 server, use the following process:

    1. Take the backup of content database that needs to be migrated from source Database Server.

    2. Restore the content database on destination Database Server

    3. In Central Administration of MOSS2007 server, click on “Content Databases” which is under Application Management

    4. Click on “Add a content database” link and enter database server name and database name and then click ok to finish.

    5. Things you need to check at this level are web application name, database server name and database name

    clip_image045[4]

    10. Prescan utility

    Prescan.exe

    Before you can upgrade to Microsoft Office SharePoint Server 2007 or Microsoft Windows SharePoint Services 3.0, you must run the pre-upgrade scan tool (Prescan.exe) against your existing Web sites. The pre-upgrade scan tool scans your sites and reports issues, which enables you to fix any errors before you perform an upgrade. If you have not successfully run this tool and you attempt to upgrade your environment, when you attempt to run the SharePoint Products and Technologies Configuration wizard, the wizard will exit and prompt you to run the tool. We highly recommend that the server administrator run the pre-upgrade scan tool before the upgrade, and resolve any problems that can be resolved before scheduling the upgrade.

    Note   It is a best practice to run the pre-upgrade scan tool at least twice — once while you are planning your upgrade to identify issues, and then again before you perform the upgrade to verify any changes you made and identify any new issues that may have resulted from changes to your environment.

    For more information about upgrade, migrations, and using the pre-upgrade scan tool, see the Microsoft Web site (http://go.microsoft.com/fwlink/?LinkId=89572).

    10.1 What the pre-upgrade scan tool does

    Prescan.exe has two primary purposes:

    àParse and save list definitions with the associated lists.
    SharePoint Portal Server 2003 Service Pack 2 parses and saves list definitions with the associated lists whenever a list is modified. However, this process should be completed for all lists, so Prescan.exe calls the method from SharePoint Portal Server 2003 Service Pack 2 to persist that data.

    àReport on common issues that will result in a failed upgrade.
    Running Prescan.exe, identifying and resolving reported issues, and then re-running Prescan.exe to verify those fixes is a best practice when planning an upgrade to Office SharePoint Server 2007 or Windows SharePoint Services 3.0.

    10.2 Issues that are reported by the pre-upgrade scan tool

    For each SharePoint site, issues reported by this tool include the existence of the following objects:

    Customized site templates   You need to know which site templates have been customized for a particular site so you can verify the customizations again after the upgrade.

    Orphaned objects   Objects such as list items, lists, documents, Web sites, and site collections can be orphaned — that is, the objects exist but are not associated with a particular site. Because orphaned objects do not work in the previous version, they won’t work after the upgrade. If you perform an in-place upgrade, the orphaned items will still exist but will not work. If you perform a gradual upgrade, orphaned items will not be copied to the new site. We recommend that you recover any orphaned objects before upgrading.

    Tip   Members of the Administrators group on the Web servers can recover orphaned items before the upgrade by following the steps in Knowledge Base article 918744, Description of a new command-line operation that you can use to repair content databases in Windows SharePoint Services (http://go.microsoft.com/fwlink/?linkid=69958&clcid=0x409).

    Custom Web Parts   Report the existence of custom Web Parts to the appropriate site administrator or developer before upgrading, to give the administrator or developer time to investigate.

    Note   Heavily obfuscated custom Web Parts might need to be rebuilt and redeployed after the upgrade.

    Sites that are based on languages or that use controls that are not installed   If the database contains a Web site based on a language template pack that is not currently installed on the front-end Web servers, or a Web site that uses controls (such as the Microsoft Office Web Components) that are not currently installed on the front-end Web servers, install the missing language packs or controls before upgrading.

    10.3 Running the pre-upgrade scan tool

    You can use the pre-upgrade scan tool to scan all Web sites in your environment (by using the /all parameter) or to scan a specific URL (by using the /v <URL> parameter). If you do not supply a scoping parameter, all Web sites will be scanned. The pre-upgrade scan tool takes the following parameters:

    Parameter

    Description

    /all

    Scans all site collections in a server farm.

    /v <URL>

    Scans all site collections at a specific URL.

    /c preupgradescanconfig.xml

    Uses the preupgradescanconfig.xml file while scanning. This configuration file contains additional logic to identify the portal site templates as standard templates used by SharePoint Portal Server 2003 rather than as custom templates based on Windows SharePoint Services 2.0. You must use this parameter when scanning site collections based on SharePoint Portal Server 2003. This parameter has no effect when scanning site collections based on Windows SharePoint Services 2.0.

    Running the scan can take several minutes or a few hours, depending on the amount of content in your environment.

    To run Prescan.exe, perform the following steps:

    1. On the command line, change to the folder that contains the file, and then run the prescan.exe command with the appropriate parameters. For example, prescan.exe /all or prescan.exe /c preupgradescanconfig.xml /all.

    2. After the scan has completed, review the summary report that is displayed in the command-line window.

    If there were any errors or if any upgrade issues were found for your sites, you can review the full report to see the details. The report is named PreupgradeReport_uniqueID_Log.txt (where uniqueID is a number string) and it is located in the temp directory on the computer of the user who ran the tool (for example, %SYSTEMDRIVE%:\Documents and Settings\User1\Local Settings\Temp). There is also a prescan.log file in the same directory, which notes the times when the pre-upgrade scan tool was run.

    After you run the pre-upgrade scan tool, you can review the reports to find and troubleshoot issues. (You can search for "error" in the report to find the issues.) You can also share the relevant pre-upgrade scan test results with other members of the upgrade team. For example, you can report issues such as customized site templates or custom Web Parts to the appropriate site owner, Web designer, or developer before scheduling the upgrade to give them time to investigate the issues and take preliminary steps. For example, a designer or developer might decide that it would be prudent to rebuild a heavily obfuscated Web Part before the upgrade occurs. Site owners can then verify any customizations that have been done to their sites, including site templates and changes to core Active Server Pages Extension (ASPX) files, and can note any potential issues.

    10.4 Common Prescan.exe errors

    For more information about common errors that are logged in the pre-upgrade scan report, see the Microsoft Web site (http://go.microsoft.com/fwlink/?LinkId=89571).

    11. Stsadm command-line tool (Office SharePoint Server)

    11.1 About stsadm utility

    The stsadm.exe tool provides a method for performing the Office SharePoint Server 2007 administration tasks at the command line or by using batch files or scripts. Stsadm.exe provides access to operations not available by using the Central Administration site, such as changing the administration port. The command-line tool has a more streamlined interface than Central Administration, and it allows you to perform the same tasks. There are certain operations and certain parameters that are only available by using the Stsadm.exe command-line utility.

    The stsadm.exe utility is located at the following path:

    %drive%\program files (x86)\common files\Microsoft shared\web server extensions\12\bin

    Parameters used in attaching the Content Database

    At the command prompt, type the following command to attach the Windows SharePoint Services 2.0 content database, and then press ENTER:

    stsadm -o addcontentdb -URL http://URLofWindowsSharePointServicesSite -databasename DatabaseName -databaseserver DatabaseServer.

    Note The placeholders in this command are defined as follows:

    http://URLofWindowsSharePointServicesSite is the URL of the SharePoint site that hosts the content database.

    DatabaseName is the name of the database that you want to attach to the new Web application.

    DatabaseServer is the name of the computer that hosts the content database

    11.2 Understanding the errors

    If there were any errors or if any upgrade issues were found for your sites, you can review the full report to see the details.

    stsadm will maintain a log file with name upgrade.log. This file can be located in

    %drive%\program files (x86)\common files\Microsoft shared\web server extensions\12\Logs\

    After you run the stsadm for attaching the Content Database, you can review the reports to find and troubleshoot issues. (You can search for "error" in the report to find the issues)

    12. Useful links for SharePoint Migration

    • Upgrading to Office SharePoint Server 2007

    http://technet2.microsoft.com/Office/en-us/library/396c85d9-4b86-484e-9cc5-f6c4d725c5781033.mspx

    • Migrate from Microsoft Content Management Server (MCMS) 2002 to Office SharePoint Server (MOSS) 2007

    http://technet2.microsoft.com/Office/en-us/library/0d14c416-0750-492b-9205-7accff1338071033.mspx

    • Upgrading from SPS 2003 to MOSS 2007 Beta2 TR using the gradual approach

    http://msmvps.com/blogs/shane/archive/2006/10/02/Upgrading-from-SPS-2003-to-MOSS-2007-Beta2-TR-using-the-gradual-approach.aspx

    • Migrating SharePoint Portal 2003 Database to SharePoint 2007 using Content Database Migration

    http://www.sharepointblogs.com/johnwpowell/archive/2007/07/12/migrating-sharepoint-portal-2003-database-to-sharepoint-2007-using-content-database-migration.aspx

    • Prescan Errors and resolution

    http://support.microsoft.com/kb/937291

    http://support.microsoft.com/kb/923904/

    http://blogs.technet.com/wbaer/archive/2006/12/22/prescan-errors-what-they-mean.aspx

    • Microsoft Windows SharePoint Services Migration Tool (Helps you migrate to Windows SharePoint Services from SharePoint Team Services when upgrading to Microsoft Office Project Server 2003 from Microsoft Project Server 2002)
    http://www.microsoft.com/downloads/details.aspx?FamilyID=3df85705-5635-40db-adbe-e13ab8684a60&displaylang=en

    Tuesday, May 26, 2009

    About SharePoint

    Hi viewers,
    As this is my very first post, I would like put some facts about SharePoint and its capabilities.

    What is SharePoint?
    SharePoint is an integrated suite of server capabilities that can help improve organizational effectiveness by providing comprehensive content management and enterprise search, accelerating shared business processes, and facilitating information-sharing across boundaries for better business insight. Additionally, this collaboration and content management server provides IT professionals and developers with the platform and tools they need for server administration, application extensibility, and interoperability.

    Dev-Centric features of SharePoint
    One of the most appealing aspects of SharePoint 2007 (MOSS) for developers is that it is built on top of windows SharePoint services (WSS) 3.0 and ASP.NET 2. MOSS 2007 portal sites are created using WSS features and site definitions along with familiar ASP.NET building blocks such as Master Pages and Web Parts. This means that MOSS solutions can easily be extended with ASP.NET components such as server-side controls and custom Web Parts as well as custom components that utilize WSS features like custom list definitions, document libraries, event handlers, and workflows.


    Dev-Centric features include Building MOSS 2007 portal sites, Business Data Catalog (BDC) integration, Shared Service Provider (SSP), User Profiles, Search, and InfoPath Form Services.

    MOSS 2007 promotes an "assemble and configure" philosophy too that enables you to construct rich business solutions without ever starting Visual Studio or writing a line of managed code. However, remember that MOSS 2007 is built on top of ASP.NET 2.0 and WSS 3.0, providing ample opportunities to developers for extending standard functionality with custom components such as Web Parts, event handlers, workflows, page layouts, document converters, and server-side forms.

    Regards,
    Sudhakar