Client Management Suite

 View Only
  • 1.  New SQL Report - default Parameterised Query given

    Posted Sep 12, 2012 09:11 AM

    Ok so im liking the 7.1 console a lot.. in 6 when i created collections you had to use the default sql they give you and add your sql to it to create dynamic collections... i see in 7.1 this is not the case anymore.. really like that..

     

    now back on track...

    I have been creating reports in our dev 7.1 to get things rolling. I deleted all the sql code it comes with and it works so my question is...

     

    any reason to use the default sql when you click new sql report?

     

    i delete all of this and put my own in.. example...

    delete:

     

    DECLARE @v1_TrusteeScope nvarchar(max)
       SET @v1_TrusteeScope = N'%TrusteeScope%'
    SELECT
       [vri2_Resource].[Guid] AS [_ItemGuid],
       [vri2_Resource].[Name]
    FROM
       [vRM_Resource_Item] AS [vri2_Resource]
    WHERE
       (
          ([vri2_Resource].[Guid] IN (SELECT [ResourceGuid] FROM [ScopeMembership] WHERE [ScopeCollectionGuid] IN (SELECT [ScopeCollectionGuid] FROM dbo.fnGetTrusteeScopeCollections(@v1_TrusteeScope))))
       )
     
     
    Paste from sql management studio (CompName is a parameter and works)
     
    Select t1.[_ResourceGuid] as _ItemGuid, t1.[Name], t0.[DisplayName], t0.[DisplayVersion], t0.[Publisher]
    From [Inv_AddRemoveProgram] t0 INNER JOIN
    [Inv_AeX_AC_Identification] t1 on t0.[_ResourceGuid] = t1.[_ResourceGuid]
    where t0.[DisplayVersion] is not null and t1.[Name] like '%CompName%'
    order by t0.[DisplayName]
     
     


  • 2.  RE: New SQL Report - default Parameterised Query given
    Best Answer

    Posted Sep 17, 2012 10:10 AM

    The default is in there mainly for security reasons. It scopes report results to resources the user running the report has permission to see, else reports will show everything(I think they run with application credentials) This only gets important in environments with dedicated secured organisational units which need to be separated from the others.

     



  • 3.  RE: New SQL Report - default Parameterised Query given

    Posted Sep 17, 2012 10:41 AM

    ok so if i wanted security involved stuff i would keep it and place my sql inside of it.. yeah not something we need to worry about..

    thanks