So I have figured out most of what I need for an advanced SQL alert we have but I have two pieces I haven't figured out yet.
My alert needs to match specific volume names on our Linux environment. The volume names may contain _ which in SQL is a wildcard. How do I get SQL to match the _ and not use it as everything.
For example I have the following volumes
/a1_test /a10test /a11test and several others. I need the query to match verbatim as
Volume Description Like '/a1_test' without matching the other variations. I found something about escape characters but I'm not grasping the concept.
The other problem I have (not really a problem but I'm sure there is a simpler way is that in one rule I may specify 20 volumes. Is there an easier way then listing 1 per line in my query?
VolumeDescription Like '/oracle/admin' or
VolumeDescription Like '/tsmtmp' or
VolumeDescription Like '/tsmalog
ETC ETC...I have 20 separate lines is there an easier way to do this?
Also I am doing it this method and not the method listed here
because we have standard volume mappings and set alerts however not all volumes exist on all servers. This way if I add a new linux server and add all the volumes my rule set is instantly applied regardless if they have 5 or 30 of the 300 potential volumes names we have in our standards.