Move website sets between databases

Source: Internet
Author: User
ArticleDirectory
    • Determine the size of the source website set
    • Move website sets between content Databases

Multiple content databases can be used in a web application. However, a website collection can only exist in one content database. You can store different content websites in different content databases, which is helpful for improving performance and improving management.By default, Sharepoint 2010 stores the newly created website set in the newly created content database..

 

 

In some cases, you may want to move one or more website sets to another content database. For example, a website set may be increased to the content database where it is located, so you must move the website set to a larger content database. In Windows SharePoint Services 3.0, because the name of the stsadm command used to execute the corresponding step, this process is also calledSplitContent database. In Microsoft SharePoint Foundation 2010, you can view this process more carefully when moving the site set to a larger database.

 

On the other hand, if the website set does not increase to its expected capacity, it may be convenient to combine multiple website sets into a single content database. In Windows SharePoint Services 3.0, this process is also calledMergeContent database. In this process, no content database is actually merged, but the website set is moved and merged into a new database.

 

 

This article describes how to move a website set between content databases and prepare for it.

You can use the stsadm command line tool or the Windows powershell 2.0 command to move website sets between content databases. It does not use any graphical user interface for this task.

Tip:

You can also use the backup and restoration process to move the website set. For information about how to perform this operation, see back up a website set (SharePoint Foundation 2010) and restore a website set (SharePoint Foundation 2010 ).

To perform the procedures described in this article, verify that your account has access to one of the servers running Windows powershell 2.0 and that the user account is a member of the following groups:

    • SQL Server Source Content database, management content database, target content database, and configuration databaseDb_ownerFixed database roles andSharepoint_shell_accessRole.

    • The wss_admin_wpg group on the local computer.

To perform these processes, the following conditions must be met:

    • The target content database must already exist.

    • The source and target content databases must be on the same SQL server instance.

    • The source and target content databases must be connected to the same web application.Program. For more information about how to add a content database to a web application, see Add a content database (SharePoint Foundation 2010 ).

Content:

    • Determine the size of the source website set

    • Move website sets between content Databases

Determine the size of the source website set

Regardless of the reason for the mobile website set, you should always start the task by determining the size of the website set to be moved. Then, ensure that the target hard disk has sufficient space to accommodate the website content. Verify that the target hard disk has at least three times the space required for the website set.

Tip:

You can create a website quota and email notification to keep up with the latest information about the space currently used by the website set.

Determine the size of the website set
    1. On the Start Menu, click all programs ".

    2. Click SharePoint 2010 product ".

    3. Click SharePoint 2010 management shell ".

    4. At the Windows powershell 2.0 command prompt, type the following command:

      $ Used = (get-spsiteadministration-identity 
      $ Used

      It is the name of the website set. The disk space used by the specified website set is stored in$ UsedVariable, and the second command is displayed at the command prompt.

For more information, see get-spsiteadministration.

Command

Get-spsiteadministration-IdentityHttp: // MOSS: 8001| Select URL, @ {label = "size"; Ex = {$ _. diskused/1 MB}, userscount

Move website sets between content Databases

You can use Windows powershell commandsMove-spsiteMove website sets between content databases. Two processes are provided here. The first process moves a website set to the new content database, and the second process moves multiple website sets to the new content database.

Move a website set
    • At the Windows powershell command prompt, type the following command:

      Move-spsite 

      Where,Http: // servername/sites/sitenameIs the name of the website set,<Destinationcontentdb>Is the name of the target content database.

Move multiple website sets
    • At the Windows powershell command prompt, type the following command:

      Get-spsite-contentdatabase <sourcecontentdb> | move-spsite-destinationdatabase <destinationcontentdb>

      Where,<Sourcecontentdb>Is the name of the original content database,<Destinationcontentdb>Is the name of the target content database. This command moves all website sets in the source content database to the target content database.

For more information, see move-spsite.

Note:

We recommend that you use Windows powershell when executing a command line management task. The stsadm command line tool has been discarded and is still included to support compatibility with previous product versions.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.