You receive error messages when you try to use the Stsadm.exe command-line tool to perform certain administrative operations in Windows SharePoint Services (896148)



The information in this article applies to:

  • Microsoft Windows SharePoint Services

SYMPTOMS

When you try to use the Stsadm.exe command-line tool to perform certain administrative operations in Microsoft Windows SharePoint Services, you receive error messages. The administrative operation that you want to perform is not completed successfully. For example, you experience one or more of the following symptoms:
  • When you run the stsadm -o enumsites -url http://ServerName command at the command prompt, you receive the following error message:
    <SitesCannot complete this action.

    Please try again.
  • When you run the stsadm -o upgrade -forceupgrade command at the command prompt, you receive the following error message:
    Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. (Error code: 18452).
  • When you run the stsadm -o createsite -url URL -ownerlogin DomainName\UserName -owneremail EmailAddress command at the command prompt, you receive the following error message:
    Cannot connect to the configuration database.

CAUSE

This issue occurs if the user account that you use to log on to the Web server does not have sufficient permissions. The user account must have sufficient permissions to the databases that are used by Windows SharePoint Services on the computer that is running Microsoft SQL Server. For example, this issue may occur if the following conditions are true:
  • SQL Server and Windows SharePoint Services are installed on separate computers.
  • The user account that you use to log on to the Web server is not a member of either of the following roles:
    • The Security Administrators role in SQL Server
    • The Database Creators role in SQL Server
The Stsadm.exe command-line tool is run by using the context of the user account that you use to log on to the Web server.

RESOLUTION

To resolve this issue, use one of the following methods.

Method 1

Log on to the Web server by using a Windows domain account that has the following characteristics:
  • The Windows domain account is a member of the local Administrators group on the Web server.
  • The Windows domain account is a member of the local Administrators group on the computer that is running SQL Server.

Method 2

Log on to the Web server by using a user account that has all the following characteristics:
  • The user account is a member of the local Administrators group on the Web server.
  • The user account is a member of the Security Administrators role on the computer that is running SQL Server.
  • The user account is a member of the Database Creators role on the computer that is running SQL Server.
Additionally, the user account must be a member of two roles on the databases that are used by Windows SharePoint Services on the computer that is running SQL Server. These roles are as follows:
  • The public role
  • The db_owner role

MORE INFORMATION

For more information about how to use the Stsadm.exe command-line tool to administer Windows SharePoint Services, see the following topics in the "Reference" section of the Microsoft Windows SharePoint Services Administrator's Guide:
  • "Command-line operations"
  • "Command-line parameters"
  • "Command-line properties"
For more information about how to run SQL Server on a separate computer from Windows SharePoint Services, see the "Remote SQL Server deployment" topic. This topic is located in the "Deployment Scenarios" section of the Microsoft Windows SharePoint Services Administrator's Guide.

To obtain the Microsoft Windows SharePoint Services Administrator's Guide, visit the following Microsoft Web site:

Modification Type:MajorLast Reviewed:3/25/2005
Keywords:kbConfig kberrmsg kbtshoot KB896148 kbAudITPRO