SQL: Find text in all columns in all table
When there is too much unknown you sometimes have to use new ways to get more knowledge, we got a task to analyze the effect of changing the computer name on the application suite .
We could iterate with all teams and get area that should be effected but we decided to try and find better first step analysis and for that we realized that the previous Computer name is saved in several main areas:
- File System
So for each of those we can run script to search for old name and see if we have problematic area (at least as first step).
Registry and files are very simpler and for SQL one of our Architects (Yoel Tzur) created a sample script that will do the job:
So enjoy :)