Example queries
Use the example queries as models for building your custom CMDB queries and Service Mapping queries.
-
CMDB — Servers connected to a database
Use this example to build a CMDB query to find all servers with a connection to a database.
-
CMDB — Critical application services
Use this example to build a CMDB query to find all critical application services, and their owner.
-
CMDB — Application services with incident or change
Use this example to build a CMDB query to find all application services for which there is an incident or a change request. Results are returned for either the application service itself or any CI within the service.
-
CMDB — Hardware with Windows installed
Use this example to build a CMDB query to find all hardware in my service offering that has Microsoft Windows installed.
-
Service Mapping — Linux servers in services
Use this example to build a Service Mapping query to find all Linux servers in services.
---
title: Example queries
description: Use the example queries as models for building your custom CMDB queries and Service Mapping queries.
locale: en-US
canonical_url: https://www.servicenow.com/docs/r/servicenow-platform/configuration-management-database-cmdb/sample-queries.html
release: brazil
product: Configuration Management Database \(CMDB\)
classification: configuration-management-database-cmdb
topic_type: concept
last_updated: "2026-09-10"
reading_time_minutes: 1
breadcrumb: [Reference, CMDB Query Builder, Configuration Management Database \(CMDB\), Configuration Management, Extend ServiceNow AI Platform capabilities]
---
# Example queries
Use the example queries as models for building your custom CMDB queries and Service Mapping queries.
- **[CMDB — Servers connected to a database](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/servicenow-platform/configuration-management-database-cmdb/cmdb-query-builder-tutorial.md)**
Use this example to build a CMDB query to find all servers with a connection to a database.
- **[CMDB — Critical application services](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/servicenow-platform/configuration-management-database-cmdb/cmdb-query-builder-sample1-app-ser.md)**
Use this example to build a CMDB query to find all critical application services, and their owner.
- **[CMDB — Application services with incident or change](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/servicenow-platform/configuration-management-database-cmdb/cmdb-query-builder-sample2-app-ser.md)**
Use this example to build a CMDB query to find all application services for which there is an incident or a change request. Results are returned for either the application service itself or any CI within the service.
- **[CMDB — Hardware with Windows installed](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/servicenow-platform/configuration-management-database-cmdb/cmdb-query-builder-sample3-app-ser.md)**
Use this example to build a CMDB query to find all hardware in my service offering that has Microsoft Windows installed.
- **[Service Mapping — Linux servers in services](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/servicenow-platform/configuration-management-database-cmdb/service-mapping-query-tutorial.md)**
Use this example to build a Service Mapping query to find all Linux servers in services.
| title | Example queries |
| description | Use the example queries as models for building your custom CMDB queries and Service Mapping queries. |
| locale | en-US |
| canonical_url | https://www.servicenow.com/docs/r/servicenow-platform/configuration-management-database-cmdb/sample-queries.html |
| release | brazil |
| product | Configuration Management Database \(CMDB\) |
| classification | configuration-management-database-cmdb |
| topic_type | concept |
| last_updated | 2026-09-10 |
| reading_time_minutes | 1 |
| breadcrumb | ReferenceCMDB Query BuilderConfiguration Management Database \(CMDB\)Configuration ManagementExtend ServiceNow AI Platform capabilities |