Thursday, November 29, 2012

stsadm restore Results in Access Denied 0x80070005



Restoring a content database using stsadm -o restore usually works pretty well. We use this command to restore content backups from our production environment to our testing environment. 

If the production and testing environment is administered by a different user accounts then when you try to restore the site u get the error

Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) 

The 12 Hive log file offers up the full stack trace but reveals nothing of any real interest. even if you have all privilages in the SP database and system administrator privilages you wont be able to restore unless given permission as site collection administrator

So from the Central Administration console and browse to the Application Management tab. Select the Site collection administrators link in the SharePoint Site Management section and the Secondary Site Collection Administrator.  

check for the lock in the site by using this command before restore

stsadm -o getsitelock -url [url]  if not none set it to none by using this command 
stsadm -o setsitelock -url [url] -lock none 

No comments:

Post a Comment