Very often, we know the table name, but do not know which procedure populates the table (assuming that it’s a stored procedure that does that, not a SSIS package).
Use this simple query against the INFORMATION_SCHMEA.ROUTINES:
select specific_catalog , specific_schema , routine_name , routine_type , routine_definition , created , last_altered from INFORMATION_SCHEMA.ROUTINES where routine_definition like ‘%myTableNameString%’
Tags: SQL CHALLENGE,