Friday, March 8, 2013

SharePoint: Permission Error When Attaching Existing Content DB

I recently backed up a content database from production and restored it onto a staging server. When attempting to add it to a new web application, I received an error related to SQL Server:

The SELECT permission was denied on the object 'sysobjects', database 'mssqlsystemresource', schema 'sys'.
The SELECT permission was denied on the object 'sysobjects', database 'mssqlsystemresource', schema 'sys'.


The message box had the same message twice. The problem was that the SharePoint Admin account had the deny permissions checked. The easy fix was to open SQL Server Management Studio and modify the roles of the admin account on the restored content database:

 
 
Make sure that db_denydatareader and db_denydatawriter are unchecked. Once I unchecked those roles and clicked OK, I was able to attach the content database to my new web app.
 

 

No comments:

Post a Comment