Checking database type from db connection string?
I have a string variable called varDB_CONN which contains a database connection string and want to find out if it's either an Oracle or MSS database. The connection string contained within varDB_CONN can be one of two formats:
MSS:
'jdbc:microsoft:sqlserver://DB_NAME:PORT;SelectMethod=cursor'
Oracle:
'jdbc:oracle:thin:@DB_NAME:PORT:SERVER'
So basically I need to find if the string contains either 'oracle' or 'microsoft'.
I've been trying the WordFind v2.0 found here but it doesn't seem to be working as it should. I use it like this:
${WordFind} $var_DB_CONN "microsoft" "#" $var_DB_MSS_TYPE
As far as I can tell from the examples the above useage should return 1 to the $var_DB_MSS_TYPE variable, right?