Showing posts with label database. Show all posts
Showing posts with label database. Show all posts

Wednesday, April 1, 2015

Dell Warranty Tool in DCIS 4.0 Does Not Write to ConfigMgr DB

The latest version of the Dell Command Integration Suite 4.0 for System Center (link) includes the Warranty Tool similar to the previous versions.  But it does not write to the ConfigMgr DB.  This is due to a compatibility issue with the 2012 R2 DB and will hopefully be resolved in a near future version of the tool.

For now, here is a script that will help you import the results file from the Warranty Tool into your ConfigMgr 2012 DB.  This script was shared with me by a customer who has been using it.


DECLARE     @xml XML

set   @xml =
      (
      select BulkColumn
      from  openrowset(BULK 'C:\ProgramData\Dell\CommandIntegrationSuite\WarrantyInformation_03_05.xml',SINGLE_CLOB) as x
      )

select
            T.c.value('(ServiceTag/text())[1]','Varchar(30)') as ServiceTag
            ,T.c.value('(SystemID/text())[1]','Varchar(30)') as SystemID
            ,T.c.value('(Buid/text())[1]','Varchar(30)') as Buid
            ,T.c.value('(Region/text())[1]','Varchar(30)') as Region
            ,T.c.value('(LOB/text())[1]','Varchar(30)') as LOB
            ,T.c.value('(SystemModel/text())[1]','Varchar(30)') as SystemModel
            ,T.c.value('(SystemShipDate/text())[1]','datetime') as ShipDate
            ,U.v.value('(Provider/text())[1]','Varchar(30)') as Provider
            ,U.v.value('(ServiceLevelDescription/text())[1]','Varchar(50)') as Description
            ,U.v.value('(EntitlementType/text())[1]','Varchar(30)') as EntitlementType
            ,U.v.value('(StartDate/text())[1]','datetime') as WarrantyStartDate
            ,U.v.value('(EndDate/text())[1]','datetime') as WarrantyEndDate
            ,U.v.value('(DaysLeft/text())[1]','Int') as DaysLeft
from @xml.nodes('Warranty/Asset') T(c)
cross apply T.c.nodes('Entitlement') U(v)

order by ServiceTag, WarrantyEndDate