Microsoft KB Archive/926961

= Error message when you use SharePoint 3.0 Central Administration to try to re-add a content database in Windows SharePoint Services 3.0 =

Article ID: 926961

Article Last Modified on 5/14/2007

-

APPLIES TO


 * Microsoft Windows SharePoint Services 3.0

-



SYMPTOMS
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 ' ' 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.

Unknown Error

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.



CAUSE
This issue occurs if the connection pool contains a connection to the content database that was not closed.



WORKAROUND
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  -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.</li> In the list of services, right-click SQL Server 2005 Embedded Edition, and then click Stop.</li> Right-click SQL Server 2005 Embedded Edition, and then click Start.</li></ol> </li></ol>

<div class="moreinformation_section">

MORE INFORMATION
The syntax for the Stsadm.exe command-line tool with the addcontentdb operation is listed as follows:

stsadm.exe -o addcontentdb -url  -databasename   [-databaseserver  ] [-databaseuser  ] [-databasepassword  ] [-sitewarning  ] [-sitemax  ]

Note The -url and -databasename parameters are required. The other parameters are optional.

Additional query words: wssv3 standalone

Keywords: kbtshoot kberrmsg kbexpertiseinter kbprb KB926961

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.