Tom_Watson
Posts: 92
Score: 4 Joined: 9/13/2006 Status: offline
|
This got me playing around a bit last night (TV was boring)... I took a look at Garth Jones article on this subject at http://www.myitforum.com/articles/19/view.asp?id=7374 . This was written a while back, and is really for SMS 2.0. But I thought I'd do a report for SMS 2003, that combines AI info, with links to warranty info on HP, Dell, and IBMs' websites:- quote:
SELECT DISTINCT v_r_system.netbios_name0 AS "Computer Name", v_gs_system_console_usage.topconsoleuser0 AS "Top Console User", v_gs_system_enclosure.serialnumber0 AS "Serial Number", v_gs_system_enclosure.smbiosassettag0 AS "Asset Tag", v_GS_PC_BIOS.serialnumber0 AS "PC Bios Serial Number", v_gs_computer_system.manufacturer0 AS "Computer Manufacturer", v_gs_computer_system.model0 AS "Computer Model", "Estimated Date of CPU Manufacture" = CASE WHEN (CAST(v_lu_cpu.cpu_birth AS VARCHAR) IS NULL) THEN '(Not Available)' ELSE CAST(v_lu_cpu.cpu_birth AS VARCHAR) END, ismulticore0 AS "Is Multi Processor System", CASE WHEN v_gs_computer_system.manufacturer0 LIKE "Hewlett%" THEN 'http://h20000.www2.hp.com/bizsupport/TechSupport/WarrantyResults.jsp?sn=' + v_gs_system_enclosure.serialnumber0 + '&country=US' WHEN v_gs_computer_system.manufacturer0 LIKE "HP%" THEN 'http://h20000.www2.hp.com/bizsupport/TechSupport/WarrantyResults.jsp?sn=' + v_gs_system_enclosure.serialnumber0 + '&country=US' WHEN v_gs_computer_system.manufacturer0 LIKE "Compaq%" THEN 'http://h20000.www2.hp.com/bizsupport/TechSupport/WarrantyResults.jsp?sn=' + v_gs_system_enclosure.serialnumber0 + '&country=US' WHEN v_gs_computer_system.manufacturer0 LIKE "Dell%" THEN 'http://support.dell.com/MySystems/DetailsEntry.aspx?SvcTag=' + v_gs_system_enclosure.serialnumber0 WHEN v_gs_computer_system.manufacturer0 LIKE "IBM%" THEN 'http://www-304.ibm.com/systems/support/supportsite.wss/warranty?type=' + LEFT (v_gs_computer_system.model0, 4) + '&serial=' + v_GS_PC_BIOS.serialnumber0 + '&action=warranty&brandind=5000008' ELSE '(Not available)' END AS "Warranty Information" FROM v_gs_processor INNER JOIN v_r_system ON v_gs_processor.resourceid = v_r_system.resourceid INNER JOIN v_gs_system_enclosure ON v_gs_system_enclosure.resourceid = v_r_system.resourceid INNER JOIN v_GS_PC_BIOS ON v_GS_PC_BIOS.resourceid = v_r_system.resourceid INNER JOIN v_gs_computer_system ON (v_gs_computer_system.resourceid = v_r_system.resourceid) LEFT JOIN v_gs_system_console_usage ON v_gs_system_console_usage.resourceid = v_r_system.resourceid LEFT JOIN v_lu_cpu ON Lower(v_lu_cpu.cpuhash) = Lower(v_gs_processor.cpuhash0) WHERE v_r_system.netbios_name0 = @Name The @Name variable is obviously just a computer name. Some things I noted on the functionality of this:- 1. The CASE list for "v_gs_computer_system.manufacturer0 LIKE" is by no means exhaustive. 2. We're mostly an HP shop, so most of the tests I could do were based on HP systems. Plus, you're supposed to supply the country of purchase, but for those that I tested, it didn't seem to matter what country you put in, it still came back with the same dates. So I just stuck with country=US in the URL. 3. You have to register to get into the Dell page. Plus it didn't seem to be working too well last night, so I didn't get much testing done on that. 4. Some of the Dell's I saw had 2 serial numbers. I wondered if this was possibly for laptops (e.g. one serial number for the laptop, and another for the docking station). For ones like this, the serial number that seems to work is 7 characters long. 5. For IBMs, it didn't look like the serial number was populated in the system enclosure section. However, the PC BIOS section did seem to have a serial number for the PC, that did seem to be able to be referenced. Plus to get the warranty info for IBM, you need the 4 digit model number. Sometimes there's more than 4 digits, so we just take the first 4. 6. This report was for a particular system. I guess you could just make it for all systems by taking out the WHERE clause on the bottom line (untested). Give it a whirl... Tom
< Message edited by Tom_Watson -- 6/13/2008 5:05:10 AM >
|