- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2014 06:35 AM
Hi all,
I've been researching a way to filter out / ignore SQL Server Express instances when MS SQL Server Discovery runs.
Some suggested this should be done under the Process Classifiers, but I don't think this is correct. I believe the probe for MS-SQL should be modified to figure out whether the instance of SQL Server is an Express version, then the sensor can be modified to check for that field and flag the CMDB entry appropriately.
Has anyone done this - ignored SQL Server Express editions while running Discovery?
Thanks,
Dmitri
Solved! Go to Solution.
- Labels:
-
Discovery
-
Service Mapping

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2014 08:20 AM
Dmitri/William:
I think adding on to the MS SQL Server Process Classification makes sense. The 'Microsoft SQL Server' process classification triggers the 'Powershell-Windows - MSSQL' probe.
You can either add a new probe to do this or update the existing sqlinfo.ps1 script to filter out SQLServerExpress editions. To test for SQLServerExpress you can probe for the serverproperty 'edition'.
How to: Identify a SQL Server Express Instance
And you should be able to invoke the sqlcmd using invoke-expression ('iex')
Invoke-Expression
In PowerShell, something similar to the following should do it
#Create command
$cmd = 'sqlcmd' "select serverproperty('edition') go"
#Run command
iex "& $cmd"
I have not tried it out but the logic should work, please keep us posted on your findings, thanks,
Subash Biswas

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2014 07:17 AM
I am not entirely sure how discovery works as I do not use that product, but I think you could also do this with a transform script to validate the name or part of the name of the software and then skip that row.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2014 08:20 AM
Dmitri/William:
I think adding on to the MS SQL Server Process Classification makes sense. The 'Microsoft SQL Server' process classification triggers the 'Powershell-Windows - MSSQL' probe.
You can either add a new probe to do this or update the existing sqlinfo.ps1 script to filter out SQLServerExpress editions. To test for SQLServerExpress you can probe for the serverproperty 'edition'.
How to: Identify a SQL Server Express Instance
And you should be able to invoke the sqlcmd using invoke-expression ('iex')
Invoke-Expression
In PowerShell, something similar to the following should do it
#Create command
$cmd = 'sqlcmd' "select serverproperty('edition') go"
#Run command
iex "& $cmd"
I have not tried it out but the logic should work, please keep us posted on your findings, thanks,
Subash Biswas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2014 08:40 AM
Subash,
This is perfect. Thank you for finding and explaining this.
As my first step, I will follow the requirements for the MID Servers that do Discovery for us:
Microsoft SQL Servers - ServiceNow Wiki
As a second step, I will follow your steps above in modifying the probe / sensor. In fact, I might just have to modify the sensor to check the current.edition field for "Express Edition".
Thanks again,
Dmitri

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2014 12:24 PM
Could you not also mark the "MySQL Server" process classification as inactive? That would stop this process from being discovered I would think.