Home Forums SQL Server 2008 T-SQL (SS2K8) Get list of all the tables used in multiple SQL scripts RE: Get list of all the tables used in multiple SQL scripts

  • Create a new, work db. Create 275 procs from the existing code. Hopefully that's as as adding "CREATE PROCEDURE proc_NNN AS " to the beginning of the code and running it. Then use view sys.dm_sql_referencing_entities to find all objects (it doesn't seem to always list all columns, but hopefully in this case it will list them all).

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".