Unresolved dependencies

Visualizes SQL Server object dependencies.

Moderators: David Atkinson, Anu Deshpande

Unresolved dependencies

Postby cat » Wed Oct 03, 2007 4:16 pm

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)?
cat
 
Posts: 6
Joined: Wed Oct 03, 2007 4:09 pm

dependencies

Postby cat » Thu Oct 04, 2007 5:59 pm

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.
cat
 
Posts: 6
Joined: Wed Oct 03, 2007 4:09 pm

Postby Brian Donahue » Sat Oct 06, 2007 8:22 pm

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!
Brian Donahue
 
Posts: 6669
Joined: Mon Aug 23, 2004 10:48 am

Postby cat » Mon Oct 08, 2007 11:24 pm

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.
cat
 
Posts: 6
Joined: Wed Oct 03, 2007 4:09 pm

Postby Brian Donahue » Tue Oct 09, 2007 11:50 am

The stored procedure, table, everything is in the same database?
Brian Donahue
 
Posts: 6669
Joined: Mon Aug 23, 2004 10:48 am

Postby cat » Tue Oct 09, 2007 3:42 pm

Yes.
cat
 
Posts: 6
Joined: Wed Oct 03, 2007 4:09 pm

Postby Brian Donahue » Tue Oct 09, 2007 4:01 pm

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.
Brian Donahue
 
Posts: 6669
Joined: Mon Aug 23, 2004 10:48 am

Postby cat » Tue Oct 09, 2007 4:20 pm

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

version = 2.4.0

I sent explicit examples with screen shots to Ben Pinchen.
cat
 
Posts: 6
Joined: Wed Oct 03, 2007 4:09 pm

Postby Brian Donahue » Tue Oct 09, 2007 6:02 pm

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...
Brian Donahue
 
Posts: 6669
Joined: Mon Aug 23, 2004 10:48 am

Postby cat » Tue Oct 09, 2007 6:30 pm

At this time, we only have the dbo schema in place
cat
 
Posts: 6
Joined: Wed Oct 03, 2007 4:09 pm


Return to SQL Dependency Tracker 2

Who is online

Users browsing this forum: No registered users and 1 guest