SCCM Application Compatibility Toolkit Report Problem
I am running ACT with the Application Compatibility Toolkit Connector installed in SCCM SP2 R3 however I cannot get one of the reports to run. The ACT database has a SQL_Latin_General_CP1_CI_AS collation but SCCM uses Latin1_General_CI_AS and when
I run the report "Application Compatibility Toolkit Application Status for Computers in a specific collection" I get the error " cannot resolve the collation conflict between SQL_Latin_General_CP1_CI_AS and Latin1_General_CI_AS in the equal to operation.
I have pasted in the report below if anyone has any ideas on how to get this working or can point me in the right direction I would really appreciate it as my SQL knowledge is limited.
SET NOCOUNT ON
DECLARE @OsId NVARCHAR(32)
SELECT @OsId = osID FROM v_ACT_Deployment_OS WHERE displayName = @OsName
DECLARE @MyRatingDesc TABLE (ID INT, Description VARCHAR(100))
IF LOWER(@ApplicationStatus) = LOWER('Any Status')
INSERT INTO @MyRatingDesc (ID, Description) VALUES (4, '')
IF LOWER(@ApplicationStatus) = LOWER('Any Status') OR LOWER(@ApplicationStatus) = LOWER('Ready') OR LOWER(@ApplicationStatus) = LOWER('Ready or Minor Issues')
INSERT INTO @MyRatingDesc (ID, Description) VALUES (1, 'Ready')
IF LOWER(@ApplicationStatus) = LOWER('Any Status') OR LOWER(@ApplicationStatus) = LOWER('Minor Issues') OR LOWER(@ApplicationStatus) = LOWER('Ready or Minor Issues')
OR LOWER(@ApplicationStatus) = LOWER('Minor Issues or Major Issues')
INSERT INTO @MyRatingDesc (ID, Description) VALUES (2, 'Minor Issues')
IF LOWER(@ApplicationStatus) = LOWER('Any Status') OR LOWER(@ApplicationStatus) = LOWER('Major Issues') OR LOWER(@ApplicationStatus) = LOWER('Minor Issues or Major
Issues')
INSERT INTO @MyRatingDesc (ID, Description) VALUES (3, 'Major Issues')
DECLARE @VendorRatingDesc TABLE (ID INT, Description VARCHAR(100))
INSERT INTO @VendorRatingDesc (ID, Description) VALUES (100, '')
INSERT INTO @VendorRatingDesc (ID, Description) VALUES (10, 'Ready')
INSERT INTO @VendorRatingDesc (ID, Description) VALUES (20, 'Ready')
INSERT INTO @VendorRatingDesc (ID, Description) VALUES (30, 'Ready')
INSERT INTO @VendorRatingDesc (ID, Description) VALUES (40, 'Minor Issues')
INSERT INTO @VendorRatingDesc (ID, Description) VALUES (50, 'Minor Issues')
INSERT INTO @VendorRatingDesc (ID, Description) VALUES (60, 'Major Issues')
IF LOWER(@ApplicationName) = LOWER('*')
SELECT @ApplicationName = '%'
SELECT AR.Name AS 'Computer Name', @OsName AS 'Operating System Name', AR.appName AS 'Application Name', ISNULL(AR.version, '') AS 'Version', ISNULL(AR.vendorName,
'') AS 'Vendor', AR.language AS 'Language', MD.Description AS 'My Assessment', VR.Description AS 'Vendor Assessment', ISNULL(AR.numCommGreen, 0) AS 'Community rating no issues', ISNULL(AR.numCommYellow, 0) AS 'Community rating has minor issues', ISNULL(AR.numCommRed,
0) AS 'Community rating has major issues', AR.appId AS 'Application ID'
FROM (
SELECT FCM.Name, A.identity_hash AS appId, A.appName, A.version, A.vendorName,
A.language, MIN(AR.myRating) AS myRating, MIN(AR.vendorRating) AS vendorRating, MAX(ISNULL(AR.numCommGreen, 0)) AS numCommGreen, MAX(ISNULL(AR.numCommYellow, 0)) AS numCommYellow, MAX(ISNULL(AR.numCommRed, 0)) AS numCommRed
FROM v_ACT_Applications A WITH (NOLOCK)
JOIN v_ACT_Application_Report AR WITH (NOLOCK)
ON AR.appID = A.identity_hash
JOIN v_ACT_Machine_Installed_App MIA WITH (NOLOCK)
ON MIA.appID = AR.appID
JOIN v_FullCollectionMembership FCM WITH (NOLOCK)
ON MIA.smsGuid COLLATE DATABASE_DEFAULT = '{' + RTRIM(SUBSTRING(FCM.SMSID, 6, 100)) + '}' COLLATE DATABASE_DEFAULT
WHERE AR.osID = @OsId AND FCM.CollectionID = @CollID AND FCM.IsClient
= 1 AND A.appName LIKE @ApplicationName
GROUP BY A.identity_hash, A.appName, A.version, A.vendorName, A.language,
FCM.Name
) AS AR
JOIN @MyRatingDesc MD ON MD.ID = AR.myRating
JOIN @VendorRatingDesc VR ON VR.ID = AR.vendorRating
ORDER BY AR.appName
May 18th, 2012 1:29pm
Hi Richard
I came across this issue many years ago and after alot of hair pulling I can across this blog post
http://blog.sqlauthority.com/2007/06/11/sql-server-cannot-resolve-collation-conflict-for-equal-to-operation/ It help me resolve my issue and I hope it can help resolve your. The difficulty will be finding the columns that have different collations.
Regards
Free Windows Admin Tool Kit Click here and download it now
May 26th, 2012 9:38am