sql server - Finding a referenced table in multiple views using SQL -
i have huge database 50+ views, tables , stored procedures. want run search find specific piece of text, i.e table name, see if being referenced anywhere.
i tried c# route suspecting easier in sql. logic thinking possibly creating query loops through tables, views , stored procedures , returns data if available.
any ideas?
in below query, instead of matchingstring replace tablename, returns list of objects related search string
select distinct so.[name] sysobjects join syscomments sc on sc.id = so.id sc.[text] '%matchingstring%'
Comments
Post a Comment