Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query - what collections are a PC in?

Status
Not open for further replies.

legno

MIS
Jan 28, 2002
6
AU
We use PCID's in collections,(System Resource, name), and need to know what collections a PC is in. I'm not very experienced with queries. Can anyone help.
 
First some basics. A query is a WQL command (like SQL but based on WMI) to present information from the SMS database. A collection is a list of devices based on a query (which can be automatically updated on a regular basis) or a static list. An advertisement references a collection for its list of devices. (By the way, when you create a collection you can point it to use a query, but there no linkage is established. The collection uses a copy of the query.)

Are you looking to figure out every collection that a PC is in? For example, a PC might be in both "All clients" and "All Windows 9x clients". If so, how would knowing this help you (if you don't mind me asking)?
 
Well, I only need to know the application collections a PC is in, eg we have collections called Space Gass, and Microstation. I don't need to know if a PC is in All ... collections.
From reading the help, it appears that a collections is a type of Object, and the database can be queried for them, it just doesn't say how.
Thanks,
Legno
 
Finding what collections a given PC is in is possible, but I don't know an easy way.

I don't know of a way to do it through SMS admin console (except to expand collections and look at the members). You could connect to the database via ODBC and look at dbo_v_Collection to determine class names of potential collection views (e.g. v_CM_RES_COLL_...) then link to these. The view will list the PC name, site code, domain, etc. Does this help?
 
Thanks snyderi,
it put me on the right track. I got our database guru to look at the ODBC connectionm, and he wrote an Access macro to do the job.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top