Unable to update schema for existing project

Visualizes SQL Server object dependencies.

Moderators: David Atkinson, Anu Deshpande

Unable to update schema for existing project

Postby Colby Severson » Thu Apr 14, 2011 4:47 pm

I have an existing Dependency Tracker project that is already loaded with my DB schema.

When I open it up and hit the Update from Schema button it tells me that it is unable to connect using Windows Authentication and asks for a username and password.

When I type in the SQL auth username and password I get the same error message and prompt for login. If I go to the server and add my Windows Auth user and try again I get the same error message.

I've double checked the server and made sure SQL and Windows Auth are enabled and that the user has the correct password and rights on the instance and database. SQL Doc has no trouble connecting to this DB using the SQL auth account.

The thing is I already typed in my username and password when I set this project up and said to use SQL Auth when talking to this DB. If I try and Add Objects to Project I can see that both my user name and password have been stored and I can access the database.

The odd thing is when I open the Add Objects to Project I see the same server twice and I can't remove it. And if I try to add the objects that I was trying to get in via the refresh I get an error telling me I can't have the same DB multiple times.

Any idea what is going on?
Colby Severson
 
Posts: 4
Joined: Thu Apr 14, 2011 4:38 pm
Location: Denver, Co

Postby james.billings » Mon Apr 18, 2011 1:42 pm

Thanks for your post;

I'm not initially sure what could be causing the problem you're encountering. I'd ask you to first check over the permissions requirement here as it may be it's trying to access certain properties/permissions at that point that trigger the error?

If that doesn't helped, have you tried checking over the SQL Error Log to see if it lists any failed login attempts with some more information?
james.billings
 
Posts: 1144
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.

Postby Colby Severson » Mon Apr 18, 2011 3:36 pm

Thanks for the reply.

Unfortunately the link in your post for permissions takes me to a page that has another link which is supposed to describe the permissions needed (the same as SQL Compare) and that link is broken.

I doubled checked the user I am using and that user has SysAdmin rights to the instance and it's a 2005 DB so the additional GRANT VIEW SERVER TO <user> should not be needed.

I also ran SQL Compare against the DB just to make sure it would work and that ran fine too.

I checked the SQL Server Logs and did see logon failures for when I was trying to logon with the original project.

If I open Dependency Tracker and create a new project and login to the server with the same login everything works fine. If I then save that new project, close down and then reopen that new project and attempt to refresh I get the same error.

After trying that I noticed that the SQL Server Logs are reporting that it was attempting to login with both my SQL auth user and my Windows auth user.

After doing a bit of Googling (http://blogs.msdn.com/b/sql_protocols/archive/2006/02/21/536201.aspx) I've determined that it's either not passing in the SQL Auth password or it's passing in the wrong value as that entry has a State of 8 which indicates invalid password. For the entry for my Windows account (which it should not pass since this DB is connected via SQL Auth) it generates a State of 11 which indicates that it's a valid login but there's a server access failure.
Colby Severson
 
Posts: 4
Joined: Thu Apr 14, 2011 4:38 pm
Location: Denver, Co

Postby james.billings » Mon Apr 18, 2011 3:49 pm

That does sound a little wrong- I had a check here and I found a bug logged where someone reported a similar sounding problem; although it doesn't seem to have been fixed as yet. That only affected one database.

What version are you running? It's perhaps worth trying the latest patch (it's a stickied thread in this forum) but I don't see this listed as something it fixed, so it may not help...

It could also be worth you opening the saved project file in Notepad, as in amongst all the binary characters you should be able to see some XML where it will say the security method it's using (i.e. Integrated or not) - may be worth checking that. Also, when you initially added items to the project there is an "Options" button which gives you an option to save the password - not sure if you selected that?
james.billings
 
Posts: 1144
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.

Postby Colby Severson » Mon Apr 18, 2011 3:57 pm

I'm running version 2.6.1.47.

I did check the save password option. If I open the saved project and then click the Add Objects to Project button (which is the only way I know of to see the DB selected) it lists my SQL Server Instance twice (which could be part of the problem as I only opened the instance once) and both with the correct saved user and password. I can then expand that and see the correct DB and select or deselect items. Clicking Add Selection to Project generates errors though.

When I open the project in Notepad and I scroll all the way to the bottom I can see the XML you mentioned, but it looks like some of it is missing as it ends like this "<projectDatabase instanc". The integratedSecurity option is set to false.

I'll download and try the latest patch.
Colby Severson
 
Posts: 4
Joined: Thu Apr 14, 2011 4:38 pm
Location: Denver, Co

Postby Colby Severson » Mon Apr 18, 2011 4:07 pm

After installing the latest patch the problem does not appear to happen. I was able to open my saved project and do a Update From Schema and it worked with no login failures. Everything updated.

Thanks!
Colby Severson
 
Posts: 4
Joined: Thu Apr 14, 2011 4:38 pm
Location: Denver, Co

Postby james.billings » Mon Apr 18, 2011 4:09 pm

Ah, that's good to hear - not sure what was happening there, but I'm guessing an error in the saved file of some sort.

Let us know if you have further trouble.
james.billings
 
Posts: 1144
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.


Return to SQL Dependency Tracker 2

Who is online

Users browsing this forum: No registered users and 0 guests