Unresolved dependencies

catcat Posts: 7
edited October 9, 2007 1:30PM in SQL Dependency Tracker
The error message is "Unable to resolve object [db].[schema].[object] in unknown database [server].[db] referenced by..."

The [server].[db] is the same as the object I added to the project.

In the model there are not any dependencies to resolve by hand, even though I know the proc relies upon tables inside the same db. Sysdepends knows about the dependency also.

Could it be permissions? We explicitly grant on all objects, and seldom grant to public. If it is permissions, what sort are needed (select, reference, view definition)?

Comments

  • I've done some testing, and I don't think my issue is permission - I belong to a Windows group that has DBO on all dbs on the particular server.

    Thinking that maybe the issue is comments or white space I copied a proc removing all the indentation and comments that are not at the end of lines. Hoping that it would help the parser. It did not. The tool did not find an update command that is left justified.

    The error messages that I am receiving aren't giving me any clues either. The objects that cannot be resolved because they're in an unknown db aren't directly called by the proc. I've changed the option setting to only include 1 level of objects used by the selected object and it's still not finding my update table statement.
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hi Cat,

    Sorry, but I do not completely understand the problem. The way I read is this:
    • Database 1 contains a stored procedure
    • The procedure in database 1 has an unresolved external reference to a table
    • You attempt to resolve the external reference
    • This results in the message about the inability to resolve the external reference
    I am not sure about the 'object not being directly called by the procedure' -- does this indicate that you are using a linked server in thie query? Also, is the external reference attached to a whole different server rather than another database on the same server?

    Thanks!
  • The stored procedure is in database FOO. It depends on tables in database FOO. The dependency is not being found through the tool (automatically or otherwise). I cannot right click the stored procedure and choose to add objects that are depended on, because it is not there. It's as though the procedure is not being parsed properly. I have tried removing all white space from the procedure to help the parser, no luck. It does not happen to every stored procedure. But the few I've tested with have had the same behavior trial after trial.
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    The stored procedure, table, everything is in the same database?
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Okay, and the stored procedure references the dependent object in a way that is qualified all the way up to the database name? (mydb.dbo.object)

    And which version of Dependency Tracker are you using?

    Thanks.
  • cut & pasted from the proc: update xref.dbo.SymbolPopulationControl

    version = 2.4.0

    I sent explicit examples with screen shots to Ben Pinchen.
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    All I can think of at this point is that the object is referenced in a different schema in one of the stored procedures, ie the SP you have in the database is EXECing [db].[dbo].[proc] when the proc is actually owned by a different schema and is called [db].[somethingelse].[proc]. That would explain the screenshot and why the dependent object is being shown without a line connecting it to the other procedure...
  • At this time, we only have the dbo schema in place
Sign In or Register to comment.