Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 926961 - Last Review: May 14, 2007 - Revision: 1.2
Error message when you use SharePoint 3.0 Central Administration to try to re-add a content database in Windows SharePoint Services 3.0
Consider the following scenario. You deploy Microsoft Windows SharePoint Services 3.0 on a single server by using a stand-alone installation. You use SharePoint 3.0 Central Administration to remove the content database. However, when you try to re-add the content database, you receive one of the following error messages:
Database state cannot be changed while other users are using the database 'DatabaseName'
ALTER DATABASE statement failed.
sp_dboption command failed.
Attaching this database requires upgrade, which could time out the browser session. You must use the STSADM command 'addcontentdb' to attach this database.
Note In a stand-alone installation, the Setup program automatically installs and configures Microsoft Windows Internal Database. The Setup program uses Microsoft Windows Internal Database to create the configuration database and the content database. By default, the name of the content database is WSS_Content.
This issue occurs if the connection pool contains a connection to the content database that was not closed.
To work around this issue, use the Stsadm.exe command-line tool with the
addcontentdb operation to re-add the content database. Then, restart the SQL Server 2005 Embedded Edition service. To do this, follow these steps:
- Use the Stsadm.exe command-line tool with the addcontentdb operation to re-add the content database. To do this, follow these steps:
- Click Start, click Run, type cmd in the Open box, and then click OK.
- Type the following lines at the command prompt. Press ENTER after each line:
cd /d %commonprogramfiles%\Microsoft Shared\Web Server Extensions\12\Bin
stsadm -o addcontentdb -url URL -databasename DatabaseName
- Type exit to close the command prompt.
- Restart the SQL Server 2005 Embedded Edition service. To do this, follow these steps:
- Click Start, point to Administrative Tools, and then click Services.
- In the list of services, right-click SQL Server 2005 Embedded Edition, and then click Stop.
- Right-click SQL Server 2005 Embedded Edition, and then click Start.
The syntax for the Stsadm.exe command-line tool with the
addcontentdb operation is listed as follows:
stsadm.exe -o addcontentdb -url URL -databasename DatabaseName [
-databaseserver DatabaseServerName] [
-databaseuser UserName] [
-databasepassword Password] [
-sitewarning SiteWarning] [
-sitemax SiteMaxCount]
Note The
-url and
-databasename parameters are required. The other parameters are optional.
APPLIES TO
- Microsoft Windows SharePoint Services 3.0
| kbtshoot kberrmsg kbexpertiseinter kbprb KB926961 |
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate