Is there a way to search for one value (in my case it is a UID of the type char(64)) inside any column of any table inside one MS SQL Server database?
I’m sitting in front of a huge database without any idea how the tables had to be linked together. To find that out I’d like to list all tables and there columns that contain a certain value in any row. Is that possible?
One way could be to just dump the entire database into a text file and than use any text-editor to search for the value – but this would be pure pain if the database is too huge.
http://vyaskn.tripod.com/search_all_columns_in_all_tables.htm
EDIT: Here’s the actual T-SQL, in case of link rot: