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

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -