ad_site_name0 definitionHi all, <br/> <br/> I am trying to create a report of all machines discovered by SCCM and group them by country, region<br/> I couldn't find any country, region info in the database but I found &quot;ad_site_name0&quot; in table V_R_System.<br/> It looks like the country-site combination retrieved from Active Directory(eg:&quot;CA-TOR&quot; stands for Canada-Toronto) but I am not sure.<br/> Anyone knows how SCCM collect data for this fields?<br/> <br/> Does SCCM collect AD info(say:DN) and store it somewhere ?<br/> <br/> Thanks© 2009 Microsoft Corporation. All rights reserved.Thu, 16 Jul 2009 12:13:57 Z2ed5dd90-f697-481a-a623-3944db3038behttp://social.technet.microsoft.com/Forums/en-US/configmgrgeneral/thread/2ed5dd90-f697-481a-a623-3944db3038be#2ed5dd90-f697-481a-a623-3944db3038behttp://social.technet.microsoft.com/Forums/en-US/configmgrgeneral/thread/2ed5dd90-f697-481a-a623-3944db3038be#2ed5dd90-f697-481a-a623-3944db3038beZZ02http://social.technet.microsoft.com/Profile/en-US/?user=ZZ02ad_site_name0 definitionHi all, <br/> <br/> I am trying to create a report of all machines discovered by SCCM and group them by country, region<br/> I couldn't find any country, region info in the database but I found &quot;ad_site_name0&quot; in table V_R_System.<br/> It looks like the country-site combination retrieved from Active Directory(eg:&quot;CA-TOR&quot; stands for Canada-Toronto) but I am not sure.<br/> Anyone knows how SCCM collect data for this fields?<br/> <br/> Does SCCM collect AD info(say:DN) and store it somewhere ?<br/> <br/> ThanksThu, 02 Jul 2009 08:38:23 Z2009-07-02T08:38:23Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrgeneral/thread/2ed5dd90-f697-481a-a623-3944db3038be#513f353d-8422-4df0-ab78-42295982bd29http://social.technet.microsoft.com/Forums/en-US/configmgrgeneral/thread/2ed5dd90-f697-481a-a623-3944db3038be#513f353d-8422-4df0-ab78-42295982bd29Garth Joneshttp://social.technet.microsoft.com/Profile/en-US/?user=Garth%20Jonesad_site_name0 definition<p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:small"><span style="font-family:Calibri">The list of which attributes that ConfigMgr is collecting can be found on the AD Attribute tab for both AD System Discovery and AD User Discovery.</span></span></p><hr class="sig">http://www.enhansoft.com/Thu, 02 Jul 2009 10:28:59 Z2009-07-02T10:28:59Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrgeneral/thread/2ed5dd90-f697-481a-a623-3944db3038be#7d24d323-1b78-4847-b343-f8829383be38http://social.technet.microsoft.com/Forums/en-US/configmgrgeneral/thread/2ed5dd90-f697-481a-a623-3944db3038be#7d24d323-1b78-4847-b343-f8829383be38Jason Sandyshttp://social.technet.microsoft.com/Profile/en-US/?user=Jason%20Sandysad_site_name0 definitionThis attribute corresponds to the name that your AD administrators assigned to the AD sites that the machine is a member of. Systems have no way of knowing what country that they are in unless you tell them where they are.<hr class="sig">Jason | http://myitforum.com/cs2/blogs/jsandys | Twitter @JasonSandys Thu, 02 Jul 2009 13:52:53 Z2009-07-02T13:52:53Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrgeneral/thread/2ed5dd90-f697-481a-a623-3944db3038be#975f0729-2dbb-4325-9ac4-256238d319fchttp://social.technet.microsoft.com/Forums/en-US/configmgrgeneral/thread/2ed5dd90-f697-481a-a623-3944db3038be#975f0729-2dbb-4325-9ac4-256238d319fcZZ02http://social.technet.microsoft.com/Profile/en-US/?user=ZZ02ad_site_name0 definitionThanks Garth and Jason !<br/> <br/> I am trying to modify one of the default Asset Intelligence Report <br/> <em>License 01A - Microsoft license ledger for Microsoft License Statements</em> <br/> so it grouped by Country, Region.<br/> <br/> I thought may be I can use the value of &quot;Canonical name of object&quot;(found under object tab if I select the property of a computer in <strong>Active Directory Users and Computers</strong> under Admin tools)<br/> &quot;Canonical name of object&quot; is a string like this: Domain/CA/TOR/Computers/machineName<br/> <br/> Does SCCM store it somewhere in the database ? <br/>Fri, 03 Jul 2009 01:34:41 Z2009-07-03T01:34:41Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrgeneral/thread/2ed5dd90-f697-481a-a623-3944db3038be#10884b2e-7403-476e-9e9d-b61e447d3775http://social.technet.microsoft.com/Forums/en-US/configmgrgeneral/thread/2ed5dd90-f697-481a-a623-3944db3038be#10884b2e-7403-476e-9e9d-b61e447d3775Jason Sandyshttp://social.technet.microsoft.com/Profile/en-US/?user=Jason%20Sandysad_site_name0 definitionIf you open the Active Directory System Discovery Properties from the Discovery Methods node under Site Settings and go to the Active Directory tab, all of the attributes captured by default are displayed. You can add distinguishedName to this tab -- you actually want the distiguished name of the object and not the canonical name, the cn only lists the last part of the name whereas the dn lists the entire fully qualified name.<hr class="sig">Jason | http://myitforum.com/cs2/blogs/jsandys | Twitter @JasonSandys Fri, 03 Jul 2009 03:21:09 Z2009-07-03T03:21:09Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrgeneral/thread/2ed5dd90-f697-481a-a623-3944db3038be#e0c06545-e779-4329-a6a5-59bd1a220ef2http://social.technet.microsoft.com/Forums/en-US/configmgrgeneral/thread/2ed5dd90-f697-481a-a623-3944db3038be#e0c06545-e779-4329-a6a5-59bd1a220ef2ZZ02http://social.technet.microsoft.com/Profile/en-US/?user=ZZ02ad_site_name0 definitionI need to rewite that report in TSQL. Where can I find these info(DN etc) in the SCCM database ? <br/> <em><br/> </em> Also I didn't get the following comments:<br/> <em>If you open the <strong>Active Directory System Discovery Properties</strong> from the <strong>Discovery Methods node</strong> under <strong>Site Settings</strong> and go to the Active Directory tab, all of the attributes captured by default are displayed. </em> <br/> I couldn't find the above bold items in <strong>Configuration Manager Console</strong> <br/> <br/> Thanks<br/>Fri, 03 Jul 2009 04:18:52 Z2009-07-03T04:18:52Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrgeneral/thread/2ed5dd90-f697-481a-a623-3944db3038be#c99c97c3-9361-41bd-977d-9eac87e34aa9http://social.technet.microsoft.com/Forums/en-US/configmgrgeneral/thread/2ed5dd90-f697-481a-a623-3944db3038be#c99c97c3-9361-41bd-977d-9eac87e34aa9Sherry Kissingerhttp://social.technet.microsoft.com/Profile/en-US/?user=Sherry%20Kissingerad_site_name0 definitionAre you basically looking for the OU a computer object is in?<br/><br/>Check out this: <a href="http://www.myitforum.com/forums/m_171634/tm.htm">http://www.myitforum.com/forums/m_171634/tm.htm</a> , the entry from jnelson993<hr class="sig">Standardize. Simplify. Automate.Fri, 03 Jul 2009 11:53:42 Z2009-07-03T11:53:42Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrgeneral/thread/2ed5dd90-f697-481a-a623-3944db3038be#7e75d4dd-0c4f-4b97-b702-a1eda95ac3edhttp://social.technet.microsoft.com/Forums/en-US/configmgrgeneral/thread/2ed5dd90-f697-481a-a623-3944db3038be#7e75d4dd-0c4f-4b97-b702-a1eda95ac3edJason Sandyshttp://social.technet.microsoft.com/Profile/en-US/?user=Jason%20Sandysad_site_name0 definitionYou first have to add the dn to the AD discovery: http://www.screencast.com/users/JasonSandys/folders/Default/media/6f77ae5a-3686-4f69-97b1-fc1c8ce585e3.<br/> <br/> Although note that the DN is not the ADsPath either which is what &quot;Domain/CA/TOR/Computers/machineName&quot; is. The ADsPath isn't actually an attribute of an object. So if that's truly what you want, you can try using the OU returned by the AD System Group discovery (as suggested by Sherry); however, it does not only return the OU that the object live in, it returns all of the parent OUs also.<br/> <br/> If you add dn to the discovery it will eventually live in v_SMS_R_SYSTEM. If you choose to use OUs, they live in v_RA_System_SystemOUName.<br/> <hr class=sig> Jason | http://myitforum.com/cs2/blogs/jsandys | Twitter @JasonSandysFri, 03 Jul 2009 18:22:12 Z2009-07-03T18:22:42Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrgeneral/thread/2ed5dd90-f697-481a-a623-3944db3038be#337d0922-0a5d-45b0-a14e-0ad258172f8ahttp://social.technet.microsoft.com/Forums/en-US/configmgrgeneral/thread/2ed5dd90-f697-481a-a623-3944db3038be#337d0922-0a5d-45b0-a14e-0ad258172f8aZZ02http://social.technet.microsoft.com/Profile/en-US/?user=ZZ02ad_site_name0 definitionThanks Jerry and Jason.Very helptul tips.<br/> One last questions. I extract the country codes from System_OU_Name0 recutrned from v_RA_System_SystemOUName and compared them with the country nodes in Active Directory Users and Computers. It seems that there are less records collected in the SCCM database(27 vs 36). how can have have a full number of country codes returned ?Tue, 07 Jul 2009 03:06:41 Z2009-07-07T03:06:41Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrgeneral/thread/2ed5dd90-f697-481a-a623-3944db3038be#926e207c-7586-4e44-bfaa-1dc0eb0d659dhttp://social.technet.microsoft.com/Forums/en-US/configmgrgeneral/thread/2ed5dd90-f697-481a-a623-3944db3038be#926e207c-7586-4e44-bfaa-1dc0eb0d659dJason Sandyshttp://social.technet.microsoft.com/Profile/en-US/?user=Jason%20Sandysad_site_name0 definitionYou probably do not have any discovered resources in those OUs: either the OU itself is empty, does not contain computer accounts (if you are only using system discovery), or the computer accounts that are in that OU were not resolvable to an IP address.<br/> <br/> Also, the OU memberships for non-assigned systems will not collected, so its possible that the systems in those OUs are not assigned to the site.<br/> <br/> For detailed information of what is and is not being discovered, check the adsysdis.log and the adsgrpys.log for info.<br/><hr class="sig">Jason | http://myitforum.com/cs2/blogs/jsandys | Twitter @JasonSandys Tue, 07 Jul 2009 03:19:20 Z2009-07-07T03:19:20Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrgeneral/thread/2ed5dd90-f697-481a-a623-3944db3038be#05b3b281-ddb9-4333-9b6f-ed0f96f4d5e4http://social.technet.microsoft.com/Forums/en-US/configmgrgeneral/thread/2ed5dd90-f697-481a-a623-3944db3038be#05b3b281-ddb9-4333-9b6f-ed0f96f4d5e4ZZ02http://social.technet.microsoft.com/Profile/en-US/?user=ZZ02ad_site_name0 definitionMany thanks for all the helpers so far.<br/> I modify the original <em>License 01A - Microsoft license ledger for Microsoft License Statements</em> to the following SQL.<br/> There are only few products returned when I try to test run a report by assigning a country code.<br/> It doesn't even return product &quot;Windows XP&quot; but I am sure there are windowsXP installed for the specified country code.<br/> What's wrong with it?<br/> <br/> ----------------------------------------------------------------------------------------------------------------------<br/> declare @CodeOption int    <br/> if len(@ChannelCode) = 0 OR @ChannelCode IS NULL    <br/>     select @CodeOption = 0    <br/> else if @ChannelCode = 'Not Available'    <br/>     select @CodeOption = 1    <br/> else    <br/>     select @CodeOption = 2    <br/> Select    <br/> <strong>        max(substring(v_RA_System_SystemOUName.System_OU_Name0,19,2)),<br/>         max(substring(v_RA_System_SystemOUName.System_OU_Name0,22,3)),</strong> <br/>         v_LU_MSProd.MLSFamilyName AS [Licensed Family Name],    <br/>         v_LU_MSProd.MLSProductName AS [Licensed Product Name],    <br/>         v_LU_MSProd.VersionCode AS [Version Code],    <br/>         count(v_GS_INSTALLED_SOFTWARE_MS.ResourceID) AS [Inventoried Quantity],    <br/>         CASE when (CAST(v_GS_INSTALLED_SOFTWARE_MS.ChannelCode0 as varchar) is NULL) then 'Not Available' Else    CAST(v_GS_INSTALLED_SOFTWARE_MS.ChannelCode0 as varchar) End AS [Channel],    <br/>         @CollectionID AS [Collection ID] <br/> from v_GS_INSTALLED_SOFTWARE_MS    <br/> Left Join v_LU_MSProd on  v_LU_MSProd.MPC = v_GS_INSTALLED_SOFTWARE_MS.MPC0    <br/> inner join v_FullCollectionMembership on v_FullCollectionMembership.ResourceID = v_GS_INSTALLED_SOFTWARE_MS.ResourceID    <br/> inner join v_R_System_Valid ON v_R_System_Valid.ResourceID = v_GS_INSTALLED_SOFTWARE_MS.ResourceID <br/> <strong>left JOIN dbo.v_RA_System_SystemOUName on v_RA_System_SystemOUName.ResourceID  = v_GS_INSTALLED_SOFTWARE_MS.ResourceID</strong> <br/> Where    v_LU_MSProd.MLSProductName is NOT NULL and    v_FullCollectionMembership.CollectionID = @CollectionID <br/>         and (    @CodeOption = 0 or    (@CodeOption = 1 and v_GS_INSTALLED_SOFTWARE_MS.ChannelCode0 IS NULL) OR    (@CodeOption = 2 and v_GS_INSTALLED_SOFTWARE_MS.ChannelCode0 = @ChannelCode)    )            <br/> Group by v_LU_MSProd.MLSFamilyName, v_LU_MSProd.MLSProductName, v_LU_MSProd.VersionCode, v_GS_INSTALLED_SOFTWARE_MS.ChannelCode0    <br/> having <br/> <strong>        (max(v_RA_System_SystemOUName.System_OU_Name0) like '%/'+@CountryCode+'/%' OR @CountryCode is null OR len(@CountryCode)=0)<br/>         and (max(v_RA_System_SystemOUName.System_OU_Name0) like '%/'+@RegionCode+'/%' OR @RegionCode is null OR len(@RegionCode)=0)</strong> <br/> order by max(substring(v_RA_System_SystemOUName.System_OU_Name0,19,2)),max(substring(v_RA_System_SystemOUName.System_OU_Name0,22,3)),v_LU_MSProd.MLSFamilyName,v_LU_MSProd.MLSProductName<br/> Select  'For information on selecting the optimal volume license program for your needs, visit: ' as [Additional Information:]  union all  Select  'http://www.microsoft.com/Licensing/MPLA' as [Additional Information:]<br/>Tue, 07 Jul 2009 05:23:08 Z2009-07-07T07:09:25Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrgeneral/thread/2ed5dd90-f697-481a-a623-3944db3038be#09212b8d-d944-467f-9398-2d242add39e6http://social.technet.microsoft.com/Forums/en-US/configmgrgeneral/thread/2ed5dd90-f697-481a-a623-3944db3038be#09212b8d-d944-467f-9398-2d242add39e6ZZ02http://social.technet.microsoft.com/Profile/en-US/?user=ZZ02ad_site_name0 definitionWhat are the differences between <strong><em>v_R_System_Valid.ad_site_name0</em> </strong> and <strong><em>v_RA_System_SystemOUName.System_OU_Name0</em> </strong> <br/> They both contain AD country and site info. I built 2 versions of license report by using each of them as following. <br/> <br/> **<strong><em>v_R_System_Valid.ad_site_name0</em>   Version</strong> **<br/> Select substring(v_R_System_Valid.ad_site_name0,1,2) as CountryCode,<br/>         substring(v_R_System_Valid.ad_site_name0,4,3) as SiteCode,<br/>         v_LU_MSProd.MLSFamilyName AS [Licensed Family Name],    <br/>         v_LU_MSProd.MLSProductName AS [Licensed Product Name],    <br/>         v_LU_MSProd.VersionCode AS [Version Code],                 <br/>         CASE when (CAST(v_GS_INSTALLED_SOFTWARE_MS.ChannelCode0 as varchar) is NULL) then 'Not Available' Else CAST(v_GS_INSTALLED_SOFTWARE_MS.ChannelCode0 as varchar) End AS [Channel],<br/>         count(v_GS_INSTALLED_SOFTWARE_MS.ResourceID) AS [Inventoried Quantity]<br/> from    v_GS_INSTALLED_SOFTWARE_MS    <br/>         Left Join v_LU_MSProd on  v_LU_MSProd.MPC = v_GS_INSTALLED_SOFTWARE_MS.MPC0    <br/>         inner join v_FullCollectionMembership on v_FullCollectionMembership.ResourceID = v_GS_INSTALLED_SOFTWARE_MS.ResourceID    <br/>         inner join v_R_System_Valid ON v_R_System_Valid.ResourceID = v_GS_INSTALLED_SOFTWARE_MS.ResourceID<br/> Where    v_LU_MSProd.MLSProductName is NOT NULL and ad_site_name0 is not null and substring(v_R_System_Valid.ad_site_name0,1,2)='AU'<br/> group by substring(v_R_System_Valid.ad_site_name0,1,2),substring(v_R_System_Valid.ad_site_name0,4,3),v_LU_MSProd.MLSFamilyName,v_LU_MSProd.MLSProductName,v_LU_MSProd.VersionCode,v_GS_INSTALLED_SOFTWARE_MS.ChannelCode0<br/> order by CountryCode,SiteCode,v_LU_MSProd.MLSFamilyName,v_LU_MSProd.MLSProductName,v_LU_MSProd.VersionCode,v_GS_INSTALLED_SOFTWARE_MS.ChannelCode0<br/> <br/> <br/> **<strong><em>v_RA_System_SystemOUName.System_OU_Name0</em> </strong> Version**<br/> Select    <br/>         substring(v_RA_System_SystemOUName.System_OU_Name0,19,2) as CountryCode,<br/>         substring(v_RA_System_SystemOUName.System_OU_Name0,22,3) as SiteCode,<br/>         v_LU_MSProd.MLSFamilyName AS [Licensed Family Name],    <br/>         v_LU_MSProd.MLSProductName AS [Licensed Product Name],    <br/>         v_LU_MSProd.VersionCode AS [Version Code],                 <br/>         CASE when (CAST(v_GS_INSTALLED_SOFTWARE_MS.ChannelCode0 as varchar) is NULL) then 'Not Available' Else CAST(v_GS_INSTALLED_SOFTWARE_MS.ChannelCode0 as varchar) End AS [Channel],<br/>         count(v_GS_INSTALLED_SOFTWARE_MS.ResourceID) AS [Inventoried Quantity]<br/> from    v_GS_INSTALLED_SOFTWARE_MS    <br/>         Left Join v_LU_MSProd on  v_LU_MSProd.MPC = v_GS_INSTALLED_SOFTWARE_MS.MPC0    <br/>         inner join v_FullCollectionMembership on v_FullCollectionMembership.ResourceID = v_GS_INSTALLED_SOFTWARE_MS.ResourceID    <br/>         inner join v_R_System_Valid ON v_R_System_Valid.ResourceID = v_GS_INSTALLED_SOFTWARE_MS.ResourceID<br/>         inner join v_RA_System_SystemOUName on v_RA_System_SystemOUName.ResourceID  = v_GS_INSTALLED_SOFTWARE_MS.ResourceID<br/> Where    v_LU_MSProd.MLSProductName is NOT NULL and ad_site_name0 is not null --and substring(v_RA_System_SystemOUName.System_OU_Name0,19,2)='AU'<br/> group by substring(v_RA_System_SystemOUName.System_OU_Name0,19,2),substring(v_RA_System_SystemOUName.System_OU_Name0,22,3),v_LU_MSProd.MLSFamilyName,v_LU_MSProd.MLSProductName,v_LU_MSProd.VersionCode,v_GS_INSTALLED_SOFTWARE_MS.ChannelCode0<br/> having len(substring(v_RA_System_SystemOUName.System_OU_Name0,19,2))&gt;0 and len(substring(v_RA_System_SystemOUName.System_OU_Name0,22,3) )&gt;0<br/> order by CountryCode,SiteCode,v_LU_MSProd.MLSFamilyName,v_LU_MSProd.MLSProductName,v_LU_MSProd.VersionCode,v_GS_INSTALLED_SOFTWARE_MS.ChannelCode0<br/> <br/> <br/> they gave me different results. Which on is correct ?<br/> Thanks<br/>Thu, 16 Jul 2009 06:24:18 Z2009-07-16T06:42:27Zhttp://social.technet.microsoft.com/Forums/en-US/configmgrgeneral/thread/2ed5dd90-f697-481a-a623-3944db3038be#d88737ec-f0bd-4065-8488-4d9fc809e809http://social.technet.microsoft.com/Forums/en-US/configmgrgeneral/thread/2ed5dd90-f697-481a-a623-3944db3038be#d88737ec-f0bd-4065-8488-4d9fc809e809Jason Sandyshttp://social.technet.microsoft.com/Profile/en-US/?user=Jason%20Sandysad_site_name0 definitionThat information is retrieved from your Active Directory and populated by your Active Directory folks. Only they can tell you how accurate it is.<br/><hr class="sig">Jason | http://myitforum.com/cs2/blogs/jsandys | http://blogs.catapultsystems.com/jsandys/default.aspx | Twitter @JasonSandys Thu, 16 Jul 2009 12:13:57 Z2009-07-16T12:13:57Z