07 May, 2013

EXECUTE permission was denied on the object 'proc_putObject', database 'SharePoint_Config', schema 'dbo'


Problem Description:
 While I am deploying my solution in to SharePoint, it's throwing an exception as follows:

Error Message:
EXECUTE permission was denied on the object 'proc_putObject', database 'SharePoint_Config', schema 'dbo'

Logs analysis:
The EXECUTE permission was denied on the object 'proc_putObject', database 'SharePoint_Config', schema 'dbo'.   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Microsoft.SharePoint.Utilities.SqlSession.ExecuteNonQuery(SqlCommand command)
   at Microsoft.SharePoint.Administration.SPConfigurationDatabase.StoreObject(SPPersistedObject obj, Boolean storeClassIfNecessary, Boolean ensure)
   at Microsoft.SharePoint.Administration.SPConfigurationDatabase.PutObject(SPPersistedObject obj, Boolean ensure)
   at Microsoft.SharePoint.Administration.SPPersistedObject.Update()

Root cause: Permissions

This error appears to be an issue with the permissions to the SharePoint configuration database.The general recommendation I found was to ensure that the application pool identity of the web application has sufficient permissions on the config database.

Resolution:
Million thanks to Microsoft's Team who has created this article:

Details Steps:
-In order to resolve the issue, I provided Execute permission to the database role “WSS_Content_Application_Pools” into the stored procedure “proc_putObject”. I performed the following steps to do this.
-In the database server, expand SharePoint Config database and naviage to Programmability/Stored Procedures/dbo.proc_putObject using SQL Server Management Studio.
-Right click on the above stored procedure and select Properties.
-On the popup screen, select Permissions on the left and click Search button.
-On the new popup screen, click Search, select [WSS_Content_Application_Pools] database role and click OK.
-Click OK again.
-On the first popup screen, select the role, check Execute permission and click OK.

If you have any queries/questions then please let me know, thank you.

03 May, 2013

Content databases contain orphaned items

Problem Description:
The SharePoint Health Analyzer detected an error.  Content databases contain orphaned items.

In some situations, a content database that is used by Microsoft SharePoint Foundation may become corrupted. The corrupted database may contain orphaned items. For example, a document may not have a parent document library or a list may not have a parent Microsoft SharePoint Foundation Web site.  Consequently, you may be unable to create new items with the same URL as the orphaned items, and space in the content database will be consumed unnecessarily.

Error Message:
Content databases contain orphaned items

Resolution:
Perfect article provided by Microsoft on this which helps me to resolve this issue:
http://technet.microsoft.com/en-in/library/ff805076(v=office.14).aspx

Product Applies To:
SharePoint Server 2010.
SharePoint Foundation 2010.

Redirect a SharePoint site by using the Content Editor Web Part - SP2010

Today one user came up with the requirements that he wanted to redirect his current site to different site collection. This seems to a normal requirement for everybody and can arise at any time.

I have resolved that issue with the use of metatag and thought to share with all of you as how I resolved it.

Please refer the following the following line of code that you need to use it for the redirection purpose.

<meta http-equiv="refresh" content="2;URL=http://sharepoint2007/sites/contentmodification">




Where you need to use it?
-Open the site where you need to set up the redirection
-site actions
-edit page
-add the content editor WebPart
-Give the reference of this file.

You must be wondering what is meant by reference?
-Created any document library or use the existing one
-Copy the redirection script/line in a notepad
-Upload this notepad in a document library
-click on the notepad direct and copy the link from the browser.
-Go back to the site where you have added the content editor WebPart
-Enter the link inside the WebPart which will take the reference of that notepad.

That’s it. You are done with redirection.

If you have any queries/questions based on the same then please let me know, Thank you.