You are currently browsing comments. If you would like to return to the full story, you can read the full entry here: “Find Dependent Objects”.
You are currently browsing comments. If you would like to return to the full story, you can read the full entry here: “Find Dependent Objects”.
Hello Derek,
Thank you for your offering. However, this query throws an un-captured error when no columns are detected. I received this when I applied it to one of my databases. It needs more seasoning.
Msg 2020, Level 16, State 1, Line 5
The dependencies reported for entity “dbo.rpt_Ca____” do not include references to columns. This is either because the entity references an object that does not exist or because of an error in one or more statements in the entity. Before rerunning the query, ensure that there are no errors in the entity and that all objects referenced by the entity exist.
Hi John,
Yes, I believe it is a bug. If you look, I bet that procedure references an object that does not exist. Instead of SQL Server bypassing it, it raises an error.
Hi,
if i am using the above script i am getting the below error.
Msg 2020, Level 16, State 1, Line 7
The dependencies reported for entity “dbo.xxxx” do not include references to columns. This is either because the entity references an object that does not exist or because of an error in one or more statements in the entity. Before rerunning the query, ensure that there are no errors in the entity and that all objects referenced by the entity exist.
Thanks & Regards,
Rathnam
Hi Rathnam,
I believe that is a SQL 2008 bug. I’m not sure but think it may be fixed in R2. The only workaround is likely to drop the object.
Best of Luck,
Derek
Hi Derek,
I am using below version
Microsoft SQL Server 2008 R2 (RTM) – 10.50.1600.1 (Intel X86) Apr 2 2010 15:53:02 Copyright (c) Microsoft Corporation Developer Edition on Windows NT 5.2 (Build 3790: Service Pack 2)
Thanks & Regards,
Rathnam
Hi Rathnam,
After looking into this error, it seems as if SQL 2008 does not allow procedures that have orphaned references to procedures, tables, or columns that do not exist. It seems as if this procedure would be able to overlook this issue, however they do not. In my opinion, it would be a great enhancement to overlook this issue.
Thanks,
Derek
[...] New DMV shows all object dependencies [...]