Out of the Box Pattern: MSSql DB On Windows when used with the Microsoft SQL Server Process Classifier failing with null pointer exception.Issue When using the MSSql DB On Windows Pattern on a Windows Device with multiple database instances setup causes the following issue when running Discovery. 1. The OOTB Pattern throws a hard error for a null value when step 7 called "get instance_name from WMI if empty" runs in all environments. NOTE: This could happen on a Windows server with only one database instance and other instance complete fine with out any issues. Error from Discovery Log: Failed Exploring CI Pattern, Pattern name: MSSql DB On Windows, Process ID: 2548, To Check Pattern Log Press Here Error from Discovery Pattern Log: get instance_name from WMI if empty 2020-02-26 17:20:31: null java.lang.NullPointerException at com.snc.sw.kb.lang.closure.RunWmiQueryToVariableClosure.handleNameSpaceCollection(RunWmiQueryToVariableClosure.java:129) at com.snc.sw.kb.lang.closure.RunWmiQueryToVariableClosure.function(RunWmiQueryToVariableClosure.java:66) at com.snc.sw.kb.lang.closure.RunWmiQueryToVariableClosure.function(RunWmiQueryToVariableClosure.java:16) at com.snc.sw.kb.lang.closure.IfClosure.function(IfClosure.java:49) at com.snc.sw.kb.lang.closure.IfClosure.function(IfClosure.java:13) at com.snc.sw.pattern.AbstractPatternExecutor.executeStep(AbstractPatternExecutor.java:739) at com.snc.sw.pattern.DefaultPatternExecutor.executeStepsImpl(DefaultPatternExecutor.java:40) at com.snc.sw.pattern.AbstractPatternExecutor.executeSteps(AbstractPatternExecutor.java:680) at com.snc.sw.pattern.HorizontalDiscoveryPatternExecutor.executeIdentification(HorizontalDiscoveryPatternExecutor.java:203) at com.snc.sw.pattern.HorizontalDiscoveryPatternExecutor.runIdentific 2020-02-26 17:20:31: null java.lang.NullPointerException at com.snc.sw.kb.lang.closure.RunWmiQueryToVariableClosure.handleNameSpaceCollection(RunWmiQueryToVariableClosure.java:129) at com.snc.sw.kb.lang.closure.RunWmiQueryToVariableClosure.function(RunWmiQueryToVariableClosure.java:66) at com.snc.sw.kb.lang.closure.RunWmiQueryToVariableClosure.function(RunWmiQueryToVariableClosure.java:16) at com.snc.sw.kb.lang.closure.IfClosure.function(IfClosure.java:49) at com.snc.sw.kb.lang.closure.IfClosure.function(IfClosure.java:13) at com.snc.sw.pattern.AbstractPatternExecutor.executeStep(AbstractPatternExecutor.java:739) at com.snc.sw.pattern.DefaultPatternExecutor.executeStepsImpl(DefaultPatternExecutor.java:40) at com.snc.sw.pattern.AbstractPatternExecutor.executeSteps(AbstractPatternExecutor.java:680) at com.snc.sw.pattern.HorizontalDiscoveryPatternExecutor.executeIdentification(HorizontalDiscoveryPatternExecutor.java:203) at com.snc.sw.pattern.HorizontalDiscoveryPatternExecutor.runIdentifi ReleaseAll Environments.CauseReason for Error: Step 7 is trying to use the variable called $nm in the namespace field but this variable is not set up with a value until step 15 called "set namespace attr" ResolutionWe have opened a PRB PRB1389588 for the same. Here is the workaround which will be rolled out to OOB instances. copy the following steps and paste it after “step 2:list namespaces in SqlServer namespace” and delete the following steps after copying. step 12:filter namespacesstep 13:verify at least one namespace existsstep 14:set our NMstep 15:set namespace attr