When you try to manage your Microsoft Windows SharePoint Services content database by using the Manage Content Databases page in SharePoint Central Administration, you may receive one of the following error messages:
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'.
This issue may occur when the database owner of the database that you are connecting to is different from the application pool identity that SharePoint is running under.
To resolve this issue, change the database ownership and the permissions for the content database to match the identities of the virtual server accounts for content and configuration. To do this, follow these steps:
On the computer that is running Microsoft SQL Server, click Start, point to All Programs, point to Microsoft SQL Server, and then click Query Analyzer.
In the Connect to SQL Server dialog box, type the server name in the SQL Server box, and then click OK.
On the Query menu, click Change Database.
In the Select Database of Server_Name box, click the content database that you want to update, and then click OK.
In the Query pane, type the following query.
Note In lines 3 and 4 of the query, replace Domain_Name\Content_Account and Domain_Name\Admin_Account 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 displays an error when you run the query, but the process still succeeds.
DECLARE @AdminVSAccount nvarchar(255) DECLARE @ContentVSAccount nvarchar(255) SET @ContentVSAccount = N'Domain_Name\Content_Account'; SET @AdminVSAccount = N'Domain_Name\Admin_Account'; 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;
On the Query menu, click Execute.
If you are running Windows SharePoint Services with WMSDE, there are separate steps to resolve the problem. In the WMSDE installation, the application pool identity for the SharePoint Central Administration is Network Service. For SQL 2000, you cannot change the database owner to Network Service because of a design limitation. The workaround for WMSDE installations is to add Network Service to the SYSADMIN role in WMSDE, add the database back by using SharePoint Manage Content databases, and then drop the role for Network Service back to its original settings.
To set Network Service as SYSADMIN, follow these steps:
Start an OSQL Session.
To do so, click Start, click All Programs, click Accessories, and then click Command Prompt.
At the command prompt, start an OSQL session by typing the following syntax where servername is the name of your server, and then pres ENTER:
For more information, see the Microsoft Windows SharePoint Services Administration Guide. For more information about required database owner permissions and database permissions, see the "Migrating from WMSDE to SQL Server" topic in the "Backup and Migration" topic.