Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7724861
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T04:47:42+00:00 2026-06-01T04:47:42+00:00

In the past I thought when right-clicking on a table in SSMS and click

  • 0

In the past I thought when right-clicking on a table in SSMS and click ‘View Dependencies’ it will list out all tables and stored procs that uses the table. But recently I noticed it miss some dependencies.

Sometimes it misses some stored procs that reference it using SELECT statements, sometimes it’s INSERT or UPDATE statements. There doesn’t seem to be a common pattern on what is dependent and what is not. Can any one shed some light on this? (And no, it’s not a permission issue. I have sysadmin rights.)

My final goal is to find a way to find all dependencies on a particular table/view/stored proc using the simplest way (ie. little or no scripting) but it must return ALL dependencies, not just some. Any help?

PS. I’m using SQL Server 2005 and SSMS 2005.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T04:47:43+00:00Added an answer on June 1, 2026 at 4:47 am

    This is “known” problem with SQL server. And actually this SSMS feature is dangerous to use, particularly when you want to find out which objects do you have to change, if you have done some changes to a Table or View.

    Also – do not use scripts to search in syscomments, as far as if object text is more that 8000 symbols it will be split into several parts, so that name of your table can be cut into

    record1: …… table_that_yo

    record2: u_search ……..

    Previously my “recipe” was to script all object into text files to disk and perform “search in files” using any text editor – like in SSMS of notepad++ (Find in Files) function.

    I have now created a script that allows searching in object definitions using built-in SQL functions:

    /*
    This is an easy way to look through the sources of all objects in the database
    if you need to find particular string. This script can be used, for example,
    to find references of some specific object by other objects. Depending on the
    size of your database you might want to limit the search scope to particular
    object type. Just comment unneeded object types in WHERE statement.
    Enter search string between %% marks in @SearchPattern initialisation statement.
    When you get the results you can copy object name from "FullName" column and
    use SSMSBoost to quickly locate it in the object explorer, or you can continue
    searching in results using "Find in ResultsGrid" function.
    
    This script is provided to you by SSMSBoost add-in team as is. Improvements and
    comments are welcome.
    Redistribution with reference to SSMSBoost project website is welcome.
    SSMSBoost team, 2014
    */
    
    DECLARE @SearchPattern NVARCHAR(128)
    
    SET @SearchPattern = '%%'
    
    SELECT SCHEMA_NAME(o.schema_id) as [schema]
    ,      o.[name]
    ,      o.[type]
    ,      '['+SCHEMA_NAME(o.schema_id)+'].['+o.[name]+']' as FullName
    ,      OBJECT_DEFINITION(object_id) AS [Source]
    FROM sys.objects AS o
    WHERE lower(OBJECT_DEFINITION(o.object_id)) LIKE lower(@SearchPattern)
        AND o.[type] IN (
        'C',--- = Check constraint
        'D',--- = Default (constraint or stand-alone)
        'P',--- = SQL stored procedure
        'FN',--- = SQL scalar function
        'R',--- = Rule
        'RF',--- = Replication filter procedure
        'TR',--- = SQL trigger (schema-scoped DML trigger, or DDL trigger at either the database or server scope)
        'IF',--- = SQL inline table-valued function
        'TF',--- = SQL table-valued function
        'V') --- = View
    ORDER BY o.[type]
    ,        o.[name]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have looked and thought about good and bad points of my past designs
I thought in the past that my Domain objects shouldn't contain repositories calls in
All right so I've been looking all over the net and I can't seem
I spent past week on a jQuery implementation. And retrospectively, though I know how
Past scenario - Work with Tomcat and start in debug mode and Remote Debug
In past, I am using Listview and using below code can show a particular
In the past I've been able to modify the CSS on a page via
I read past questions but I couldn't solve my issue :( This is my
In the past I've heard that it can be dangerous to rename the Plone
In the past, when I've had to compile something on Snow Leopard (or any

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.