Could not access content database
This article explains how to handle the issue with site collection load.
Last updated
This article explains how to handle the issue with site collection load.
Last updated
While trying to load SharePoint farm settings I received the following message:
Could not access content database ‘Database Name’ on server ‘Server Name’. The site collections from this database will not be loaded.
For SPDocKit Snapshot Wizard or SPDocKit PowerShell module to load data from site collections, the user account running the load must be a member of the SharePoint_Shell_Access role on each of the content databases.
The process of adding a user account to the role must be repeated each time a new content database is added to the SharePoint farm. To add a user account to the SharePoint_Shell_Access role:
Open SharePoint Management Shell.
Type the following PowerShell command: Add-SPShellAdmin -UserName DOMAIN\YourAccount (click here to learn more).
If you want to grant PowerShell shell access to a single database check this article for more details.
If you want to grant PowerShell shell access to all content databases run this script:
Please note! The cmdlet Add-SPShellAdmin is going to apply to all the current SharePoint databases. If more SharePoint databases are added in the future, you might have to re-run the cmdlet again.
The cmdlet might fail in some environments; please contact us for further assistance.