Today I encountered a very strange error yet again. I had imported an Organization from CRM Online to On-Premise.
In CRM Online, by default the Activity-Feed Solution is present, but since I didn’t wanted it in my current scenario; I tried to delete the solution as discussed by Microsoft Support in the following Article :-
But it didn’t happened so, instead it threw an error stating,
when I downloaded the log file to look more deeper into the matter, it just said “Generic SQL Error”
<ErrorCode>-2147204784</ErrorCode> <ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" /> <Message>Generic SQL error.</Message> <Timestamp>2013-02-13T05:22:40.3301912Z</Timestamp>
I couldn’t figure out anything with that error; I even tried to search in forums and various blogs but in vain.
Finally in order to look deep into the SQL Error I used SQL Server Profiler.
Thanks to Erik Pool for explaining each and every step very minutely about using SQL Profiler in case of “Generic SQL Errors”.
From the Trace i figured out that the Error was due to insufficient permission to run the Stored Procedure DBCC FLUSHPROCINDB for NT AUTHORITY\NETWORK SERVICE.
- Move to SQL Server->Security->Logins->NT AUTHORITY\NETWORK SERVICE
- Right click and move to properties, then change the User Mapping Role accordingly.
I gave the permissions of DB_Owner and DDLAdmin for the time being and tried to delete the Activity Feed Solution once again.
And the magic was done !!! Solution was deleted without any error this time.
Hope someone will find this blog helpful to figure out the ways to troubleshoot Generic SQL error / SQL Server Error.