SQL to return Computer Name, MFG, Model, Serial Number

(imported topic written by SystemAdmin)

Trying to use the view BES_COLUMN_HEADINGS and some sample code given here http://forum.bigfix.com/viewtopic.php?id=4376.

We need to extract the Computer Name, MFG, Model, Serial Number and system type (laptop, server, workstation) to import into an asset management system.

select A.ComputerID, A.Value “Computer Name”, B.Value “Computer Manufacturer - Windows”, C.Value “Computer Model - Windows”, D.Value “Identifying Number - Windows”

from bes_column_headings A, bes_column_headings B, bes_column_headings C, bes_column_headings D

where A.ComputerID = B.ComputerID = C.ComputerID = D.ComputerID

and A.Name = ‘Computer Name’

and B.Name = ‘Computer Manufacturer - Windows’

and C.Name = ‘Computer Model - Windows’

and D.Name = ‘Identifying Number - Windows’

order by A.Value

So as you can tell I am no SQL expert, but is there a way to correctly write this query?

John

(imported comment written by SystemAdmin)

So looking into this a bit more, I don’t think the Database API supports retrieveing anything other than the default properties that BES ships with. Our custom properties do not appear availble via the view. Anyone else exporting basic system info from TEM via SQL?

(imported comment written by BenKus)

http://forum.bigfix.com/viewtopic.php?pid=13604#p13604

(imported comment written by SystemAdmin)

Thanks Ben, I hadn’t found that forum post. I am assuming you were pointing us to the BESPropertyIDMapper tool? If so, we’ve got a couple of follow up questions.

First, will that tool make its way to the new IBM support site (I am assuming it won’t be added to the old bigfix support site?)?

Second, upon running the tool, we encounter a warning - “Added a warning message when using a SQLNativeClient odbc driver because the tool will not find any custom or external properties.”. This was noted in the forum thread and seems to be a show stopper for us, as we use the SQL Native Client (thought it was recommended as part of the 8.x upgrade?) and some of the data we need is custom properties. Will this tool continue to be developed or is it dead? I’d hate to develop a solution based on an already EOL tool.

Thanks,

John

(imported comment written by SystemAdmin)

Hey John, just create a new ODBC connection for the propertyidmapper to use that has the appropriate driver type. You don’t have to use the same one that the BES Server is using.

The tool is still supported and working as intended.

(imported comment written by SLB)

Is there a version of this util in the pipeline that will work with 8.1.0.817? I tested the 3.0.3.171 version of the tool on a v8.1.806 server yesterday (preparing to upgrade our production server to current version) and it worked ok but on testing today with 8.1.0.817 it reports that its expecting a DB version up to 2.1 but the current DB version found was 2.2.

I appreciate 817 was only announced yesterday so am only curious on the ETA so we can plan our upgrade accordingly.

TIA

Rob

(imported comment written by BenKus)

I recommend using the commandline tool BFExtractToCSV to extract data from BigFix… it is much better than database queries:

https://www.ibm.com/developerworks/mydeveloperworks/wikis/home?lang=en#/wiki/Tivoli%20Endpoint%20Manager/page/BigFix%20SOAP%20API

Ben

(imported comment written by SLB)

Hey Ben,

Thanks for the reply but unfortunaltey for us that isn’t a viable option as we need to export from the various BFEnterprise tables to a flat table. We had to start using the BESPropertyIDMapper after the DB schema changes between 6.x and 7.x.

Is the tool still supported? I’m presuming, maybe wrongly, that the only reason the 3.0.3.171 version doesn’t run on 8.1.0.817 is because the DB version change from 2.21 in 8.1.0.806 to to 2.22 in 8.1.0.817.

Regs

Rob

(imported comment written by mcalvi91)

why not use the webreports soap interface to get it?