« Design and Apply a SharePoint Database Naming Convention | Main | KB Alert: Prompted for Authentication accessing SharePoint Documents »
Sunday
27Dec2009

Manually create SharePoint Farm Databases with PSCONFIG

A SharePoint Farm installation utilizes a number of SQL databases. A normal MOSS 2007 installation requires a minimum of six databases including configuration, search, and administration web application content databases. Over time, as organizations add sites for user content, this list can grow to many more.

The standard approach to installing a new SharePoint Farm involves running the SharePoint Products and Technologies Configuration Wizard at the completion of a WSS or MOSS 2007 setup program. Among other things, the configuration wizard creates the farm configuration database , and the content database for the Central Administration web application.

Unfortunately, the default names are not very user-friendly, and this can cause problems with managing our SharePoint databases. Where these problems become most relevant is when hosting multiple SharePoint farms within a single instance of SQL Server, and when mixing SharePoint databases with other applications within the same instance. It can be difficult to differentiate the SharePoint databases between the various farm instances.

The solution to this problem is to use a command-line utility included with SharePoint called PSCONFIG.EXE to provision the initial farm configuration and administrative content databases manually.

Below is a list of the standard databases created during a MOSS 2007 farm installation using the default naming conventions and installation procedures:

Database Name Database Owner Created By
SharePoint_ConfigN Installation User Configuration Wizard
SharePoint_AdminContent_<Guid> Installation User Configuration Wizard
SharedServicesN_DB Farm Services Account Manual – Central Admin / SSP Config
SharedServicesN_Search_DB Farm Services Account Manual – Central Admin / SSP Config
WSS_Search_<ComputerName> Farm Services Account Manual – Central Admin / Farm Services
WSS_Content Farm Services Account Manual – Central Admin / SSP Config

 

From the above example, we can note some inconsistencies and a few potential problems with the default installation and database naming:

  • Two databases are created by the Configuration Wizard using system-generated names. The Configuration Wizard does not provide a user interface where the names for these databases can be specified.
  • The default uniqueness strategy is inconsistent. In some cases, an incremental numeric identifier is used, but for the administration website, a Globally Unique Identifier is generated.
  • The two databases created by the Configuration Wizard are assigned the computer account of the user running the installation. In contrast, all other farm databases created from Central Administration will utilize the Farm Services account that is configured as the Central Administration IIS Application Pool account.

PSCONFIG.EXE allows manually creating the initial farm configuration and central administration content databases, and then provisioning the farm with those databases. PSCONFIG also allows us to resolve the database owner consistency by specifying the Farm Services account as the database owner.

The following is the procedure for manually provisioning your initial farm databases:

  1. Using SQL Management Studio, connect to the SQL Server instance you will be using to host your farm databases.
  2. Add the SharePoint Farm Services account as an Integrated Login account.
  3. Create a new Farm Configuration database, and Central Administration content database. Specify the database owner as the Farm Services Account, and under Options, specify the LATIN1_General_CI_AS_KS_WS collation sequence. NOTE: If you don’t specify the correct collation sequence for both databases, PSCONFIG.EXE will generate an error when attempting to create the farm.
  4. Run Setup on a SharePoint Web Front End that you want to use to also host Central Administration. This computer will automatically be added as a server in the new SharePoint Farm. Do not run the SharePoint Products and Technologies Configuration Wizard after completed Setup. A checkbox will appear on the Setup Finish screen. Uncheck the checkbox.
  5. Open an command prompt (with Administrative Privileges if using UAC). Run PSCONFIG.EXE (which can be found at C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Bin).

    Psconfig –cmd configdb –create –server <SQL Server Name>
    –database <SQL Database Name> –user <Domain Name\User Name>
    –password <password> –admincontentdatabase <SQL Admin Content Database Name>
  6. Finish the initial farm configuration by running the SharePoint Products and Technologies Configuration Wizard. Following completion of the wizard, you will be able to access the Central Administration website to complete additional configuration steps.

In combination with this procedure, I strongly recommend you reference my blog post on how to Design and Apply a SharePoint Database Naming Convention to enjoy even greater consistency and manageability to your SharePoint installations.

Additional Information

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>