Problem: SharePoint Admin tried backing up a SharePoint 2013 site collection with Backup-SPSite PowerShell cmdlet and got an error “Cannot open database “WSS_Content_demo” requested by the login. The login failed. Login failed for user ‘Domain\User’.”
Although the SharePoint administrator is granted permission with the “Add-SPShellAdmin” cmdlet, it grants permission to the user only on existing SharePoint content databases at the time of running this command. For new content databases created, we have to grant permission again later on!
Run the “Add-SPShellAdmin” cmdlet for the user. This gives access to all SharePoint databases:
Get-SPDatabase | Add-SPShellAdmin "Domain\User"