Microsoft KB Archive/826793

= You Receive the “Portal Creation Failed System.Data.SqlClient.SqlException: User Owns Objects in the Database and Cannot Be Dropped&quot; Error Message When You Restore a Portal Site =

Article ID: 826793

Article Last Modified on 5/31/2007

-

APPLIES TO


 * Microsoft Office SharePoint Portal Server 2003

-





SYMPTOMS
When you use the Microsoft SharePoint Portal Server Data Backup and Restore tool to restore a portal site to your server farm after you import a user profile, the site database, user profile database, and service database are created. However, the restore operation does not successfully complete, and you receive an error message that is similar to the following error message logged to the log file:

Portal creation failed System.Data.SqlClient.SqlException: The user owns objects in the database and cannot be dropped.

The proposed new database owner is already a user in the database.

at SharePoint.Portal.Data.SqlSession.ExecuteNonQuery(SqlCommand command, Boolean bypassCanaryCheck)

at SharePoint.Portal.Data.SqlSession.ExecuteNonQuery(SqlCommand command, Boolean bypassCanaryCheck)

at SharePoint.Portal.Data.SqlSession.ExecuteNonQuery(SqlCommand command)

at SharePoint.Portal.Data.SqlSession.ExecuteNonQuery(SqlCommand command)

at SharePoint.Portal.Topology.Database.ChangeOwner(SqlSession session, String user)

at SharePoint.Portal.Topology.Database.UpdateUserRights(String centralAdminIdentity, String portalIdentity, String originalPortalIdentity, Boolean fBelongsToPortal)

at SharePoint.Portal.Admin.PortalRestore.CreatePortalSite

at SharePoint.Portal.Admin.PortalRestore.RecoverSite

Additionally, you may receive error messages that are similar to the following two error messages in the Restore Item box on the Restore tab of the SharePoint Portal Server Data Backup and Restore tool:

ERROR: The user owns objects in the database and cannot be dropped.

-and-

ERROR: Portal site http:// / does not exist.



CAUSE
This problem occurs in situations when both the ProfileDelDocs and the ProfileDelDocsAlt tables are created by a user who is not the default database owner (DB0). This problem may also occur if you change the user account that is configured as the configuration database administrator account, and if this user account is incorrectly specified as the owner of both the ProfileDelDocs and the ProfileDelDocsAlt tables.

Both the ProfileDelDocs and the ProfileDelDocsAlt tables are created during the search configuration portion of the portal site creation process. If the portal site is created and the search configuration process is not yet complete, the Microsoft SharePoint Portal Administration service (Spsadmin) completes the search configuration process. However, in situations when the configuration database administration account is changed before Spsadmin completes the search configuration process, the new configuration database account is specified as the owner of both the ProfileDelDocs and the ProfileDelDocsAlt tables.



WORKAROUND
To work around this problem, specify the default DBO as the owner of both the ProfileDelDocs and the ProfileDelDocsAlt tables and complete the restore operation of the portal site by using Microsoft SharePoint Portal Central Administration. To do so, follow these steps:  Use the sp_changeobjectowner stored procedure to change the owner of both the ProfileDelDocs and ProfileDelDocsAlt tables from the current owner to the DBO.

For additional information about how to do so, click the following article number to view the article in the Microsoft Knowledge Base:

275312 INF: SQL Server Procedure to Change Object Owner

 Use SharePoint Central Administration to complete the restore operation of the portal site. To do so, follow these steps:  Start SharePoint Central Administration. Under Portal Site and Virtual Server Configuration, click Create a portal site On the Create Portal Site for  page, click Restore a portal in the Portal Creation Options area. In the Restore Portal From Database area, do the following: <ol> In the Site database server box, click the name of the server that hosts the site database.</li> In the Site database name box, type the name of the site database from where you want to restore the portal site. The name of the database ends in &quot; _SITEDB&quot; (without the quotation marks).</li> In the User profile database server box, click the name of the database server that stores the user profile database.</li> In the User profile database name box, type the name of the user profile database from where you want to restore user profile information.</li> In the Services database server list, click the name of the database server that stores the services database.</li> In the Services database name box, type the name of the services database from where you want to restore services for the portal site.</li></ol> </li> In the Site URL area, click the virtual server that you want to use for the portal in the Virtual server box, and then type the URL that you use to connect to the new portal in the URL box.</li> Click OK.</li></ol> </li> On the Create Portal Confirmation for Server  page, click OK .</li> If you want, start the SharePoint Portal Server Data Backup and Restore tool and restore the Index component of the portal site.</li></ol>

<div class="status_section">

STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

<div class="moreinformation_section">

MORE INFORMATION
For more information about how to back up and restore SharePoint Portal Server, see the &quot;Backup and Restore&quot; topic of the Microsoft Office SharePoint Portal Server 2003 Administration Guide. The Microsoft Office SharePoint Portal Server 2003 Administration Guide (Administrator's Help.chm) is located in the Docs folder in the root of the SharePoint Portal Server 2003 CD.

For more information about Microsoft SharePoint Portal Server, visit the following Microsoft Web site:

http://office.microsoft.com/en-us/sharepointserver/FX101494611033.aspx

Keywords: kberrmsg kbpending kbbug KB826793

-

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

© Microsoft Corporation. All rights reserved.