Showing posts with label SQL Server. Show all posts
Showing posts with label SQL Server. Show all posts

MOSS 2007 Error While Central Administration Navigation

Hi There,

We got an error while using SharePoint 2007 or MOSS 2007 in our production farm that whenever we navigate to few links in MOSS 2007, the pages seems crashing. SharePoint threw some unexpected errors with a correlation ID. Nothing special found in ULS logs regarding this crash. SharePoint was working fine with no issue. Each and every MOSS site was working as expected. The issue was only with SharePoint 2007 Central Administration. After some troubleshooting we were able to locate some error and noticed that its throwing from SQL server side not any SharePoint crash. Digging out more confirmed its a SQL server issue. Below are the error details.

Error:
A transport-level error has occurred when receiving results from the server. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.)   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)
   at System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult asyncResult, TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParserStateObject.ReadNetworkPacket()
   at System.Data.SqlClient.TdsParserStateObject.ReadBuffer()
   at System.Data.SqlClient.TdsParserStateObject.ReadByteArray(Byte[] buff, Int32 offset, Int32 len)
   at System.Data.SqlClient.TdsParserStateObject.ReadString(Int32 length)
   at System.Data.SqlClient.TdsParser.ReadSqlStringValue(SqlBuffer value, Byte type, Int32 length, Encoding encoding, Boolean isPlp, TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParser.ReadSqlValue(SqlBuffer value, SqlMetaDataPriv md, Int32 length, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlDataReader.ReadColumnData()
   at System.Data.SqlClient.SqlDataReader.ReadColumn(Int32 i, Boolean setTimeout)
   at System.Data.SqlClient.SqlDataReader.GetString(Int32 i)
   at Microsoft.SharePoint.Administration.SPConfigurationDatabase.FetchObject(Guid id)
   at Microsoft.SharePoint.Administration.SPConfigurationDatabase.GetObject(Guid id, Boolean checkInMemoryCache)
   at Microsoft.SharePoint.Administration.SPConfigurationDatabase.GetObject(Guid id)
   at Microsoft.SharePoint.Administration.SPPersistedObjectCollection`1.get_BackingList()
   at Microsoft.SharePoint.Administration.SPPersistedObjectCollection`1.GetEnumerator()
   at Microsoft.SharePoint.ApplicationPages.SelectWebApplicationDataSourceView.FillDataTable(DataTable table, DataSourceSelectArguments selectArguments)
   at Microsoft.SharePoint.WebControls.DataTableDataSourceView.Select(DataSourceSelectArguments selectArguments)
   at Microsoft.SharePoint.WebControls.AdministrationDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments)
   at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback)
   at System.Web.UI.WebControls.DataBoundControl.PerformSelect()
   at System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound()
   at System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls()
   at System.Web.UI.Control.EnsureChildControls()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


Solution:

We found that there is a table in SharePoint_Config with name Objects. We selected all rows from that table and found the same error. The reason was an uncommitted SQL query. A row in this table was not successfully committed and SQL server was failing while selecting all items. Luckily we found that item (by selecting the top items etc) with some tricks. The item ID was '05c7c555-736e-45ac-ab0a-8a47012877e3'. We did a trick and quried all items except the problematic one and it worked.

select * from objects where id <> '05c7c555-736e-45ac-ab0a-8a47012877e3'

Now we found the problem and tried to fix using below technique which worked fine.

ALTER DATABASE SharePoint_Config SET SINGLE_USER WITH ROLLBACK IMMEDIATE
GO
ALTER DATABASE SharePoint_Config SET SINGLE_USER
GO
DBCC CHECKDB (SharePoint_Config, REPAIR_ALLOW_DATA_LOSS)
GO

Now repair the table.

USE SharePoint_Config;
GO
DBCC CHECKTABLE ('dbo.Objects',REPAIR_REBUILD)
GO

Repairing the table automatically deleted the uncommitted row and and we were able to select all items from that table. Magically the CA returned back and everything seems working now.


Happy SharePointing...!

SharePoint: The EXECUTE permission was denied on the object 'xp_sqlagent_notify

Hi There,

I was working with SharePoint SSRS and the reports were working fine. However when i click "View Report History" it gave me the below error.


Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerStorageException: An error occurred within the report server database.  This may be due to a connection failure, timeout or low disk condition within the database. ---> System.Data.SqlClient.SqlException: The EXECUTE permission was denied on the object 'xp_sqlagent_notify', database 'mssqlsystemresource', schema 'sys'. 

  

I found an answer here but i was looking for some systematic way than running SQL Server queries. So i found a solution here which worked for me.

So the solution is:

1. Open SharePoint Central Administration > Application Management > Manage Service Applications
2. Click on your SQL Server Reporting Services Service Application
3. Click on “Provision Subscriptions and Alerts” link
4. Type a username and password for SQL Server which grants privilege to your SSRS service application pool. 
5. Save and try again

Boom....! It worked.

Happy SharePointing :)