We are having a big problem trying to delete a managed solution.It has more than 60 plugin steps and 20 processes and many entities.I disabled all plugin We run into this exception:
> Unhandled Exception:
> System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault,
> Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral,
> PublicKeyToken=31bf3856ad364e35]]: Generic SQL error.Detail:
> <OrganizationServiceFault
> xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
> xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
> <ErrorCode>-2147204784</ErrorCode> <ErrorDetails
> xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic"
> /> <Message>Generic SQL error.</Message>
> <Timestamp>2013-11-13T07:39:55.2285423Z</Timestamp> <InnerFault
> i:nil="true" /> <TraceText i:nil="true" />
> </OrganizationServiceFault>
Have you done any additional customizations or development with the entities in the managed solution? I would check for dependencies there. Things like attributes on related entities from the managed ones, associated views from the managed entities on the non managed ones, and things like that. Also if there are any attributes on existing entities like account, they will will need to be removed from views and forms as well.
If you aren't 100% sure you should be able to go into the managed solution and see the dependencies for each entity there.
If that doesn't help since you are getting a Generic Sql error, I would suggest running a SQL trace and then uninstalling it. That should help point the way to the issue.