none
Difference between System.Name and System Resource.Name attributes?

    שאלה

  • Hi SCCM guru's,

    Can someone tell me the different between the System.Name and System Resource.Name attributes?

    i.e. is there any difference in result between the following 2 queries (I am trying to understand why one shows as a JOIN operation and what the implication to the query result is)

    select distinct SMS_R_System.Name from  SMS_R_System inner join SMS_G_System_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID = SMS_R_System.ResourceId where SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName = "Adobe Reader 9.3" and SMS_R_System.Name not in (select distinct SMS_R_System.Name from  SMS_R_System where SMS_R_System.SystemGroupName = "MYDOMAIN\\App_AdobeAcrobatReader")

    and

    select distinct SMS_R_System.Name from  SMS_R_System inner join SMS_G_System_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_SYSTEM on SMS_G_System_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName = "Adobe Reader 9.3" and SMS_G_System_SYSTEM.Name not in (select distinct SMS_R_System.Name from  SMS_R_System where SMS_R_System.SystemGroupName = "MYDOMAIN\\App_AdobeAcrobatReader")

    • הועבר על-ידי Torsten [MVP]MVP, Moderator יום שישי 14 מאי 2010 13:10 moved to Inventory subforum (From:Configuration Manager Software Distribution)
    יום שישי 14 מאי 2010 10:21

תשובות

  • resourceid is the unique identifier of the resource, in this case computer, in the SCCM database. Anywhere there's info about that computer the resourceID will be there. That's normally what we use to join views etc.

     

     

     


    John Marcum | http://myitforum.com/cs2/blogs/jmarcum |
    שבת 15 מאי 2010 02:21
    מנחה דיון
  • Think of ResourceID as the PrimaryKey for the Machine.  It will never change and is used to link all other table data together.  It is more reliable than performing Joins with computer names.
    http://www.sccm-tools.com http://sms-hints-tricks.blogspot.com
    יום שני 17 מאי 2010 16:19
    מנחה דיון

כל התגובות

  • In your second query I see no reason to have the second join. Whichever one you use I would change it, instead of saying and
    SMS_G_System_SYSTEM.Name not in I would use SMS_R_System.ResourceID.

    Like this:

    and SMS_R_System.ResourceId not in   (select SMS_R_System.ResourceId    from  SMS_R_System where SMS_R_System.SystemGroupName = "MYDOMAIN\\App_AdobeAcrobatReader")

     

     

     


    John Marcum | http://myitforum.com/cs2/blogs/jmarcum |
    יום שישי 14 מאי 2010 13:09
    מנחה דיון
  • SMS_G_System_SYSTEM is populated from hardware inventory and SMS_R_System is populated from discoveries. They should be the same, but it is possible, although unlikely, that during a system name change they will be out of synch.
    Jason | http://myitforum.com/cs2/blogs/jsandys | http://blogs.catapultsystems.com/jsandys/default.aspx | Twitter @JasonSandys
    • הוצע כתשובה על-ידי TerpsFan2001 יום חמישי 11 פברואר 2016 19:15
    יום שישי 14 מאי 2010 16:15
    מנחה דיון
  • Hi John,

    I actually did these query's using the Query Design View (point and click) - and that is why I didn't understand why in Query Language view SCCM had the second join operator inserted when using the System Resource.Name.

     

    Also re: ResourceID, I am not sure how I can use that to evaluate whether a PC is in a AD group? Isn't the ResourceID property an internal SCCM property only (and not related to AD)?

    The point of the query is to target app installation/uninstallation based on whether the PC belongs to an AD group.

    Please feel free to tell me if I can do this in a better way.....

    Thanks in advance!

    יום שישי 14 מאי 2010 21:50
  • I trust resource ID more than I trust name. It's just a personal preference for me. Any view that has the name will also have the resouirce ID however the resourceid wont' change the name can. Your way will work too it's just now how I would do it.

     

     

     

     


    John Marcum | http://myitforum.com/cs2/blogs/jmarcum |
    יום שישי 14 מאי 2010 22:25
    מנחה דיון
  • Hi John,

    I think my problem is that I dont quite understand what the ResourceID property is?

    I would use ResourceID as you recommended but would like to understand what it is exactly....

    שבת 15 מאי 2010 01:24
  • resourceid is the unique identifier of the resource, in this case computer, in the SCCM database. Anywhere there's info about that computer the resourceID will be there. That's normally what we use to join views etc.

     

     

     


    John Marcum | http://myitforum.com/cs2/blogs/jmarcum |
    שבת 15 מאי 2010 02:21
    מנחה דיון
  • Think of ResourceID as the PrimaryKey for the Machine.  It will never change and is used to link all other table data together.  It is more reliable than performing Joins with computer names.
    http://www.sccm-tools.com http://sms-hints-tricks.blogspot.com
    יום שני 17 מאי 2010 16:19
    מנחה דיון
  • Neither of these answers answer his first question, what's the difference between System and System Resource. That's what landed me at this question only to get an unrelated answer. You may append your additional information but for moderators, this doesn't answer the question, mark it as helpful if you must but don't mark it as the answer please.
    יום שלישי 15 מאי 2012 20:02
  • My answer above does directly address that though: SMS_G_System_SYSTEM is populated from hardware inventory and SMS_R_System is populated from discoveries. They should be the same, but it is possible, although unlikely, that during a system name change they will be out of synch.


    Jason | http://blog.configmgrftw.com | Twitter @JasonSandys

    • הוצע כתשובה על-ידי Cliff Steinman יום רביעי 03 אפריל 2013 17:52
    יום שלישי 15 מאי 2012 20:04
    מנחה דיון
  • Sorry to revive a very old thread but it is the closest to an answer I've found.

    Could someone expand on the differences please?  If I run the two queries below I get different results.  The first query returns all system starting with D1.  The second query returns the same as the first query and also some systems with names not starting with D1

    I get that the two are obtained in different ways but surely the .name attribute should be the same.

    select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System where SMS_R_System.Name like "D1%

    select SMS_R_System.ResourceId, SMS_R_System.ResourceType, SMS_R_System.Name, SMS_R_System.SMSUniqueIdentifier, SMS_R_System.ResourceDomainORWorkgroup, SMS_R_System.Client from  SMS_R_System inner join SMS_G_System_SYSTEM on SMS_G_System_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_SYSTEM.Name like "D1%"

    Thanks in advance

    יום רביעי 21 דצמבר 2016 09:50
  • both queries will only return computers that start with D1. However if a computer has been renamed and inventory has not occurred. You may get slightly different results.

    Garth Jones

    Blog: http://www.enhansoft.com/blog Old Blog: http://smsug.ca/blogs/garth_jones/default.aspx

    Twitter: @GarthMJ Book: System Center Configuration Manager Reporting Unleased

    יום רביעי 21 דצמבר 2016 12:20
    מנחה דיון
  • What is the difference between the System.Name and System Resource.Name attributes??
    יום שישי 15 יוני 2018 15:59
  • What is the difference between the System.Name and System Resource.Name attributes??
    In a nutshell, they come from different inventory methods. What exactly are you looking for?

    Garth Jones

    Blog: https://www.enhansoft.com/blog Old Blog: https://sccmug.ca/

    Twitter: @GarthMJ Book: System Center Configuration Manager Reporting Unleashed

    יום שישי 15 יוני 2018 16:31
    מנחה דיון
  • I think what most people (and me) are wanting here is, how would a person determine which one to use? They appear to be identical, yet they are not because they produce different results.
    יום חמישי 12 יולי 2018 12:54
  • With all queries in SCCM, you should always use the System Resource WQL view.  Keep in mind that you should always use ResourceID to join two WQL views together. 

    Garth Jones

    Blog: https://www.enhansoft.com/blog Old Blog: https://sccmug.ca/

    Twitter: @GarthMJ Book: System Center Configuration Manager Reporting Unleashed

    יום חמישי 12 יולי 2018 13:43
    מנחה דיון