Information Technology Reference
In-Depth Information
Queries
A query is a specific set of instructions that extract information about a defined set of objects.
You can use a query in Configuration Manager to obtain almost any information from the site
database. This includes items such as specific types of computers, user groups, sites, collec-
tions, and applications. You also can query your database for information such as the number
of clients that have free space of less than 5 GB and the number of clients in a particular site.
One caveat is that the inventory information in the database is as current as the last inventory
cycle. You might run a particular query to locate a computer that could have changed since
the last inventory. Therefore, because the computer no longer meets the criteria of the query,
it will not appear in the query results.
You build queries in Configuration Manager in the WMI Query Language (WQL), which is
based on Windows Management Instrumentation (WMI). WMI is similar to Structured Query
Language (SQL). You can use preconfigured queries or create your own custom queries to
search the site database. When creating custom queries in Configuration Manager, you can
use the Query Statement Properties in the Create Query Wizard in design mode to choose
the components of your query, or you can use Query Statement Properties in the query lan-
guage mode to type your own WQL queries.
Although design mode provides an easier interface to use when creating queries, you can-
not create all queries by using design mode. For instance, when using aggregation commands
in WQL, you can view and manage the query only in query language mode.
You can perform two types of queries in Configuration Manager:
Data queries You can use data queries for extracting information that relates to
resource discovery or inventory data. In general, the primary purpose of data queries is
to build collections.
Status message queries This type of query has a very specific use. The Site Status
and Component Status nodes show you status messages that relate to a specific site
system or component. Although there are some filtering options, these might not be
sufficient when troubleshooting an issue. Therefore, you can use status message que-
ries to create custom queries that return status messages, including from clients. The
primary purpose of status message queries is to locate stored status messages.
You can use queries in Configuration Manager to search the site database for any object.
All objects have attributes and values that you can query. However, not all objects have the
same attributes and values. For example, both user resources and system resources have a
name; however, user resources do not have installed software.
Every object type is defined by a set of attribute classes, which are further defined by
individual attributes. For example, the System Resource object type is defined by attribute
classes such as processor, disk drives, and installed software. Together, these characterize the
discovery data and inventory data of a system resource. These attribute classes have their
own unique attributes. The attributes define the values stored in the database, such as current
clock speed for processors or partitions for disk drives.
 
 
Search WWH ::




Custom Search