Effects on SCCM Database: Initialization

The CAM External Connector (the Connector) reads some initial information from the SCCM database so that it can perform the import process:

  1. The Connector determines whether the other database is a SCCM database by checking its sysobjects table for the presence of two views: v_GroupMap and v_GroupAttribute.
  2. To obtain the machines to import in the user-selected SCCM machine groups, the Connector reads these SCCM views: v_Collection, v_ClientCollectionMembers, and v_CollectToSubCollect.
  3. To get the SCCM view (and datatype) for machine attribute mappings, the Connector reads the v_GroupMap and v_GroupAttributeMap SCCM views, as well as the sysobjects, syscolumns, and systypes tables. These system tables are used to determine the correct data types of the columns in the returned views.

    The following is the query issued to obtain the default mapping information:

    SELECT DISTINCT GM.DisplayName sccmGroupName, GM.MIFClass as sccmMIFClass,
          GAM.AttributeName as sccmAttributeName, GM.InvClassName as sqlView,
          case when st.name like '%char%' then 'string'
                 when st.name = 'int' then 'number'
                 when st.name like '%date%' then 'date'
                 when st.name = 'bit' then 'boolean'
                 else 'unknown' end as dataType
    FROM v_GroupMap GM
    INNER JOIN v_GroupAttributeMap GAM ON GM.GroupID = GAM.GroupID
    LEFT JOIN sysobjects so on GM.InvClassName = so.name
    LEFT JOIN syscolumns sc on so.id = sc.id and GAM.ColumnName = sc.name
    LEFT JOIN systypes st on sc.xtype = st.xtype
    The above sets the default machine attribute mappings; you can use the SCCM Hardware Field Mapping Dialog Box if you need to augment or override default mappings.

Once the Connector has the above information from the SCCM database, you can perform the import.