Deploy by using DBA-created databases (SharePoint Server 2010)

 

Applies to: SharePoint Server 2010, SharePoint Foundation 2010

This article describes how to deploy Microsoft SharePoint Server 2010 in a farm environment that uses DBA-created databases. In organizations where database administrators (DBAs) operate independently from SharePoint administrators, the DBAs create and manage all the databases. This is typical in IT environments where security requirements and company policies require a separation of administrator roles. The farm administrator provides Microsoft SharePoint Server 2010 database requirements to the database administrator, who in turn, creates the necessary Microsoft SharePoint Server databases and sets up the logins that are required for the farm.

In this article:

Before you begin

Before you start this deployment, ensure that you have all the information that you require in order to successfully deploy and configure SharePoint Server on all of the farm servers. The following sections provide the information that you will need to ensure a successful SharePoint Server deployment.

Farm server requirements

Ensure that all the farm servers and the database server meet the requirements that are documented in the following articles.

Database requirements

Deploying SharePoint Server 2010 on DBA-created databases involves working with the DBA to ensure that all the SharePoint Server databases that you need are created and correctly configured before you create and configure the farm.

The following list shows some, but not necessarily all, of the information that a DBA needs in order to create databases for the farm. Additional information may be required by the DBA in your organization:

  • SQL Server version information as well as service pack and cumulative update level. For more information, see Hardware and software requirements (SharePoint Server 2010).

  • The required login accounts with associated roles and permissions. For more information, see Initial deployment administrative and service accounts (SharePoint Server 2010).

  • The number of databases that are required as well as SharePoint configuration specifics. This information can be obtained by deploying SharePoint Server.

  • SharePoint data storage requirements, such as data type, data volume, type of database activity (read or write) and Input/Output operations per second (IOPS).

  • The DBA must configure surface area settings so that local and remote connections use TCP/IP or named pipes.

  • All of the databases required by SharePoint Server use the Latin1_General_CI_AS_KS_WS collation.

  • All of the SharePoint Server databases require that the farm Setup user account is assigned to them as the database owner (dbo).

  • SharePoint user Service Level Agreement considerations.

About configuring DBA-created databases

Use the procedures in this article as a guide for deploying a farm that uses DBA-created databases. This deployment includes all the databases that are required for the farm.

Note

This article only applies to the SQL Server database versions supported by SharePoint Server 2010.

For each procedure you must use Windows PowerShell 2.0 or SharePoint Server command-line tools to configure the farm.

We recommend that you use Windows PowerShell when performing command-line administrative tasks. The Stsadm command-line tool has been deprecated, but is included to support compatibility with previous product versions.

Note

Psconfig is located in the following folder: Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN.

In order to use Windows PowerShell to configure the farm:

  1. Verify that the user account has access to one of the servers on which Windows PowerShell 2.0 is running, and that the user account is a Farm Administrator and is a member of the SharePoint_Shell_Access role for the SQL Server-based source content database, the administration content database, the destination content database, and the configuration database.

  2. On the Start menu, click All Programs.

  3. Click Microsoft SharePoint 2010 Products.

  4. Click SharePoint 2010 Management Shell.

  5. At the Windows PowerShell prompt, type the appropriate command, and then press ENTER.

For the purpose of illustrating the required procedures, the basic farm that needs to be configured consists of:

  1. Central Administration

  2. A Web portal

  3. Diagnostic logging and usage and health data collection

  4. Enterprise search

The following databases are required and are typically used by the farm administrator in the following sequence as the farm is created. The databases in the following list use the default names that are provided when you use the SharePoint Products Configuration Wizard to set up a farm. You can, of course, use database names that you choose.

  • The configuration database (SharePoint_Config)

  • The Central Administration content database (SharePoint_AdminContent_GUID)

  • The Web site content database, which is created automatically by the SharePoint Server Setup program (WSS_Content_GUID)

  • The diagnostic logging database (WSS_Logging_GUID)

  • Databases for the SharePoint Server search service application that is required for enterprise search. For more information, see Service application and service management (SharePoint Foundation 2010)Service application and service management (SharePoint Server 2010).

    • The search crawl database (Search_Service_1_CrawlStoreDB_GUID

    • The search administration database (Search_Service_1_DB_GUID)

    • The search property database (Search_Service_1_PropertyStoreDB_GUID

Create and configure databases for Central Administration

Use the procedures in this section to create the required databases and give the accounts membership in the database Users security group and database roles.

The procedures require action by the DBA and the Setup user account. The labels [DBA] or [Setup] respectively are used for each step to indicate which role performs the action.

The following procedure only has to be performed once for the farm, on the server that you want to run the Central Administration Web site. The farm has one configuration database and one content database for Central Administration.

To create and configure the configuration database, the Central Administration content database, and the Central Administration Web application

  1. [DBA] Create the configuration database and the Central Administration content database using the LATIN1_General_CI_AS_KS_WS collation sequence and set the database owner (dbo) to be the Setup user account.

  2. [Setup] Run Setup on each server computer in the farm. You must run Setup on at least one of these computers by using the Complete installation option. The steps for this option are described in Deploy a single server with SQL Server (SharePoint Server 2010).

  3. [Setup] Do not run the SharePoint Products Configuration Wizard after Setup finishes.

    From the SharePoint 2010 Management Shell, use the New-SPConfigurationDatabase command to create a new configuration database, for example:

    New-SPConfigurationDatabase -DatabaseName "SharePointConfigDB1" -DatabaseServer "SQL-01" -Passphrase (ConvertTo-SecureString "MyPassword" -AsPlainText -force) -FarmCredentials (Get-Credential)
    

    For more information, see New-SPConfigurationDatabase.

  4. [Setup] After the command has finished, run the SharePoint Products Configuration Wizard and complete the rest of the configuration for the server. This creates the Central Administration Web application and performs other setup and configuration tasks.

  5. [DBA] After the SharePoint Products Configuration Wizard has finished, perform the following actions for both the configuration database and the Central Administration content database:

    • Add the SharePoint Server search account, default content access account, and the services account to the Users group.

    • Add the SharePoint Server search service account, default content access account, and the services account to the WSS_Content_Application_Pools role.

  6. [Setup] To confirm that the databases were created and configured correctly, verify that the home page of the Central Administration Web site can be accessed. However, do not configure anything by using Central Administration at this point. If the Central Administration page does not render, verify the accounts that are used in this procedure and ensure that they are properly assigned.

The rest of the farm servers will be configured after the procedures in the article are finished and the farm is established. You will run the SharePoint Products Configuration Wizard on these servers by selecting the Yes, I want to connect to an existing server farm option, instead of by using the commands that are used in this procedure.

The following procedure will only have to be performed once for the farm. The farm has only one SharePoint Foundation search database.

Create and configure the SharePoint Foundation search database and start the search service

  1. [DBA] Create the SharePoint Foundation search database using the LATIN1_General_CI_AS_KS_WS collation sequence and set the database owner (dbo) to be the Setup user account.

  2. [Setup] Open the command line, and then use the Get-SPSearchService, Set-SPSearchService, Get-SPSearchServiceInstance, and Set-SPSearchServiceInstance cmdlets to configure the database and start the search service. Use the following example as a guide.

    $searchService = Get-SPSearchService 
    Set-SPSearchService -MaxBackupDuration 120 
    Get-SPSearchServiceInstance -Local
    Get-SPSearchServiceInstance -Local | Set-SPSearchServiceInstance -ProxyType proxy
    

    For more information, see the following topics:

Create and configure additional databases

After you finish configuring the databases required for Central administration, complete your farm deployment by creating and configuring the databases that are required for Web content and any service applications that you want to use.

The following procedure will have to be performed once for each portal site in the farm.

The procedures described here are used for the following SharePoint Server 2010 operations:

  • Start the search service on servers that are hosting search query components or search crawl components. For more information, see Manage search topology (SharePoint Server 2010).

  • Create and configure the portal site Web application content database.

  • Create and configure the search service application databases.

The following procedure must be performed once for each server that runs search queries or database crawls in the farm.

To start the SharePoint Server Search service on each server that will run search queries or crawls

  1. [Setup] From the SharePoint 2010 Management Shell, use the Get-SPEnterpriseSearchService, Set- SPEnterpriseSearchService, and Get-SPEnterpriseSearchServiceInstance cmdlets. Use the following example as a guide.
        $searchService = Get-SPEnterpriseSearchService
        $password = Read-Host -AsSecureString
        **********
        Set-SPEnterpriseSearchService -IgnoreSSLWarnings $true -ServiceAccount contoso\adminAccount -ServicePassword $password
        $ssInstance = Get-SPEnterpriseSearchServiceInstance -Local
        Get-SPEnterpriseSearchServiceInstance -Local | Start-SPEnterpriseSearchServiceInstance

For more information, see the following topics:

The following procedure must be performed once for each service application in the farm. In the scenario used for this article, a search service application is used for the farm. The search service application requires the following databases:

  1. Search administration database (Search_Service_DB)

  2. Search crawl database (Search_Service_CrawlStoreDB)

  3. Search property database (Search_Service_PropertyStoreDB)

All the command-line instructions in the following procedure use Windows PowerShell.

To create and configure databases for search

  1. [DBA] Add the SharePoint 2010 Management Shell administration account to the dbcreator and securityadmin roles as temporary SQL Server logins.

  2. [Setup] Create the search service application on the temporary server, as follows:

    1. Create the necessary application pools for the search administration and search query Web services, as follows:

      # Create managed account for DOMAIN\QryPool
      $SearchCR = Get-Credential;$managedAccount = New-SPManagedAccount -Credential $SearchCR
      # Create managed account for DOMAIN\AdminPool
      $SearchCR = Get-Credential;$managedAccount = New-SPManagedAccount -Credential $SearchCR
      
    2. Create a new search service application using a temporary Microsoft SQL Server database, as follows:

      Write-Host -ForegroundColor white Creating the Search service application
      $searchAppName="SearchAppTest"
      $appQueryPoolName=$searchAppName+"_AppQueryPool"
      $appAdminPoolName=$searchAppName+"_AppAdminPool"
      $appQueryPool = New-SPServiceApplicationPool -name $appQueryPoolName -account DOMAIN\QryPool
      $appAdminPool = New-SPServiceApplicationPool -name $appAdminPoolName -account DOMAIN\AdminPool
      
      $searchApp = New-SPEnterpriseSearchServiceApplication -Name $searchAppName -ApplicationPool $appQueryPool -AdminApplicationPool $appAdminPool -DatabaseServer <Temp_SQL_Server>
      
      Write-Host -ForegroundColor white Initializing the administration component
      $searchInstance = Get-SPEnterpriseSearchServiceInstance -Local
      $searchApp | get-SPEnterpriseSearchAdministrationComponent | set-SPEnterpriseSearchAdministrationComponent -SearchServiceInstance $searchInstance
      $admin = ($searchApp | get-SPEnterpriseSearchAdministrationComponent)
      Write-Host -ForegroundColor white Waiting for the admin component to be initialized
      do {write-host -NoNewline .;Start-Sleep 10;} while (-not $admin.Initialized)
      
      Write-Host -ForegroundColor white Creating a new crawl topology
      $InitialCrawlTopology = $searchApp | Get-SPEnterpriseSearchCrawlTopology -Active
      $InitialCrawlTopology
      $searchInstance0 = Get-SPEnterpriseSearchServiceInstance -Local
      $CrawlTopology = $searchApp | New-SPEnterpriseSearchCrawlTopology
      $CrawlDatabase0 = ([array]($searchApp | Get-SPEnterpriseSearchCrawlDatabase))[0]
      $CrawlComponent0 = New-SPEnterpriseSearchCrawlComponent -CrawlTopology $CrawlTopology -CrawlDatabase $CrawlDatabase0 -SearchServiceInstance $searchInstance0 -IndexLocation $searchInstance0.DefaultIndexLocation
      $CrawlTopology | Set-SPEnterpriseSearchCrawlTopology -Active
      Write-Host -ForegroundColor white Waiting for the old crawl topology to become inactive
      do {write-host -NoNewline .;Start-Sleep 10;} while ($InitialCrawlTopology.State -ne "Inactive")
      $InitialCrawlTopology | Remove-SPEnterpriseSearchCrawlTopology
      
      Write-Host -ForegroundColor white Creating a new query topology
      $InitialQueryTopology = $searchApp | Get-SPEnterpriseSearchQueryTopology -Active
      $InitialQueryTopology
      $searchInstance0 = Get-SPEnterpriseSearchServiceInstance -Local
      # Create a new query topology
      $QueryTopology = $searchApp | New-SPEnterpriseSearchQueryTopology -Partitions 1 
      $IndexPartition0= (Get-SPEnterpriseSearchIndexPartition -QueryTopology $QueryTopology)
      $QueryComponent0 = New-SPEnterpriseSearchQuerycomponent -QueryTopology $QueryTopology -IndexPartition $IndexPartition0 -SearchServiceInstance $searchInstance0 -IndexLocation $searchInstance0.DefaultIndexLocation
      # Get the default property store
      $PropertyDatabase0 = ([array]($searchApp | Get-SPEnterpriseSearchPropertyDatabase))[0] 
      $IndexPartition0 | Set-SPEnterpriseSearchIndexPartition -PropertyDatabase $PropertyDatabase0
      $QueryTopology | Set-SPEnterpriseSearchQueryTopology -Active
      Write-Host -ForegroundColor white Waiting for the old query topology to become inactive
      do {write-host -NoNewline .;Start-Sleep 10;} while ($InitialQueryTopology.State -ne "Inactive")
      # Delete the old query topology
      $InitialQueryTopology | Remove-SPEnterpriseSearchQueryTopology
      
      Write-Host -ForegroundColor white Creating the Search application proxy
      $searchAppProxy = new-spenterprisesearchserviceapplicationproxy -name ($searchApp.Name+"_proxy") -Uri $searchApp.Uri
      Write-Host -ForegroundColor white Search provisioning finished
      
    3. Pause the search service application

      $searchApp.Pause()
      
  3. [DBA] Back up all the search databases: SearchAppTest, SearchAppTest_CrawlStore, and SearchAppTest_PropertyStore.

  4. [DBA] Restore all the search databases to the production SQL Server database server.

  5. [DBA] Add the following accounts to the SQL Server Logins on the production SQL Server database server using the default settings (leave the Public role checked for Server roles):

    • Search service account

    • Search Query and Site Settings Web Service application pool account

    • Search Admin Web Service application pool account (if different from the search service application pool)

  6. [DBA] If the SQL Server database has not been used to provision farm databases, add the following accounts to the SQL Server Logins

    • The SharePoint_Shell_Access role for the SQL Server-based source content database, the administration content database, the destination content database, and the configuration database 

    • The farm administrator account

  7. [Setup] Switch over to the new production database environment.

    1. Switch the search administration database to the new search administration production database.

      $searchapp | Set-SPEnterpriseSearchServiceApplication -DatabaseServer <Production_SQL_server>
      
    2. Wait for the search service instances to finish re-provisioning.

      do {write-host -NoNewline .;Sleep 10; $searchInstance = Get-SPEnterpriseSearchServiceInstance -Local} while ($searchInstance.Status -ne "Online")
      
    3. Switch the search crawl database to the new search crawl production database.

      $CrawlDatabase0 | Set-SPEnterpriseSearchCrawlDatabase -DatabaseServer <Production_SQL_server>
      
    4. Wait for the search service instances to finish re-provisioning.

      do {write-host -NoNewline .;Sleep 10; $searchInstance = Get-SPEnterpriseSearchServiceInstance -Local} while ($searchInstance.Status -ne "Online")
      
    5. Switch the search property database to the new search property production database.

      $PropertyDatabase0 | Set-SPEnterpriseSearchPropertyDatabase -DatabaseServer <Production_SQL_server>
      
    6. Wait for the search service instances to finish re-provisioning.

      do {write-host -NoNewline .;Sleep 10; $searchInstance = Get-SPEnterpriseSearchServiceInstance -Local} while ($searchInstance.Status -ne "Online")
      
    7. Restart the search service instances.

      get-SPEnterpriseSearchServiceInstance | start-SPEnterpriseSearchServiceInstance
      
    8. Resume the search service application.

      $searchapp.Resume()
      

Use the following procedure to create and configure the portal site Web application and its content database.

To create and configure the portal site Web application

  1. [DBA] Create the portal site Web application content database using the LATIN1_General_CI_AS_KS_WS collation sequence and set the database owner (dbo) to be the Setup user account.

  2. [DBA] Using SQL Server Management Studio, add the service application service account to the Users group and then to the db_owner role for the portal site Web application content database.

  3. [Setup] From the SharePoint 2010 Management Shell, use the New-SPWebApplication and Get-SPWebApplication cmdlets to configure the portal site Web application content database. Use the following example as a guide.

    New-SPWebApplication -Name "Contoso Internet Site" -Port 80 -HostHeader "http://sharepoint.contoso.com" -URL "https://www.contoso.com" -ApplicationPool "ContosoAppPool" -ApplicationPoolAccount (Get-SPManagedAccount "DOMAIN\jdoe")
    Get-SPWebApplication http://somesite | Set-SPWebApplication -Zone "Extranet" -HostHeader "https://www.contoso.com" - AllowAnonymousAccess
    

    For more information, see New-SPWebApplication and Get-SPWebApplication.

    Important

    This command must be run on the same computer that is running the Web application. The host name and port combination must not describe a Web application that already exists or an error results and the Web application is not created.

  4. [Setup] From a command prompt, run the following command to restart IIS: iisreset /noforce

See Also

Other Resources

Resource Center: SQL Server and SharePoint Server 2010 Databases