Hi all,
Thanks for all of your replies, I am getting this error for three particular solutions and all of them contain plugins. After I further analyzing, I resolved this issue by following script:
DECLARE @pluginSolutionid NVARCHAR(50)
DECLARE @configSolutionid NVARCHAR(50)
DECLARE @docSolutionid NVARCHAR(50)
SELECT @pluginSolutionid=solutionId FROM Solution WHERE UniqueName ='Solution1'
SELECT @configSolutionid=solutionId FROM Solution WHERE UniqueName ='Solution2'
SELECT @docSolutionid=solutionId FROM Solution WHERE UniqueName ='Solution3'
----delete Plugin Assembly
DELETE FROM PluginAssemblyBase WHERE SolutionId IN (@pluginSolutionid,@configSolutionid,@docSolutionid)
OR supportingsolutionid IN(@pluginSolutionid,@configSolutionid,@docSolutionid) ;
----delete Plugin
DELETE FROM PluginTypeBase WHERE PluginTypeid IN(
SELECT ID FROM (
SELECT PluginTypeBase.PluginTypeId ID, PluginAssemblyBase.PluginAssemblyid AS assemblyid
FROM PluginTypeBase LEFT JOIN PluginAssemblyBase ON PluginTypeBase.PluginAssemblyid = PluginAssemblyBase.PluginAssemblyid )
AS A WHERE A.assemblyid IS NULL
)
----delete Sdk Message Processing Step
DELETE from SdkMessageProcessingStepBase WHERE SdkMessageProcessingStepid IN(
SELECT ID FROM (
SELECT SdkMessageProcessingStepBase.SdkMessageProcessingStepid ID, PluginTypeBase.plugintypeid AS plugin
FROM SdkMessageProcessingStepBase LEFT JOIN PluginTypeBase ON SdkMessageProcessingStepBase.plugintypeid= PluginTypeBase.plugintypeid )
AS A WHERE A.plugin IS NULL
)
----delete images
DELETE from SdkMessageProcessingStepImageBase where SdkMessageProcessingStepImageID IN(
SELECT ID FROM (
SELECT SdkMessageProcessingStepImageBase.SdkMessageProcessingStepImageID ID, SdkMessageProcessingStepBase.SdkMessageProcessingStepID AS StepID
FROM SdkMessageProcessingStepImageBase LEFT JOIN SdkMessageProcessingStepBase ON SdkMessageProcessingStepBase.SdkMessageProcessingStepid= SdkMessageProcessingStepImageBase.SdkMessageProcessingStepid )
as A WHERE A.StepID IS NULL
)
----delete dependencies
DELETE FROM Dependencybase WHERE DependentComponentNodeId IN ( SELECT dependencynodeid
FROM [CaRESmoke_MSCRM].[dbo].[DependencyNodeBase] WHERE ComponentType IN (90,91,92,93) AND basesolutionid IN (@pluginSolutionid,@configSolutionid,@docSolutionid))
or RequiredComponentNodeId IN( SELECT dependencynodeid
FROM [CaRESmoke_MSCRM].[dbo].[DependencyNodeBase] WHERE ComponentType IN (90,91,92,93) AND basesolutionid IN (@pluginSolutionid,@configSolutionid,@docSolutionid))
So far works fine.
If any other negative impacts I will post here and let you guys know.