Finding table names

Finding table names

Did you ever create a custom inventory class and not know where it is in the database? Or, for that matter, any custom data class?

The easiest way I've found to deal with this is to find a resource that the data class is associated with (for example, a computer for a custom inventory class).

Go into Resource Explorer for that asset, and select the Inventory tab. Find the data class (often under the "Default Folder"). Then you will receive the table over to the right. Notice above the results for the dataclass there are two tabs. Choose the "Status" tab and it will give you some stats, including both the Table name and the History table names.

You can then write a query using these table names in your hand-written SQL.

3.8
Average: 3.8 (10 votes)

Writing Queries

I've totally fallen for writing my queries in SQL enterprise manager. Just write a new view that gives me what I need. Then copy and paste the SQL where I need it!

Totally rocks!

Finding table names

I am trying to locate the "location" data field table and the "name" data field table. I have tried your described methods but I was not able to get the Location to display in my SQL query.

Any idea where the location table is located?

Try starting with "SELECT *

Try starting with "SELECT * from vComputer". I always start with using a select on this view created by Altiris. It basically gives you all fields when viewing Resources. It doesn't have location, but it would be an easy place to start.

Location

mboggs's picture

Try the vLocation view in the AltirisNS6 database.

location and name

SK's picture

Basic Inventory populates the Inv_AeX_AC_Location table with FQDN and Distinguished Name details, so this is probably the best choice.

Many tables have name column. I tend to use either Item or Inv_AeX_AC_Identification in my queries.

As vComputer interrogates at least five tables, I tend to keep it out of my queries unless I really have to, especially for Collections, as this View is used for the Collection display. Directly targeting specific tables is far better than hitting on a View.

ResourceAssociation table

DeborahAlbrecht's picture

I always use the ResourceAssoication table within the Altiris db. You can use the ParentResourceGUID and the ChildResourceGUID to join the custom table to any other table which there is an association.

-d

Syndicate content