DetailPage-MSS-KB

Microsoft small business knowledge base

Article ID: 841216 - Last Review: December 3, 2007 - Revision: 8.3

On This Page

SYMPTOMS

You connect to a Microsoft Windows SharePoint Services Web site after you install a Microsoft Windows SharePoint Services service pack or a security update on the server. When you do this, you may receive an error message that resembles one of the following error messages:
Exception from HRESULT: 0x80040E14.
Troubleshoot issues with Windows SharePoint Services.
HTTP 500 - Internal server error
Additionally, you may be unable to perform the following operations:
  • Edit columns on a list
  • Import a spreadsheet
  • Add choices to a choice field

CAUSE

This issue may occur if the content databases in Windows SharePoint Services are not updated correctly during the installation of the Windows SharePoint Services service pack or of the security update for Windows SharePoint Services 2.0 that is described in Microsoft Knowledge Base article 887981. The content databases still have the same version numbers that were present before you installed the Windows SharePoint Services service pack. This issue may occur if one of the following conditions is true:
  • You install Microsoft Windows SharePoint Services Service Pack 1 (SP1) or later on the server when the virtual server is unextended, and then you extend the virtual server by mapping the virtual server to an existing Windows SharePoint Services Web site.
  • You install Windows SharePoint Services Service Pack 1 (SP1) or later on the server when the MSSQLSERVER service is stopped. In this situation, Windows SharePoint Services and service packs are installed successfully, but the content databases are not updated.
  • You install Windows SharePoint Services Service Pack 1 (SP1) or later on the server and a process has the virtual servers content directory files \_vti_pvt\service.cnf or \web.config locked for write access.
  • You install Windows SharePoint Services Service Pack 1 (SP1) or later as an administrator on the Web server. However, the account that you use to install the Windows SharePoint Services service packs is not an administrator account on the computer that is running Microsoft SQL Server.

    Note Minimally, you have to have Database Creators and Security Administrator roles in SQL for the account where you install the Windows Sharepoint Services service packs on the Web server with. Also, you have to have database access with "db_owner" and public access to all SharePoint databases.
  • You install the security update for Windows SharePoint Services 2.0 that is described in Microsoft Knowledge Base article 887981 by using the Automatic Update feature.
This issue may also occur if you follow these steps:
  1. Install Windows SharePoint Services.
  2. Install Windows SharePoint Services SP1 or later.
  3. Remove Windows SharePoint Services SP1 or later.
  4. Reinstall the original release version of Windows SharePoint Services.
  5. Reconnect to the upgraded databases.
In this scenario, Windows SharePoint Services is in a bad state because the databases are upgraded to the latest Windows SharePoint Services service packs installed but the Web server is running the release to manufacturing release build. You must reinstall Windows SharePoint Services and all previously installed service packs for the program and the databases to be functional.

RESOLUTION

To resolve this issue, use the Stsadm.exe command-line tool to force an upgrade of the content databases. To do this, follow these steps, as appropriate for the version of Windows SharePoint Services that you are running.

Windows SharePoint Services 2.0

  1. Click Start, click Run, type cmd in the Open box, and then click OK.
  2. At the command prompt, type the following lines, and then press ENTER after each line:
    cd /d %commonprogramfiles%\Microsoft Shared\Web Server Extensions\60\Bin
    stsadm -o upgrade -forceupgrade
  3. Type exit to exit Command Prompt.

Windows SharePoint Services 3.0

  1. Click Start, click Run, type cmd in the Open box, and then click OK.
  2. At the command prompt, type the following lines, and then press ENTER after each line:
    cd /d %commonprogramfiles%\Microsoft Shared\web server extensions\12\BIN
    stsadm -o upgrade -forceupgrade
  3. Type exit to exit Command Prompt.
Note If you run the Stsadm.exe command to manually force an upgrade of a Windows SharePoint Services installation, you may receive the following error message:
The current user or the application pool identity of the virtual server is not the owner of the database '<sts_servername_1>' on server '"server_name\share_point"'
You receive this error message because Windows SharePoint Services requires that the database owner (DBO) is one of the following:
  • The account that the SharePoint Central Administration virtual server application pool is running as for Microsoft Windows authentication
  • The SQL Server account that Windows SharePoint Services is connecting as for SQL Server authentication
If you are using Windows authentication, you must change the database ownership and permissions for the databases to grant permissions to the application pool accounts. If you are using SQL Server authentication, you must change the database ownership and permissions for the databases to grant permissions to the SQL Server account. To change the database ownership and permissions, use Microsoft SQL Query Analyzer.

You must change the DBO to be the Windows account or the SQL Server account that Windows SharePoint Services is running as. However, if for any reason you cannot make the change immediately, there is a temporary workaround. You can designate the Windows account or the SQL Server account that Windows SharePoint Services is running as to be the System Administrator in SQL Server. Then, you can continue running the stsadm –o upgrade command.

Note If your application pool account is running as Network Service and if you are using Windows authentication, you will not be able to designate Network Service as the DBO. Instead, you can grant System Administrators permissions in SQL Server to the Network Service group. For installations that use Windows authentication where Network Service is used as the application pool account that Windows SharePoint Services is running as, do not use the following procedure.

To change the DBO to be the Windows account or the SQL Server account that Windows SharePoint Services is running as, follow these steps:
  1. Change the database ownership and permissions for the configuration database. To do this, follow these steps:
    1. On the computer that is running SQL Server, click Start, point to All Programs, point to Microsoft SQL Server, and then click Query Analyzer.
    2. In the Connect to SQL Server dialog box, type the server name in the SQL Server box, and then click OK.
    3. On the Query menu, click Change Database.
    4. In the Select Database of server_name box, click the configuration database (sts_config), and then click OK.
    5. In the Query pane, type the following appropriate query, depending on whether you are using Windows authentication or SQL Server authentication.

      If you are using Windows authentication, type the following query.
      DECLARE @AdminVSAccount nvarchar(255)
      DECLARE @ContentVSAccount nvarchar(255)
      SET @ContentVSAccount = N'domain\contentaccount'; 
      SET @AdminVSAccount = N'domain\adminaccount'; 
      EXEC sp_grantlogin @ContentVSAccount;
      EXEC sp_changedbowner @AdminVSAccount;
      IF NOT EXISTS (SELECT * FROM sysusers WHERE name=@ContentVSAccount) 
        EXEC sp_grantdbaccess @ContentVSAccount; 
      EXEC sp_addrolemember 'db_owner', @ContentVSAccount; 
      EXEC sp_addsrvrolemember @AdminVSAccount, 'dbcreator'
      EXEC sp_addsrvrolemember @AdminVSAccount, 'securityadmin'
      Note In lines 3 and 4, replace domain\contentaccount and domain\adminaccount with the domain account for the content virtual server and the domain account for the SharePoint Central Administration virtual server. If the accounts are the same, SQL Query Analyzer will display an error message, but the process will still succeed.

      If you are using SQL Server authentication, type the following query.
      DECLARE @SQLAccount nvarchar(255)
      SET @SQLAccount = N'sql_user_account'; 
      EXEC sp_changedbowner @SQLAccount;
      EXEC sp_addsrvrolemember @SQLAccount, 'dbcreator'
      EXEC sp_addsrvrolemember @SQLAccount, 'securityadmin'
      Note In line 2, replace sql_user_account with the name of the SQL Server account that Windows SharePoint Services is configured to use to connect to the computer that is running SQL Server. This must be an existing SQL Server account.
    6. Click Execute Query to update the database.
  2. Change the database ownership and permissions for the content databases. To do this, follow these steps:
    1. On the computer that is running SQL Server, click Start, point to All Programs, point to Microsoft SQL Server, and then click Query Analyzer.
    2. In the Connect to SQL Server dialog box, type the server name in the SQL Server box, and then click OK.
    3. On the Query menu, click Change Database.
    4. In the Select Database of server_name box, click the content database you want to update, and then click OK.
    5. In the Query pane, type the following appropriate query, depending on whether you are using Windows authentication or SQL Server authentication.

      If you are using Windows authentication, type the following query.
      DECLARE @AdminVSAccount nvarchar(255)
      DECLARE @ContentVSAccount nvarchar(255)
      SET @ContentVSAccount = N'domain\contentaccount'; 
      SET @AdminVSAccount = N'domain\adminaccount'; 
      EXEC sp_grantlogin @ContentVSAccount;
      EXEC sp_grantlogin @AdminVSAccount;
      EXEC sp_changedbowner @AdminVSAccount;
      IF NOT EXISTS (SELECT * FROM sysusers WHERE name=@ContentVSAccount) 
        EXEC sp_grantdbaccess @ContentVSAccount; 
      EXEC sp_addrolemember 'db_owner', @ContentVSAccount;
      Note In lines 3 and 4, replace domain\contentaccount and domain\adminaccount with the domain account for the content virtual server and the domain account for the SharePoint Central Administration virtual server. If the accounts are the same, SQL Query Analyzer will display an error message, but the process will still succeed. If you are using SQL Server authentication, in lines 3 and 4, replace domain\contentaccount and domain\adminaccount with the SQL Server account name.

      If you are using SQL Server authentication, type the following query.
      DECLARE @SQLAccount nvarchar(255)
      SET @SQLAccount = N'sql_user_account'; 	
      EXEC sp_changedbowner @SQLAccount;
      Note In line 2, replace sql_user_account with the name of the SQL Server account that Windows SharePoint Services is configured to use to connect to the computer that is running SQL Server. This must be an existing SQL Server account.
    6. Click Execute Query to update the database.
  3. Repeat the previous steps for each additional content database.
  4. Verify that setting the DBO and the appropriate permissions was successful. To do this, follow these steps:
    1. On the computer that is running SQL Server, click Start, point to All Programs, point to Microsoft SQL Server, and then click Enterprise Manager.
    2. Under Databases, locate the configuration database, right-click the configuration database, and then click Properties.
    3. On the General tab, verify that the owner is the account that you specified in the queries. For SQL Server authentication, the owner is the SQL Server account. For Windows authentication, the owner is the application pool account that the SharePoint Central Administration virtual server is running as.
    4. Repeat these steps for each of the other content databases.

APPLIES TO
  • Microsoft Windows SharePoint Services 2.0
  • Microsoft Windows Small Business Server 2003 Premium Edition
  • Microsoft Windows Small Business Server 2003 Standard Edition
  • Microsoft Windows SharePoint Services 3.0
Keywords: 
kbpending kberrmsg kbprb KB841216
Share
Additional support options
Ask The Microsoft Small Business Support Community
Contact Microsoft Small Business Support
Find Microsoft Small Business Support Certified Partner
Find a Microsoft Store For In-Person Small Business Support