Search This Blog

Thursday, 27 February 2014

Access to Content Database SharePoint 2010


When I try to deploy SharePoint solution on my SharePoint Server from Visual Studio 2010, I got below error

But I was able to access the site in browser. Moreover I am the Site Collection Administrator.
Also when I try to take site backup through PowerShell, I got below error

So here the issue is we need to set privilege for this user to manage SharePoint. This can be done using PowerShell.  Refer below:

To add a user as a Shell administrator:
Add-SPShellAdmin -UserName <user name> -Database <database name>

For example, to allow user mrajaram to execute commands against the http://......:4126 site, use the following command:
Add-SPShellAdmin -UserName Domain\mrajaram
-Database (Get-SPContentDatabase -Identity http://......:4126)

Note that the Get-SPContentDatabase cmdlet and the http://......:4126 content database name are used to retrieve the SPContentDatabase object.

To remove a user from Shell Admin:
Remove-SPShellAdmin -UserName <user name> -Database <database name>

To list Shell administrators:
Get-SPShellAdmin


No comments:

Post a Comment