that is not to the actual user
This joins the results of the SP that gets the policy for the UMR from
the MP and joins it to the apps.
The key I was looking for is this line
Left Join fn_ListApplicationCIs(1033) Apps ON PA.PolicyID Like
Apps.ModelName + '%'
if exists (select * from tempdb.dbo.sysobjects o where o.xtype in
('U') and o.id = object_id(N'tempdb..#UserPolicyAssignments'))
DROP TABLE #UserPolicyAssignments;
CREATE TABLE #UserPolicyAssignments (
PolicyAssignmentID NVarChar(50),
Version nvarchar(10),
LastUpdateTime datetime,
Body nvarchar(max),
IsTombstoned int,
BodySignature nvarchar(max),
HashAlgId int,
HashAlgOID nvarchar(50),
InProcess Bit
)
INSERT INTO #UserPolicyAssignments
EXEC MP_GetUserAndUserGroupPolicyAssignments
'mydomain\themsel01','','','','','GUID:2a8ff5b9-92e3-463d-8e59-73ec206f15d1','2014-02-11'
SELECT
Apps.DisplayName,
A.AssignmentName,
PA.PADBID,
PA.PolicyID,
UPA.PolicyAssignmentID,
UPA.LastUpdateTime,
UPA.Body,
UPA.IsTombstoned
FROM #UserPolicyAssignments UPA
LEFT JOIN PolicyAssignment PA on PA.PolicyAssignmentID = UPA.PolicyAssignmentID
Left Join fn_ListApplicationCIs(1033) Apps ON PA.PolicyID Like
Apps.ModelName + '%'
Left Join CM_CEN.dbo.vCI_AssignmentTargetedCIs ACI on ACI.CI_ID = Apps.CI_ID
Left Join CM_CEN.dbo.vCI_CIAssignments A on A.AssignmentID = ACI.AssignmentID
Where Apps.CI_ID Is Not null
On Thu, Feb 13, 2014 at 2:45 PM, Dzikowski, Michael
<[email protected]> wrote:
> Wouldn't it be this:
> v_ApplicationAssignment
>
>
> Michael Dzikowski
> Senior Systems Engineer | Ally Technical Infrastructure - Windows Hosting
>
>
> -----Original Message-----
> From: [email protected] [mailto:[email protected]]
> On Behalf Of Todd Hemsell
> Sent: Thursday, February 13, 2014 3:39 PM
> To: [email protected]
> Subject: [mssms] How Application relates to PolicyAssignmentID or PADBID
>
> How do you get the PolicyID, PolicyAssignmentID, or PADBID of an application?
>
> I can select policy, and I can select apps, but how to join them?
>
> As I am writing this I am starting to suspect it is through the advertisement
> or deployment classes.
>
> anyone know for sure?
>
>
>
>
>
>
>