Поделиться через


Add a content database (SharePoint Foundation 2010)

 

Применимо к: SharePoint Foundation 2010

Последнее изменение раздела: 2014-10-14

You can use the procedures that are described in this article to create a new content database and attach it to a Web application.

In this article:

  • To add a content database to a Web application by using Central Administration

  • To add a content database to a Web application by using Windows PowerShell

To add a content database to a Web application by using Central Administration

  1. Verify that the user account that is being used to perform this operation is a member of the Farm Administrators SharePoint group. If you are using Windows authentication to connect to SQL Server, the user account must also be a member the SQL Server dbcreator fixed server role on the SQL Server instance where the database will be created. If you are using SQL authentication to connect to SQL Server, the SQL authentication account that you specify when you create the content database must have dbcreator permission on the SQL Server instance where the database will be created.

  2. On the SharePoint Central Administration Web site, click Application Management.

  3. In the Databases section, click Manage content databases.

  4. On the Manage Content Databases page, click Add a content database.

  5. On the Add Content Database page:

    1. Specify a Web application for the new database.

    2. Specify a database server to host the new database.

    3. Specify the authentication method that the new database will use and supply an account name and password, if they are necessary.

      Важно!

      The account name and password must already exist as a SQL Server login.

    4. Specify the name of the failover database server, if one exists.

    5. Specify the number of top-level sites that can be created before a warning is issued. By default, this is 2,000.

    6. Specify the total number of top-level sites that can be created in the database. By default, this is 5,000.

    7. Click OK.

To add a content database to a Web application by using Windows PowerShell

  1. Verify that you meet the following minimum requirements: См. статью Add-SPShellAdmin. If you are using Windows authentication to connect to SQL Server, the user account must also be a member the SQL Server dbcreator fixed server role on the SQL Server instance where the database will be created. If you are using SQL authentication to connect to SQL Server, the SQL authentication account that you specify when you create the content database must have dbcreator permission on the SQL Server instance where the database will be created.

  2. On the Start menu, click Administrative Tools.

  3. Click SharePoint 2010 Management Shell.

  4. At the Windows PowerShell command prompt, type the following command:

    New-SPContentDatabase -Name <ContentDbName> -WebApplication <WebApplicationName>
    

    Where <ContentDbName> is the name of the content database to create and <WebApplicationName> is the name of the Web application to which the new database is attached.

    For more information, see New-SPContentDatabase.

Примечание

To attach an existing content database to a Web application, use the Windows PowerShell cmdlet Mount-SPContentDatabase. For more information, see Mount-SPContentDatabase.

Для выполнения административных задач из командной строки мы рекомендуем использовать Windows PowerShell. Программа командной строки Stsadm является устаревшей, однако она добавлена для совместимости с предыдущими версиями продукта.

See Also

Concepts

Attach or detach content databases (SharePoint Foundation 2010)
Перемещение сайтов между базами данных (SharePoint Foundation 2010)