Microsoft Windows SharePoint Services 3.0 includes the
Stsadm.exe tool for command-line administration of Windows SharePoint Services
servers and sites. We have added a new operation that you can use to
repartition a site collection in a content database.
To obtain this new operation, apply hotfix 939188. Then, use
the
mergecontentdbs operation to repartition a site collection in a content database.
How to obtain the hotfix
For more information about hotfix 939188, click the
following article number to view the article in the Microsoft Knowledge Base:
939188Â
(http://kbalertz.com/Feedback.aspx?kbNumber=939188/
)
Description of the Windows SharePoint Services 3.0 hotfix package: June 24, 2007
How to use the mergecontentdbs operation
To repartition a site collection in a content database, use the
following syntax for the
mergecontentdbs operation at a command prompt:
stsadm.exe -o mergecontentdbs -url <url> -sourcedatabase <source database name> -destinationdatabasename <destination database name> [-operation <1, 2, or 3>] [-filename <file name that is saved from the stsadm -o enumsites operation>]
Note The following table lists the values for the
operation parameter.
Collapse this tableExpand this table
| Parameter value | Description |
|---|
| 1 | Analyze (default) |
| 2 | Full database merge |
| 3 | Read from file |
The following is a sample Stsadm.exe command line for the
mergecontentdbs operation:
stsadm.exe -o mergecontentdbs -url "http://site collection URL" -sourcedatabase "source database name" -destinationdatabasename "destination database name" [-operation "1"] [-filename "file name"]
Additional information
A new
-databasename <databasename> parameter has been added to the
Enumsites operation.
For more information about the
Enumsites operation, visit the following Microsoft Web site:
For more information about the Stsadm.exe command-line tool,
visit the following Microsoft Web site:
To
make sure that you have the correct permissions to repartition site
collections, temporarily grant yourself Full Control permissions in "Policy for
Web Application."
Additionally, make sure that your account is a box
administrator on the server that is running Microsoft SQL Server, or make sure
that your account is granted the Database Owner fixed database role for all
SharePoint products and technologies databases.
To do this, follow
these steps:
- Click Start, point to
Administrative Tools, and then click SharePoint 3.0
Central Administration.
- Click the Application Management tab, and
then click Policy for Web Application.
Note Determine whether the account is already listed, and then
determine which permission level the account has. - In Policy for Web Application, click
Add Users.
- On the Add Users page, click the Web
application that you will use to run the command, and then click
Next.
- In the Choose Users box, add the account
that you will use to log on when you run the command.
- In the Choose Permissions area, select
Full Control, and then click Finish.
Note If you do not have the correct permissions to perform the
operation, you will receive an error message that resembles the following error
message:
Moving sites... Another site already exists at
/sites/test. Delete this site before attempting to create a new site with the
same URL, choose a new URL, or create a new inclusion at the path you
originally specified.
After you successfully repartition the sites,
use the previous steps to remove or to change your account permission level by
using "Policy for Web Application," depending on how you want your permissions
to be configured. If your account is used for other services, reset it to the
original permission level.