This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

New to Sw

Im trying to filter out the dashboard graphs and charts so they dint display SQL memory. I can't seem to find a working querie. Please help.

  • im close

    PercentMemoryUsed > 90 and Applications Not Like '*SQL*' or Application_Secondary Not Like '*SQL*'

    Cannot seam to get Application_Secondary table to work.

  • Try using Or instead of or.

  • Same issue. Still see SQL boxes in the list. I'm trying to call a custom property to filter out SQL. I was looking at the DB. Should i be using another name?

    pastedImage_0.png

  • can you share your query,  (dynamic[GUI], SQL or SWQL) Please?

  • Hi ckscord if your looking for the SQL Syntax it would look something like this:

    WHERE PercentMemoryUsed > '90' AND (Application NOT LIKE 'SQL' OR Application_Secondary NOT LIKE 'SQL')

    If this is being used as a SQL Syntax then you would SELECT * FROM Nodes but if you are using this in the SQL Filter part of the Web UI then you might need to just type it as:

    PercentMemoryUsed > '90' AND (Application NOT LIKE 'SQL' OR Application_Secondary NOT LIKE 'SQL')

  • Thanks David. Still striking out with the filter applying this:

    PercentMemoryUsed > '90' AND (Application NOT LIKE 'SQL' OR Application_Secondary NOT LIKE 'SQL')

    pastedImage_0.png

  • Odd, it worked for me. Best thing to try is to break down the filter.

    First Try to validate it in SQL with

    SELECT * FROM Nodes
    WHERE PercentMemoryUsed > '90' AND (Application NOT LIKE 'SQL' OR Application_Secondary NOT LIKE 'SQL')

    Then if that works we know were on the right track.

    I would also try editing the widget to tune down the query and make sure all 3 filters work on there own:

    PercentMemoryUsed > '90'

    Application NOT LIKE 'SQL'

    Application_Secondary NOT LIKE 'SQL'

    Then try stringing them together. Let me know.

    Also might be worth trying: (PercentMemoryUsed > '90') AND (Application NOT LIKE 'SQL' OR Application_Secondary NOT LIKE 'SQL')

  • It may depend on where you are filling this in... your SQL wildcards will be the % (Percent) sign.

    This might work - if the app name does not start with SQL then add a % before SQL...

    WHERE PercentMemoryUsed > 90 AND (Application NOT LIKE 'SQL%' OR Application_Secondary NOT LIKE 'SQL%')

    or Application <> 'MSSQLSERVER'         if you have an exact name, or just a few add an or within the parens()

  • Thanks everyone for the help. I called over one of my SQL guys over and we got it working with this.

    Applications <> 'Exchange - Public Folder' And Applications <> 'Exchange - Hub' And Applications <> 'SQL' And Applications <> 'Exchange - Mailbox Server' And Application_Secondary is NULL or Application_Secondary = 'Oracle' And PercentMemoryUsed > 90

  • Since NOT is in use, then use AND in place of the OR.

    Using OR allows either test to satisfy the rule. Meaning, let's say a node has a primary application SQL and a secondary application KeyServer. The test against Application not like SQL would fail, but Application Secondary not like SQL would succeed, so the node would be accepted. But that's not what we want -- we want the node to not be accepted. The solution is one of the two following:

    (PercentMemoryUsed > '90') AND (Application NOT LIKE 'SQL' AND Application_Secondary NOT LIKE 'SQL')

    or

    (PercentMemoryUsed > '90') AND NOT (Application LIKE 'SQL' OR Application_Secondary LIKE 'SQL')

    Both of these will fail if either or both Application or Application secondary is SQL. Personally, since negative comparisons are a bit more costly, I would go with the second since it has one less NOT.

    Regards, Eric