I have looked into database and I've found the stored procedure "spAC_GetComputerBySoftwareProduct" and "spAC_GetComputersBySoftwareComponent" that return the same error that I see in Altiris Log Viewer:
Msg 207, Level 16, State 1, Procedure spAC_GetComputersBySoftwareProduct, Line 40
Invalid column name 'FileResourceGuid'.
The statement has been terminated.
I have compared this stored procedure with the same that I have in my development environment and I have see that aren't equals.
For example this is the SP that not work:
USE [Symantec_CMDB]
GO
/****** Object: StoredProcedure [dbo].[spAC_GetComputersBySoftwareProduct] Script Date: 12/27/2011 15:28:25 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER Procedure [dbo].[spAC_GetComputersBySoftwareProduct]
(
@SoftwareComponentGuids varchar(max),
@ComputerName nvarchar(250),
@SelectTop bit,
@Trustee varchar(max)
)
As
Set NoCount On
If Exists (SELECT * FROM sysobjects WHERE name = 'Inv_Software_Execution') --make sure inventory is installed
Begin
if(@SelectTop = 1)
Begin
SELECT TOP 500 vc.[Guid] AS [ResourceGuid]
, vc.[Name]
, vc.[OS Name]
, ISNULL(usage.RunCount,0) AS UsedCount
, '' As DeliveryStatus
, prod.Guid As SoftwareComponentGuid
, prod.[Name] As SoftwareName
, usage.LastStart
, usage.InstallDate
FROM [fnAC_SWProductUsed](@SoftwareComponentGuids) usage
JOIN vRM_Software_Product_Item prod
ON prod.Guid = usage.SoftwareProductGuid
JOIN vComputer vc
ON vc.Guid = usage._ResourceGuid
WHERE vc.Guid IN (Select ResourceGuid From [fnGetTrusteeScopedResources](@Trustee))
AND vc.IsManaged = 1
AND (@ComputerName = '%%' OR LOWER(vc.Name) LIKE @ComputerName)
ORDER BY vc.Name ASC
End
Else
Begin
SELECT vc.[Guid] AS [ResourceGuid]
, vc.[Name]
, vc.[OS Name]
, ISNULL(usage.RunCount,0) AS UsedCount
, '' As DeliveryStatus
, prod.Guid As SoftwareComponentGuid
, prod.[Name] As SoftwareName
, usage.LastStart
, usage.InstallDate
FROM [fnAC_SWProductUsed](@SoftwareComponentGuids) usage
JOIN vRM_Software_Product_Item prod
ON prod.Guid = usage.SoftwareProductGuid
JOIN vComputer vc
ON vc.Guid = usage._ResourceGuid
WHERE vc.Guid IN (Select ResourceGuid From [fnGetTrusteeScopedResources](@Trustee))
AND vc.IsManaged = 1
AND (@ComputerName = '%%' OR LOWER(vc.Name) LIKE @ComputerName)
ORDER BY vc.Name ASC
End
End
and this is the SP that work:
SE [Symantec_CMDB]
GO
/****** Object: StoredProcedure [dbo].[spAC_GetComputersBySoftwareProduct] Script Date: 12/27/2011 15:10:01 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER Procedure [dbo].[spAC_GetComputersBySoftwareProduct]
(
@SoftwareComponentGuids varchar(max),
@ComputerName nvarchar(250),
@SelectTop bit,
@Trustee varchar(max)
)
As
Set NoCount On
If Exists (SELECT * FROM sysobjects WHERE name = 'Inv_Software_Execution') --make sure inventory is installed
Begin
if(@SelectTop = 1)
Begin
SELECT TOP 500 vc.[Guid] AS [ResourceGuid]
, vc.[Name]
, ident.[OS Name]
, ISNULL(usage.RunCount,0) AS UsedCount
, '' As DeliveryStatus
, prod.Guid As SoftwareComponentGuid
, prod.[Name] As SoftwareName
, usage.LastStart
, usage.InstallDate
FROM [fnAC_SWProductUsed](@SoftwareComponentGuids) usage
JOIN vRM_Software_Product_Item prod
ON prod.Guid = usage.SoftwareProductGuid
JOIN vRM_Computer_Item vc
ON vc.Guid = usage._ResourceGuid
JOIN Inv_AeX_AC_Identification ident
ON ident._ResourceGuid = vc.Guid
WHERE vc.Guid IN (Select ResourceGuid From [fnGetTrusteeScopedResources](@Trustee))
AND vc.IsManaged = 1
AND LOWER(vc.Name) LIKE @ComputerName
ORDER BY vc.Name ASC
End
Else
Begin
SELECT vc.[Guid] AS [ResourceGuid]
, vc.[Name]
, ident.[OS Name]
, ISNULL(usage.RunCount,0) AS UsedCount
, '' As DeliveryStatus
, prod.Guid As SoftwareComponentGuid
, prod.[Name] As SoftwareName
, usage.LastStart
, usage.InstallDate
FROM [fnAC_SWProductUsed](@SoftwareComponentGuids) usage
JOIN vRM_Software_Product_Item prod
ON prod.Guid = usage.SoftwareProductGuid
JOIN vRM_Computer_Item vc
ON vc.Guid = usage._ResourceGuid
JOIN Inv_AeX_AC_Identification ident
ON ident._ResourceGuid = vc.Guid
WHERE vc.Guid IN (Select ResourceGuid From [fnGetTrusteeScopedResources](@Trustee))
AND vc.IsManaged = 1
AND LOWER(vc.Name) LIKE @ComputerName
ORDER BY vc.Name ASC
End
End
I don't understand why are different.... and now my dubt is: are these the only differents?