Simplest way to search any string in db objects

  • Comments posted to this topic are about the item Simplest way to search any string in db objects

  • Very useful.

    Can you make it where you can search accross databases in current connection?

    Thanks!

  • Description: This procedure will allow you to find any string in any DB Object with its name or part of its name.

    It will also allow you to find the column name belongs to which tables, TV functions and Views.

    Not picking up any table objects for some reason. Does check procs, views, triggers and functions.

  • Rossana A. Hnatyshyn (8/8/2013)


    Very useful.

    Can you make it where you can search accross databases in current connection?

    Thanks!

    Didn't actually get your question, could you please elaborate?

    Usually what I do is create a short cut to call this SP. After that just highlight the string you want to search and hit the short cut key.

    One of the greatest advantage of this approach is that we can find out dependencies for objects where dynamic queries are involved. Just provide the search string and it will be searched across all programmable objects across your database.

    Also, if you run this SP in master database you can use it across any database in your server.

  • dbajunior (8/8/2013)


    Description: This procedure will allow you to find any string in any DB Object with its name or part of its name.

    It will also allow you to find the column name belongs to which tables, TV functions and Views.

    Not picking up any table objects for some reason. Does check procs, views, triggers and functions.

    Sorry for adding this line It will also allow you to find the column name belongs to which tables, TV functions and Views.

    I removed this part of code because there were performance issues. Will add it to the SP once I optimize it. Thanks for pointing out the mistake, feedback is always welcome.

  • Thanks for the script.

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply