Red Gate forums :: View topic - Unresolved dependencies
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Dependency Tracker 2
SQL Dependency Tracker 2 forum

Unresolved dependencies

Search in SQL Dependency Tracker 2 forum
Post new topic   Reply to topic
Jump to:  
Author Message
cat



Joined: 03 Oct 2007
Posts: 6

PostPosted: Wed Oct 03, 2007 4:16 pm    Post subject: Unresolved dependencies Reply with quote

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)?
Back to top
View user's profile Send private message
cat



Joined: 03 Oct 2007
Posts: 6

PostPosted: Thu Oct 04, 2007 5:59 pm    Post subject: dependencies Reply with quote

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.
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6670

PostPosted: Sat Oct 06, 2007 8:22 pm    Post subject: Reply with quote

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!
Back to top
View user's profile Send private message
cat



Joined: 03 Oct 2007
Posts: 6

PostPosted: Mon Oct 08, 2007 11:24 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6670

PostPosted: Tue Oct 09, 2007 11:50 am    Post subject: Reply with quote

The stored procedure, table, everything is in the same database?
Back to top
View user's profile Send private message
cat



Joined: 03 Oct 2007
Posts: 6

PostPosted: Tue Oct 09, 2007 3:42 pm    Post subject: Reply with quote

Yes.
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6670

PostPosted: Tue Oct 09, 2007 4:01 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
cat



Joined: 03 Oct 2007
Posts: 6

PostPosted: Tue Oct 09, 2007 4:20 pm    Post subject: Reply with quote

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

version = 2.4.0

I sent explicit examples with screen shots to Ben Pinchen.
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6670

PostPosted: Tue Oct 09, 2007 6:02 pm    Post subject: Reply with quote

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...
Back to top
View user's profile Send private message
cat



Joined: 03 Oct 2007
Posts: 6

PostPosted: Tue Oct 09, 2007 6:30 pm    Post subject: Reply with quote

At this time, we only have the dbo schema in place
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group