Welcome to TechNet Blogs Sign in | Join | Help

Migrating Microsoft Office SharePoint Server (MOSS) from Standalone to Farm Install

Introduction 

Installing Microsoft Office SharePoint Server (MOSS) in Standalone is useful to be able to quickly deploy MOSS on a single server computer. A Standalone configuration is best suited for a small number of web sites and installing with a minimal amount of administrative steps as well as being able to do evaluation or testing of the product before full deployment.

This document is targeted for IT Professionals that wish to migrate an existing MOSS Standalone installation to a MOSS Server Farm. There is no direct upgrade path available to go from Standalone to Farm, this article will describe how to migrate existing data from the Standalone installation to a new Farm installation.

For more information about installing Office SharePoint Server 2007 as Standalone: http://technet2.microsoft.com/Office/en-us/library/bd99c3a9-0333-4c1c-9793-a145769e48e61033.mspx?mfr=true

 

There are a couple of different options for migrating from a Standalone installation to a new Farm installation:

1.       SQL Backup/Restore from the Standalone installation to the Farm and STSADM.exe commands to attach the databases

2.       Central Administration Backup/Restore from the Standalone installation to the Farm installation

This article will describe the first step which involves using SQL backup/restore and STSADM.exe commands to attach the restored database to migrate from Standalone to Farm.

For more information about using Central Admin to perform a Backup/Restore: http://technet2.microsoft.com/Office/en-us/library/054c3d6d-a0d3-448a-864b-93db6283d7ce1033.mspx?mfr=true

 

The sequence of steps for migrating from Standalone to Farm is:

1.       Install the MOSS Farm Server and associated SQL Server

2.       Use SQL  tools to backup and restore the databases from the Standalone installation to the SQL Server associated with the Farm

3.       Use the STSADM.exe commands to attach the restored databases to the new Farm installation

 

Complete Farm Installation and SQL Server

 

Complete the Farm installation and SQL Server installation either via the Setup UI or the command-line installation including running the SharePoint Products and Technologies Configuration Wizard to create the Central Administration site.

For more information about installing Office SharePoint Server 2007 as Server Farm: http://technet2.microsoft.com/Office/en-us/library/776589ed-aba4-47eb-8c4d-86905ac11a511033.mspx?mfr=true

At this point the Central Administration site will have been created but no other sites should be added.

 

Migrating Data from the Standalone Installation

 

When you install MOSS in Standalone, as part of the installation steps Microsoft SQL Server 2005 Express Edition is installed. Since Farm installation will use SQL Server we will need to migrate the existing data from the Standalone install to the SQL Server that will be associated with the new Farm Installation using either:

1.       SQL Server Management Studio Express (on the Standalone installation)

2.       SQL Server Management Studio (on the SQL Server that will be associated with the Farm installation)

This article will describe the method to use SQL Server Management Studio Express to migrate the SQL data and the method to migrate using SQL Server will be similar.

 

SQL Server Management Studio Express is installed by running the setup program for either SQL Server Express with Advanced Services or SQL Server Express Toolkit.

To download SQL Server Management Studio Express: http://msdn2.microsoft.com/en-us/express/bb410791.aspx

For more information about managing SQL Server Express: http://www.microsoft.com/technet/prodtechnol/sql/2005/mgsqlexpwssmse.mspx

 

These are the sequence of steps to migrate data:

1.       Set the Standalone databases to be read-only so that no additional data can be added

a.       In Microsoft SQL Server Management Studio, right-click the name of the database that you want to set to read-only, and then click Properties.

b.      In the left pane, click Options.

c.       In the right pane, under Other options, under State, next to Database Read-Only, click the down arrow, and then select True.

2.       Use SQL Server Management Studio to connect to the Standalone server (note that the SQL Express instance name will be set by default to be OfficeServers) and perform a backup of these databases:

a.       Shared Services DB

b.      Shared Services Search DB

c.       Shared Services Content DB

d.      WSS Content DB

e.      Any additional content databases associated with new web applications created

3.       Restore these backups to the SQL Server associated with the Farm installation

 

For more information about migrating databases: http://technet2.microsoft.com/Office/en-us/library/d0a50e40-5322-4f7a-a3a4-c4660c8796661033.mspx?mfr=true

 

STSADM.exe Command Line Tool

 

The STSADM.exe admin tool is available in the default location: c:\program files\common files\microsoft shared\web server extensions\12\bin. To see what actions are available with the tool you can run STSADM.exe –help which will output the operations that can be performed and STSADM.exe –help <operation name> to get more detailed documentation about a particular operation.

For more information about the STSADM.exe command:

http://technet2.microsoft.com/Office/en-us/library/188f006d-aa66-4784-a65b-a31822aa13f71033.mspx

More details about STSADM.exe command-line operations and parameters:

http://www.microsoft.com/resources/documentation/wss/2/all/adminguide/en-us/stsk01.mspx?mfr=true

http://www.microsoft.com/resources/documentation/wss/2/all/adminguide/en-us/stsk02.mspx?mfr=true

 

STSADM.exe to Attach the Databases to the New Farm

 

The STSADM.exe admin tool will be used to attach the Standalone databases that have been restored to the Farm SQL Server so that the site content (including the Shared Services Provider) will be available on the new Farm installation.

 

Start and Configure the Required Services

 

Start the Windows SharePoint Services Search:

stsadm -o spsearch -action start -farmserviceaccount Redmond\user -farmservicepassword MyPassword

 

Start the Office SharePoint Server Search service:

stsadm -o osearch -action start -role IndexQuery -farmserviceaccount Redmond\user -farmservicepassword MyPassword -farmcontactemail user@ms.com

 

Create and Attach the Shared Services Provider Content

 

Create the web application and associate the Shared Services Content database from the Standalone installation by first creating a web application for the Shared Services Provider and specifying the content database that was restored.

 

For example:

stsadm.exe -o extendvs -url http://intranet:8080 -ownerlogin redmond\user -owneremail

 a@b.com -exclusivelyusentlm -databaseserver SQLServer -databasename SharedServices1_Content -apcreatenew -apidname SSP_Apppool -apidtype configurableid -apidlogin redmond\user -apidpwd MyPassword

 

Note that the databasename parameter is the Shared Services Content database that was restored from the Standalone installation.

 

The Standalone installation will use the default web application for the MySite host. When migrating to a Farm installation it is recommended that the MySite host resides on a separate web application than the root top-level site collection web application.

 

TODO: Note that we need a way to extract the MySite data created on the WSS_Content database and move this to a separate content database. A new web application will be created and this will serve as the MySite host.

 

To create the SSP we use the restoressp command with the sspdatabasename and searchdatabasename parameters set as the databases that were restored from the Standalone installation.

 

For example:

STSADM.EXE -o restoressp -title Migrated_SSP -url http://intranet:8080 -ssplogin redmond\user -ssppassword MyPassword -mysiteurl http://intranet/MySite -indexserver intranet -indexlocation "D:\Program Files\Microsoft Office Servers\12.0\Data\Applications" -sspdatabaseserver intranet -sspdatabasename SharedServices1 -searchdatabaseserver intranet -searchdatabasename SharedServices1_Search

 

Again note that the sspdatabasename and searchdatabasename parameters are the databases that were restored as these will now be attached to the Shared Services Provider for the Farm installation.

 

Content Database Attach for Sites

 

Finally, we will do the same step for any other sites that were created on the Standalone installation.

 

For example to restore the top-level site collection that also contains the MySite content:

STSADM.EXE -o extendvs -url http://intranet -ownerlogin redmond\user -owneremail user@ms.com -exclusivelyusentlm -databaseserver intranet -databasename WSS_Content -apcreatenew -apidname SharePoint_80_AppPool -apidtype configurableid -apidlogin redmond\user -apidpwd MyPassword

As before the databasename parameter is the restored database from the Standalone installation that will now be attached to the top-level site.

 

 

Posted by chrishe | 9 Comments
Filed under: ,

MOSS Command-Line Installation

Introduction

This document is written to meet the requirements of information technology (IT) professionals who will be responsible for the installation of Office SharePoint Server. This document will cover the procedures and recommendations for installing MOSS via the command line. This will include describing how to install the product by running Setup.exe from the command line and passing in a Config.xml file that can be customized further based on the installation options required. As well as how to use the admin tools PSConfig.exe and STSADM.exe to perform actions via the command line such as configuration and site creation.

Before you begin deployment

This section provides information about actions that you must perform before you begin deployment.

·         Plan for security roles (Office SharePoint Server) gives an overview of the three-tier security model.

·         Plan for administrative and service accounts (Office SharePoint Server) gives detailed information.

·         Office SharePoint Server Security Account Requirements is a planning tool that lists accounts to use in various scenarios, including three flavors of least-privilege administration (domain user accounts, SQL authentication, and domain user accounts connecting to pre-created databases).

 

Overview of the deployment process

The deployment process consists of two phases: installing and configuring the server, and creating the Shared Services Provider and Site Collections.

Phase 1: Installing and configuring the server

1.       Install MOSS by running Setup.exe with the appropriate Config.xml file.

2.       Configure it and create the administration Web application by running PSConfig.exe with the appropriate options.

 

Phase2: Creating and configuring the shared services providers and site collections

 

3.       Create a Shared Services Provider by running STSADM.exe operation (for farm installation).

4.       Create a site collection by running STSADM.exe operation (for farm installation).

 

For a Standalone install only the above first two steps are required and after running psconfig.exe installation will be complete with the Standalone config. For a Farm install, additional command line options will be required when running psconfig.exe and additional steps using stsadm.exe will be needed to complete the Farm installation.

Prerequisites

1.       Windows Server 2003 SP1

2.       Configure IIS with ASP.Net enabled

3.       .NET Framework 2.0 with Web Service Extensions enabled

4.       Windows Workflow Foundations installed

5.       SQL Server 2000 SP3 or SQL Server 2005 SP1 (for Farm configuration)

 

Permissions

To perform installation the user account running setup will need to be a member of the local Administrators group and have rights on the SQL server for the following actions:

·         Creating new databases

·         Read and write permissions

This translates into the dbcreator and securityadmin SQL server roles for the user account.

For more information about the SQL Server rights required refer to this document: http://technet2.microsoft.com/Office/en-us/library/f07768d4-ca37-447a-a056-1a67d93ef5401033.mspx?mfr=true

 

Setup.exe and Config.xml for Installation

Running setup can either be done in full UI mode by double-clicking on the setup.exe file or in silent mode by running the setup.exe via the command line and passing in a Config.xml file. Within the product DVD are contained examples of Config.xml files that can be used. The Config.xml file along with Setup.exe can be used for the controlling how Microsoft Office SharePoint Server will be installed.

 

The product DVD contains examples of Config.xml files that you can use as starting points for customizing your installation. The example files are stored under the \Files folder at the root of the DVD, in folders that correspond to different scenarios. The folders are:

Setup - Contains a config.xml file for use in setting up a clean installation for a single server (stand-alone, with SQL Express).

SetupFarm - Contains a config.xml file for use in setting up a clean installation for a server farm.

SetupFarmSidebySide - Contains a config.xml file for use in upgrading an existing server farm gradually.

SetupFarmSilent -  Contains a config.xml file for use in setting up a server farm in silent mode.

SetupFarmUpgrade -  Contains a config.xml file for use in upgrading an existing server farm in place.

SetupSilent -  Contains a config.xml file for use in setting up a clean installation for a single server (stand-alone, with SQL Express) in silent mode.

SetupSingleUpgrade - Contains a config.xml file for use in upgrading an existing single server (stand-alone) in place.

To see more info about the Config.xml:

http://technet2.microsoft.com/Office/en-us/library/003e5316-1018-4949-ac54-42fa12c5e51e1033.mspx

 

We will examine using the SetupSilent\Config.xml to set up a clean installation for a single standalone server in silent mode and the SetupFarmSilent\Config.xml to set up a server farm in silent mode.

To run setup in silent mode via the command line you will run:

(for a Standalone install)

setup.exe /config Files\SetupSilent\config.xml

OR

(for a Farm install)

setup.exe /config Files\SetupFarmSilent\config.xml

Here is an example of the Config.xml file:

<Configuration>

                <Package Id="sts">

                                <Setting Id="LAUNCHEDFROMSETUPSTS" Value="Yes"/>

                                <Setting Id="REBOOT" Value="ReallySuppress"/>

                                <Setting Id="SETUPTYPE" Value="CLEAN_INSTALL"/>

                </Package>

 

                <Package Id="spswfe">

                                <Setting Id="SETUPCALLED" Value="1"/>

                                <Setting Id="REBOOT" Value="ReallySuppress"/>

                                <Setting Id="OFFICESERVERPREMIUM" Value="1" />

                </Package>

 

                <Logging Type="verbose" Path="%temp%" Template="Office Server Setup(*).log"/>

                <Display Level="none" CompletionNotice="no" />

                <PIDKEY Value="Enter PID Key Here" />

                <Setting Id="SERVERROLE" Value="SINGLESERVER"/>

                <Setting Id="USINGUIINSTALLMODE" Value="0"/>

</Configuration>

 

Note that you will need to bypass the prompt for the product key by providing it in the config.xml value:

<PIDKEY Value="Enter PID Key Here" />

 

Also note the logging path for the log file to view if you encounter a failed installation:

<Logging Type="verbose" Path="%temp%" Template="Office Server Setup(*).log"/>

 

To see the complete list of options for Setup.exe:

http://technet2.microsoft.com/Office/en-us/library/7e45c7b1-de7f-4f8f-81cd-7070ce483a821033.mspx

 

PSConfig.exe for Configuration

The PSConfig.exe command line tool is used to configure the product after setup has completed. The default location of the tool: c:\program files\common files\microsoft shared\web server extensions\12\bin.

After setup has completed, you can run PSConfig to perform the configuration setup based on installation mode. If SharePoint is installed in Standalone mode then the Standalone configuration will be performed by running the setup command. If SharePoint is installed in Farm mode there are a series of PSConfig.exe commands that will need to be run to complete configuration.

 

Standalone Install:

Running PSConfig.exe with the setup command will complete installation on a Standalone install. The Standalone install will be complete with web applications and site collections for a SharePoint Server install.

PSConfig.exe  –cmd setup

The output will be displayed on the command window and when finished will result in a completed Standalone installation.

 

Farm Install:

To create a new server farm or connect to an existing server farm the following steps will need to be run in the following order:

1.       Create the ConfigDB:

PSConfig.exe -cmd configdb -create -server <Server_name> -database <Database_name>

-dbuser <DOMAIN\username> -dbpassword <password>

-user <DOMAIN\username> -password <password>

-addomain <domain_name> -adorgunit <org_unit>

-admincontentdatabase <Database_name>

Note that if you wish to connect to an existing configuration database and join the server to an existing server farm you will need to perform the ConfigDB command with the -connect parameter

Sample Output:

Performing configuration task 1 of 3

Initializing SharePoint Products and Technologies configuration...

 

Successfully initialized the SharePoint Products and Technologies configuration.

 

Performing configuration task 2 of 3

Creating the configuration database...

 

Successfully created the configuration database.

 

Performing configuration task 3 of 3

Finalizing the SharePoint Products and Technologies configuration...

 

Successfully completed the SharePoint Products and Technologies configuration.

 

Total number of configuration settings run: 3

Total number of successful configuration settings: 3

Total number of unsuccessful configuration settings: 0

Successfully stopped the configuration of SharePoint Products and Technologies.

Configuration of the SharePoint Products and Technologies has succeeded.

 

2.       Install all HelpCollections

psconfig.exe -cmd helpcollections installall

 

Sample Output:

Performing configuration task 1 of 3

Initializing SharePoint Products and Technologies configuration...

 

Successfully initialized the SharePoint Products and Technologies configuration

 

Performing configuration task 2 of 3

Installing help collections...

 

Successfully installed help collections.

 

Performing configuration task 3 of 3

Finalizing the SharePoint Products and Technologies configuration...

 

Successfully completed the SharePoint Products and Technologies configuration.

 

Total number of configuration settings run: 3

Total number of successful configuration settings: 3

Total number of unsuccessful configuration settings: 0

Successfully stopped the configuration of SharePoint Products and Technologies.

Configuration of the SharePoint Products and Technologies has succeeded.

 

3.       Perform resource security enforcement

psconfig.exe -cmd secureresources

 

Sample Output:

Performing configuration task 1 of 3

Initializing SharePoint Products and Technologies configuration...

 

Successfully initialized the SharePoint Products and Technologies configuration.

 

 

Performing configuration task 2 of 3

Securing the SharePoint resources...

 

Successfully secured resource 'HKEY_LOCAL_MACHINE\Software\Microsoft\Office Serv

er\12.0\LoadBalancerSettings' of type 'RegKey' by granting security group 'Local

Service' 'Read' permissions .

 

Successfully secured resource 'D:\Program Files\Microsoft Office Servers\12.0\We

bServices\Root' of type 'Directory' by granting security group 'Users' 'Read, Ex

ecute' permissions .

 

Successfully secured the SharePoint resources.

 

Performing configuration task 3 of 3

Finalizing the SharePoint Products and Technologies configuration...

 

Successfully completed the SharePoint Products and Technologies configuration.

 

Total number of configuration settings run: 3

Total number of successful configuration settings: 3

Total number of unsuccessful configuration settings: 0

Successfully stopped the configuration of SharePoint Products and Technologies.

Configuration of the SharePoint Products and Technologies has succeeded.

 

4.       Register the services in the server farm

psconfig.exe -cmd services -install

 

Sample Output:

Performing configuration task 1 of 3

Initializing SharePoint Products and Technologies configuration...

 

Successfully initialized the SharePoint Products and Technologies configuration.

 

Performing configuration task 2 of 3

Registering SharePoint services...

 

Successfully installed service: Excel Calculation Services.

Successfully installed service instance: Excel Calculation Services.

Successfully installed service: Forms Service.

Successfully installed service: Office SharePoint Usage Analytics Service.

Successfully installed service instance: Office SharePoint Usage Analytics Service.

Successfully installed service: Business Data Catalog.

Successfully installed service instance: Business Data Catalog.

Successfully installed service: Office SharePoint Server Diagnostics Service.

Successfully installed service: Shared Services Timer.

Successfully installed service instance: Shared Services Timer.

Successfully installed service: SSP Job Control Service.

Successfully installed service instance: SSP Job Control Service.

Successfully installed service: Session State Service.

Successfully installed service instance: Session State.

Successfully installed service: User Profile Service.

Successfully installed service: Document Conversions Launcher Service.

Successfully installed service instance: Document Conversions Launcher Service.

Successfully installed service: Document Conversions Load Balancer Service.

Successfully installed service instance: Document Conversions Load Balancer Service.

Successfully installed service: Office SharePoint Server Search Admin Web Service.

Successfully installed service instance: Office SharePoint Server Search Admin Web Service.

Successfully installed service: Office SharePoint Server Search.

Successfully installed service instance: Office SharePoint Server Search.

Successfully installed service instance: Office SharePoint Server Search.

Successfully installed service: Windows SharePoint Diagnostics Service.

Successfully installed service: Portal Service.

Successfully installed service instance: Portal Service.

Successfully installed service: Single Sign-on Service.

Successfully installed service instance: Single Sign-on Service.

Successfully installed service: Windows SharePoint Services Help Search.

Successfully installed service instance: Windows SharePoint Services Help Search

Successfully installed service instance: Windows SharePoint Services Search.

Successfully registered SharePoint services.

 

Performing configuration task 3 of 3

Finalizing the SharePoint Products and Technologies configuration...

 

Successfully completed the SharePoint Products and Technologies configuration.

 

Total number of configuration settings run: 3

Total number of successful configuration settings: 3

Total number of unsuccessful configuration settings: 0

Successfully stopped the configuration of SharePoint Products and Technologies.

Configuration of the SharePoint Products and Technologies has succeeded.

 

Note that before you can provision we will need to start and configure the Search service via the STSADM.exe command (more information about STSADM.exe later on):

 

Start the Windows SharePoint Services Search:

stsadm -o spsearch -action start -farmserviceaccount Redmond\user -farmservicepassword MyPassword

 

Start the Office SharePoint Server Search service:

stsadm -o osearch -action start -role IndexQuery -farmserviceaccount Redmond\user -farmservicepassword MyPassword -farmcontactemail user@ms.com

 

psconfig.exe -cmd services –provision

 

5.       Register all features

psconfig.exe -cmd installfeatures

Sample Output:

Performing configuration task 1 of 3

Initializing SharePoint Products and Technologies configuration...

 

Successfully initialized the SharePoint Products and Technologies configuration.

 

Performing configuration task 2 of 3

Registering SharePoint features...

Successfully installed feature D:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Template\Features\FeaturePushdown\Feature.xml.

Successfully installed feature D:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Template\Features\FeaturePushdownTask\Feature.xml.

Successfully installed feature D:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Template\Features\GlobalWebParts\Feature.xml.

Successfully installed feature D:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Template\Features\GradualUpgrade\Feature.xml.

Successfully registered SharePoint features.

 

Performing configuration task 3 of 3

Finalizing the SharePoint Products and Technologies configuration...

 

Successfully completed the SharePoint Products and Technologies configuration.

 

Total number of configuration settings run: 3

Total number of successful configuration settings: 3

Total number of unsuccessful configuration settings: 0

Successfully stopped the configuration of SharePoint Products and Technologies.

Configuration of the SharePoint Products and Technologies has succeeded.

 

6.       Provision the SharePoint Central Administration Web application

psconfig.exe -cmd adminvs -provision -port <port> -windowsauthprovider onlyusentlm

 

Sample Output:

Performing configuration task 1 of 3

Initializing SharePoint Products and Technologies configuration...

 

Successfully initialized the SharePoint Products and Technologies configuration.

 

Performing configuration task 2 of 3

Provisioning the SharePoint Central Administration Web Application...

The SharePoint Central Administration Web Application has been provisioned at http://<SERVER>:<PORT>

 

Successfully provisioned the SharePoint Central Administration Web Application.

Performing configuration task 3 of 3

Finalizing the SharePoint Products and Technologies configuration...

 

Successfully completed the SharePoint Products and Technologies configuration.

 

Total number of configuration settings run: 3

Total number of successful configuration settings: 3

Total number of unsuccessful configuration settings: 0

Successfully stopped the configuration of SharePoint Products and Technologies.

Configuration of the SharePoint Products and Technologies has succeeded.

 

 

7.       Install shared application data

psconfig.exe -cmd applicationcontent –install

 

Sample Output:

Performing configuration task 1 of 3

Initializing SharePoint Products and Technologies configuration...

 

Successfully initialized the SharePoint Products and Technologies configuration.

 

Performing configuration task 2 of 3

Installing the application content files...

 

Installing the SharePoint Central Administration Web Application content files..

Installing the SharePoint Web Application content files...

Successfully installed the application content files.

 

Performing configuration task 3 of 3

Finalizing the SharePoint Products and Technologies configuration...

 

Successfully completed the SharePoint Products and Technologies configuration.

 

Total number of configuration settings run: 3

Total number of successful configuration settings: 3

Total number of unsuccessful configuration settings: 0

Successfully stopped the configuration of SharePoint Products and Technologies.

Configuration of the SharePoint Products and Technologies has succeeded.

 

 

For more information about the PSConfig.exe command:

http://technet2.microsoft.com/Office/en-us/library/a59c4e8f-9b7f-4127-8199-1b9ab76991501033.mspx

 

At this point you will have successfully created the Central Administration site. If you have set up as Standalone, you now have a working MOSS installation.

If you have installed as a Farm install, we will use the STSADM.exe command line tool to complete creation of the Shared Services Provider (SSP) and site collection.

 

STSADM.exe Command Line Tool

The STSADM.exe admin tool is available in the default location on the same drive as where the SharePoint Products and Technologies are installed under %Common Program Files%\microsoft shared\web server extensions\12\bin. To see what actions are available with the tool you can run STSADM.exe –help which will output the operations that can be performed and STSADM.exe –help <operation name> to get more detailed documentation about a particular operation.

For more information about the STSADM.exe command:

http://technet2.microsoft.com/Office/en-us/library/188f006d-aa66-4784-a65b-a31822aa13f71033.mspx

More details about STSADM.exe command-line operations and parameters:

http://www.microsoft.com/resources/documentation/wss/2/all/adminguide/en-us/stsk01.mspx?mfr=true

http://www.microsoft.com/resources/documentation/wss/2/all/adminguide/en-us/stsk02.mspx?mfr=true

Shared Services Provider (SSP) Creation

The recommended procedure for creating an SSP is to create a web application for the MySite host and a separate web application for the SSP. To create a new web application for both the MySite host and SSP run this STSADM.exe command for each new web application:

stsadm.exe -o extendvs -url <URL> -ownerlogin <domain/username> -owneremail <emailed> -exclusivelyusentlm -databaseserver <DBservername> -databasename <NewcontentDBname> -donotcreatesite -apcreatenew -apidname <Apppoolname> -apidtype configurableid -apidlogin <domain/username> -apidpwd <Password>

The extendvs operation is used to create the web application and the donotcreatesite parameter is used since we do not want to create a site when we extend the virtual server for the SSP and MySite web applications being created.

The apidtype parameter is used to set the identity type to use for the application pool:

[-apidtype <configurableid/NetworkService/LocalService/LocalSystem>]

 

For example:

stsadm.exe -o extendvs -url http://intranet:8080 -ownerlogin Redmond\username -owneremail user@ms.com -exclusivelyusentlm -databaseserver SQLServer -databasename SSPContentDB -donotcreatesite -apcreatenew -apidname SSPAppPool -apidtype configurableid -apidlogin Redmond\username -apidpwd MyPassword

creates a web application with the URL http://intranet:8080 that can be used to host the SSP. Similarly, you can create another web application to host the MySite sites:

stsadm.exe -o extendvs -url http://intranet:8090 -ownerlogin Redmond\username -owneremail user@ms.com -exclusivelyusentlm -databaseserver SQLServer -databasename MySiteContentDB -donotcreatesite -apcreatenew -apidname MySiteAppPool -apidtype configurableid -apidlogin Redmond\username -apidpwd MyPassword

 

At this point, you can create the SSP by running this STSADM.exe command and providing the SSP Web Application URL and MySite web application URL:

stsadm.exe –o createssp –title <SSP name> -url <Web application url> -mysiteurl <MySite Web application url> -ssplogin <username> -ssppassword <password> -sspdatabaseserver <SSP database server> -sspdatabasename <SSP database name> -indexserver <index server> -indexlocation <index file path>

 

For example:

STSADM.EXE -o createssp -title MySSP1 -url http://intranet:8080 -mysiteurl http://intranet:8090 -ssplogin Redmond\username -ssppassword MyPassword -sspdatabaseserver SQLServer -sspdatabasename MySSP1_db –indexserver MyServer -indexlocation "D:\Program Files\Microsoft Office Servers\12.0\Data\Office Server\Applications"

 

Portal Site Creation

The creation of the top-level site is accomplished by again extending the virtual server but this time we will create the site using the appropriate site template. This is done via the STSADM.exe with the extendvs operation.

 

For example:

STSADM.EXE -o extendvs -url http://intranet -ownerlogin Redmond\user –owneremail user@ms.com -exclusivelyusentlm -sitetemplate SPSPORTAL -apidname "SharePoint AppPool" -apidtype configurableid -apidlogin Redmond\user -apidpwd MyPassword

If you do not specify the template to use, the owner can choose the template when he or she first browses to the site.

From: http://blogs.msdn.com/dwinter/archive/2006/07/07/659613.aspx:

    0 - GLOBAL (SetupPath=global) - "Global template"
    1 - STS - "windows SharePoint Services Site", "Team Site", "Blank Site", "Document Workspace"
    2 - MPS - "Basic Meeting Workspace", "Blank Meeting Workspace", "Decision Meeting Workspace", "Social Meeting Workspace", "Multipage Meeting Workspace"
    3 - CENTRALADMIN - "Central Admin Site"
    4 - WIKI - "Wiki Site"
    7 - BDR - "Document Center"
    9 - BLOG - "Blog"
   20 - SPS (OBSOLETE) - "SharePoint Portal Server Site"
   21 - SPSPERS - "SharePoint Portal Server Personal Space"
   22 - SPSMSITE - "Personalization Site"
   30 - SPSTOC (OBSOLETE) - "Contents area Template"
   31 - SPSTOPIC (OBSOLETE) - "Topic area template"
   32 - SPSNEWS (OBSOLETE) - "News area template"
   33 - SPSNHOME (SubWebOnly) - "News Home template"
   34 - SPSSITES - "Site Directory area template"
   36 - SPSCOMMU (OBSOLETE) - "Community area template"
   38 - SPSREPORTCENTER - "Report Center Site"
   39 - CMSPUBLISHING (SetupPath=SiteTemplates\PUBLISHING) - "Publishing and Team Collaboration Site"
   40 - OSRV (SetupPath=SiteTemplates\OSRV) - "Shared Services Administration Site"
   47 - SPSPORTAL - "Corporate Intranet Site"
   50 - SRCHCEN - "Search Center"
   51 - PROFILES - "Profiles"
   52 - BLANKINTERNETCONTAINER - "Internet Presence Web Site"
   53 - BLANKINTERNET - "Publishing Site", "Press Releases Site", "Publishing Site"
   54 - SPSMSITEHOST - "My Site Host"
   90 - SRCHCENTERLITE (SetupPath=SiteTemplates\SRCHCENTERLITE) - "Search Center Lite"
 6221 - PWA (SetupPath=SiteTemplates\PWA) - "Project Web Access Site"
 6215 - PWS (SetupPath=SiteTemplates\PWS) - "Project Workspace"
14483 - OFFILE - "Records Repository", "Records Repository"

Note that the extendvs operation also allows for specifying the language of the new site collection with the locale ID (lcid) parameter. If you do not specify a locale ID, the language of the server is used for the default top-level web site.

List of Locale ID (LCID) Values: http://www.microsoft.com/globaldev/reference/lcid-all.mspx
Posted by chrishe | 2 Comments
Filed under: ,

Database Attach Shared Services Provider (SSP)

Performing a database attach using STSADM.exe is useful for migrating or upgrading existing data. Here is an example of how to use the STSADM.exe commands to be able to perform a db attach for the Shared Services Provider (SSP):

Create the web application and associate the Shared Services Content database with the restored database by first creating a web application for the Shared Services Provider and specifying the content database that was restored.

 

For example:

stsadm.exe -o extendvs -url http://intranet:8080 -ownerlogin redmond\user -owneremail

 a@b.com -exclusivelyusentlm -databaseserver SQLServer -databasename SharedServices1_Content -apcreatenew -apidname SSP_Apppool -apidtype configurableid -apidlogin redmond\user -apidpwd MyPassword

 

Note that the databasename parameter is the Shared Services Content database that was restored.

To create the SSP we use the restoressp command with the sspdatabasename and searchdatabasename parameters set as the databases that were restored.

 

For example:

STSADM.EXE -o restoressp -title Migrated_SSP -url http://intranet:8080 -ssplogin redmond\user -ssppassword MyPassword -mysiteurl http://intranet/MySite -indexserver intranet -indexlocation "D:\Program Files\Microsoft Office Servers\12.0\Data\Applications" -sspdatabaseserver intranet -sspdatabasename SharedServices1 -searchdatabaseserver intranet -searchdatabasename SharedServices1_Search

 

Again note that the sspdatabasename and searchdatabasename parameters are the databases that were restored as these will now be attached to the Shared Services Provider for the installation.

Posted by chrishe | 1 Comments

Simple Updates to Make Your MySite More Useful

The SharePoint Server MySite page is intended to be the default landing place for a user to see information that is useful to them. Unfortunately, the unmodified, out-of-box MySite page leaves some room for improvement to make it a more useful experience and a site that a user would want to have as their default home page. While there are updates using customization that can increase the usefulness of the page, here are some simple changes that can also update the MySite but don't require any custom code or even SharePoint Designer.

  1. Change the color theme for your MySite - under the Site Actions tab -> Site Settings -> Site Theme. (I like the Classic theme which has a nice yellow gradient and is a bit different from the default blue one but not too different).
  2. Remove web parts you won't use - you can easily click on the right corner arrow drop down and select Close for any web parts you won't use (such as the Get Started with My Site info web part)
  3. Edit Your Profile -  adding profile information takes only a couple of minutes to complete but it will increase the useful of the site for you by making it more informative to others that view your profile
  4. My Links and the My Links web part - the My Links feature is on the top navigation menu and is another way to bookmark URLs on the SharePoint Server farm and if you make use of this feature you should add the web part which is already on your My Site Public Profile page 
  5. Add Outlook Web Access web parts - My Calendar web part is added by default but I find it useful to have the My Contacts and My Inbox added as well
  6. Add the Web Capture web part - using the web capture web part is a very easy way to synchronize data between the web part and some other content
  7. Add RSS Viewer web part - one of the cooler web parts are the RSS Viewer web parts that allow you to pull in all sorts of data. Here are some examples of RSS feed URLs that I have:
    1. Stock symbol RSS feed: http://tc.dk/stock.php?symbols=msft
    2. MSNBC.com top headlines: http://www.msnbc.msn.com/id/3032091/device/rss/
    3. Daily Dilbert: http://feeds.feedburner.com/tapestrydilbert
Posted by chrishe | 0 Comments

Using PSConfig.exe command-line options to complete SharePont Server Configuration

After SharePoint Server setup has completed, the admin may run the SharePoint Products and Technologies Configuration Wizard to complete the configuration steps, but there may be a need to run these steps via the command-line or to just to get a better understanding of what steps the wizard performs using PSConfig.exe:

For more information about the PSConfig.exe command:

http://technet2.microsoft.com/Office/en-us/library/a59c4e8f-9b7f-4127-8199-1b9ab76991501033.mspx

 

1.       Create the ConfigDB:

PSConfig.exe -cmd configdb -create -server <Server_name> -database <Database_name>

-dbuser <DOMAIN\username> -dbpassword <password>

-user <DOMAIN\username> -password <password>

-addomain <domain_name> -adorgunit <org_unit>

-admincontentdatabase <Database_name>

Note that if you wish to connect to an existing configuration database and join the server to an existing server farm you will need to perform the ConfigDB command with the -connect parameter 

2.       Install all HelpCollections

psconfig.exe -cmd helpcollections –installall 

3.       Perform resource security enforcement

psconfig.exe -cmd secureresources 

4.       Register the services in the server farm

psconfig.exe -cmd services -install 

Note that before you can provision we will need to start and configure the Search service via the STSADM.exe command:

 Start the Windows SharePoint Services Search:

stsadm -o spsearch -action start -farmserviceaccount Redmond\user -farmservicepassword MyPassword 

Start the Office SharePoint Server Search service:

stsadm -o osearch -action start -role IndexQuery -farmserviceaccount Redmond\user -farmservicepassword MyPassword -farmcontactemail user@ms.com  

psconfig.exe -cmd services –provision 

5.       Register all features

psconfig.exe -cmd installfeatures 

6.       Provision the SharePoint Central Administration Web application

psconfig.exe -cmd adminvs -provision -port 9000 -windowsauthprovider onlyusentlm 

7.       Install shared application data

psconfig.exe -cmd applicationcontent -install

Increasing the frequency of the Profile and Membership Sync timer jobs

One of the new features in MOSS 2007 is the ability to synchronize WSS user data to SharePoint Server. One of the areas where this is synchronization is displayed is within the MySite SharePoint Sites web part which will display all sites that the user is a member of.

The default frequency of the synchronization job is every 1 hour but you can increase the frequency by running this STSADM.exe command:

stsadm.exe -o sync -synctiming M:15

which will result in the sync jobs occurring every 15 minutes.

 

Updating the SharePoint Admin Password on an existing Farm

The security policy for many IT departments within organizations requires that passwords be changed after a certain time period. This would require that the accounts associated with a SharePoint Server Farm install be updated.

Here are some steps to do this:

If you are fortunately enough to know the new password before the change has occurred you can:

  1. stsadm -o updatefarmcredentials -userlogin "domain user" -password "newPassword"
  2. iisreset
  3. stsadm -o updateaccountpassword -userlogin "domain user" -password "newpassword" -noadmin

To change the password after the change has been rolled out:

  1. Update all service accounts passwords for the SQL server if the service is running as a domain account
  2. Under the Internet Information Services (IIS) Manager update the password for each Application Pool by going to the properties and clicking on the Identity tab
  3. At this point you should be able to view the Central Admin Site, where you will update the password for the SSP Service credentials by either method:
    1. SharePoint Central Admin -> Click on the left nav Shared Services Administration link -> use the drop down on the SSP you need to change and click on Edit Properties -> Update the values for the SSP Service Credentials
    2. STSADM.exe -o editssp -title <SSP name> -ssplogin <username> -ssppassword <password>
  4. Update the Search Service credentials: Central Admin -> Operations -> Services on Server -> Office SharePoint Server Search -> update the credentials for the Service Account
  5. Profile Import credentials: SSP Admin -> User Profile and Properties -> Configure Profile Import -> Set the access account credentials
Posted by chrishe | 0 Comments
Filed under: , ,

Enumerating thru User Profiles

SharePoint Server allows user profile data to be imported from various sources such as the Active Directory, LDAP, and using a Business Data Catalog (BDC) connection to almost any data source that contains user info.

There may be a need to enumerate thru all the user profiles once the data has been imported and perform actions on each user profile.

Here is a simple code example that does this using an enumerator in C#:

 

SPSite site = new SPSite("http://localhost");

ServerContext context = ServerContext.GetContext(site);

UserProfileManager upm = new UserProfileManager(context);

UserProfile currentProfile;

IEnumerator enumProfs = upm.GetEnumerator();

bool continueEnum = true;

while (continueEnum)

{

try

{

continueEnum = enumProfs.MoveNext();

}

catch (Exception e)

{

Console.WriteLine("EXCEPTION in enum - try to move to next: " + e.ToString());

continueEnum = enumProfs.MoveNext();

}

 

currentProfile = (UserProfile)enumProfs.Current;

// do some action on each currentProfile

}

Note that I put the try/catch block to handle the scenario that as you are running the tool any profiles get modified since the import was performed. This would throw an exception and that can be handled any way perferred including what I've done which is simply to write the error to the console and continue.

Creating Audience Rules via the Object Model

SharePoint Server (MOSS) was designed as a platform for building applications upon. Using the SharePoint Server Object Model (OM) exposes many different and often more complicated operations than what can be done with the UI only.

An example of this is with Audience creation. Audiences are an organizational type concept that is associated with the Shared Service Provider (SSP). Audiences can be built up using rules that are exposed within the Admin UI for such properties as Account Name or Title. In this way you may be able to create audiences that comprise of user profiles that all have a property in common and can then use this compiled audience for such things as targeting content.

The Audience OM allows the creation of audiences that can be more complicated in their evaluation. For example, the Audience OM allows the groupings of audience rules which will result in compiled audiences based on a combination of AND/OR clauses.

                // Create thet test audience.
                this.testAudience  = this.audienceManager.Audiences.Create(
                    TestStringGenerator.GetString(MaxAudienceNameLength),
                    TestStringGenerator.GetString(
                        MaxAudienceDescriptionLength));
                this.testAudience.GroupOperation =
                    AudienceGroupOperation.AUDIENCE_OR_OPERATION;

                // Add the desired rule to the test audience.
                ArrayList audienceRules = new ArrayList();

                AudienceRuleComponent r1 = new AudienceRuleComponent("AccountName", "Contains", this.DLTestAccountName1);
                audienceRules.Add(r1);

                AudienceRuleComponent r2 = new AudienceRuleComponent(null, "OR", null);
                audienceRules.Add(r2);

                AudienceRuleComponent r3 = new AudienceRuleComponent("AccountName", "Contains", this.DLTestAccountName2);
                audienceRules.Add(r3);

                this.testAudience.AudienceRules = audienceRules;
                this.testAudience.Commit(); 

 

From the code above you can see that:

this.testAudience.GroupOperation =
                    AudienceGroupOperation.AUDIENCE_OR_OPERATION;

Sets the group operation for the audience similar to the Audience Admin UI where you can select

 

 

But with via OM you can specify groupings by using parentheses () with this:

new AudienceRuleComponent(null, "(", null);

<some audience rules>

new AudienceRuleComponent(null, ")", null);

so that now you can represent an expression like this:

(AccountName contains DLTestAccountName1 OR AccountName contains DLTestAccountName1)

AND

(Title contains TestTitle1 OR Title contains TestTitle2)

Posted by chrishe | 2 Comments

Creating Shared Service Provider (SSP) via command-line options

Using the SharePoint Admin UI there can often be quite a delay to perform administrative actions compared to doing the same actions via the powerful command-line tools. One of the tools that should be very familiar to SharePoint Admins is STSADM.exe. 

The STSADM.exe admin tool is available in the default location: c:\program files\common files\microsoft shared\web server extensions\12\bin. To see what actions are available with the tool you can run STSADM.exe –help which will output the operations that can be performed and STSADM.exe –help <operation name> to get more detailed documentation about a particular operation.

Creating the Shared Service Provider (SSP) is one admin task that can be done via the command-line:

The recommended procedure for creating an SSP is to create a web application for the MySite host and a separate web application for the SSP. To create a new web application for both the MySite host and SSP run this STSADM.exe command for each new web application:

stsadm.exe -o extendvs -url <URL> -ownerlogin <domain/username> -owneremail <emailed> -exclusivelyusentlm -databaseserver <DBservername> -databasename <NewcontentDBname> -donotcreatesite -apcreatenew -apidname <Apppoolname> -apidtype configurableid -apidlogin <domain/username> -apidpwd <Password>

For example:

stsadm.exe -o extendvs -url http://intranet:8080 -ownerlogin Redmond\username -owneremail user@ms.com -exclusivelyusentlm -databaseserver SQLServer -databasename MySiteContentDB -donotcreatesite -apcreatenew -apidname MySiteAppPool -apidtype configurableid -apidlogin Redmond\username -apidpwd MyPassword

will create a web application with the URL http://intranet:8080 that can be used to host the MySite sites. Similarly, you can create another web application to host the SSP:

stsadm.exe -o extendvs -url http://intranet:8090 -ownerlogin Redmond\username -owneremail user@ms.com -exclusivelyusentlm -databaseserver SQLServer -databasename SSPContentDB -donotcreatesite -apcreatenew -apidname SSPAppPool -apidtype configurableid -apidlogin Redmond\username -apidpwd MyPassword

At this point, you can create the SSP by running this STSADM.exe command:

stsadm.exe –o createssp –title <SSP name> -url <Web application url> -mysiteurl <MySite Web application url> -ssplogin <username> -indexserver <index server> -indexlocation <index file path> -ssppassword <password> -sspdatabaseserver <SSP database server> -sspdatabasename <SSP database name>

 

 

Posted by chrishe | 2 Comments
 
Page view tracker