- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-10-2023 03:37 AM
Hi,
I am trying to use the CMDB Query builder to create a dynamic query that can be used in a Technical Service Offering.
The logic includes 2 CI classes; Server and MSFT SQL Instance. I am trying to create Technical service offerings for the the different environments and apply to the DB Instance. eg SQL Prod, SQL Test, SQL Dev. These can then have different criticality, support team, etc...
The logic relies on the environment of the server. If the server has a production environment then so will the database instance that runs on that server...
I have created the query however the results cannot be configured to exclude the servers and so cannot be used in in a dynamic CI group. The servers are part of another service offering and are supported by windows platform teams so I dont want to include them. I only want the instances.
The server is required for the logic to work in the query but should not be in the output, I only want the DB instances.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-24-2023 07:16 AM
This is just how the Dynamic CI Groups/CMDB Groups work. They take ALL of the CIs returned in the Saved Query. For CMDB Groups created with standard filters (which is a common use case) you look for a specific set of CIs of a specified class that meet certain conditions. However, if you use a Saved Query to populate your CMDB Group, then it will include all of the CIs that are in that query.
The opinions expressed here are the opinions of the author, and are not endorsed by ServiceNow or any other employer, company, or entity.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2023 03:22 PM - edited ‎04-13-2023 03:23 PM
Try using something like msft sql instance that runs on server whose environment is PRD in the natural language query box at the top of the CMDB Query Builder form. Be sure the rest of the pane is empty. Click the Search button, then click the Run button.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-14-2023 05:59 AM
Hi, thanks for your response. The natural language query box does not produce the query, it feels a bit clunky and not really fit for purpose.
I am happy that my query is accurate and produces the correct data (its a simple logic), the problem is the way the results are used in dynamic CI groups. I dont want to see servers, just db instances.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-14-2023 06:15 AM
what results did you get with the NLQ? it worked great in my system, and only listed the SQL Server instances; it did not list the servers. it will also show you the query builder it creates, which i haven't tried to recreate outside the NLQ as it uses constructs that i don't know how to recreate through the drag and drop method. but NLQ should work fine for your use case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-14-2023 06:44 AM - edited ‎04-14-2023 06:45 AM
I struggled to get useful results but I am new to this functionality though have used TQL CMDB tools extensively.
Can you please share the NLQ string you used (verbatim) so that I can test ? - and hopefully learn to use this new feature.