SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
[SA 7.2.338 Pro] - Connection issues with source code repo

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
[SA 7.2.338 Pro] - Connection issues with source code repo
Author Message
gemisigo



Joined: 11 Mar 2010
Posts: 2108

Post [SA 7.2.338 Pro] - Connection issues with source code repo Reply with quote
I've got some issues with connecting to database with source code repository. I guess it is related to my other connection issues when names, IP or the rest were involved. There's a database on my machine that resides in SQL Server Express LocalDB. I can connect to it with SQL Editor but it seems that SQL Editor / SA are not capable to share their knowledge about the connection with the repository browser which is unable to connect to the same database.

Is there a workaround or a permanent solution?
Thu Sep 24, 2015 12:36 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7847

Post Reply with quote
I'm sorry I don't understand how that is possible. The repository browser and the editor share the same database connection.

How does the connection issue manifest itself?
Thu Sep 24, 2015 5:23 pm View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2108

Post Reply with quote
EDIT: it does not seem to depend on localdb, it cannot retrieve code from other servers either. The DDL utility tries to connect to the server using their name and that's not working. It is using the name it has retrieved from the server not the one that had used to establish the connection.

I connect to the database then I open the Repository Browser. It connects to the database as well (the objects are visible at least). Then I try to refresh the contents of the workspace. This is the point where connection fails.
Check the screenshot below:

Fri Sep 25, 2015 3:47 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7847

Post Reply with quote
What kind of connectivity interface are you using ADO or ODBC?

I see something unusual in the connection reference. What's # 695795F5?
Sat Sep 26, 2015 1:52 pm View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2108

Post Reply with quote
The connection interface is ODBC. SQL Express LocalDB does not support TCP/IP connections, it only works through named pipe (server name given as "(localdb)\v11.0"). That's the #number in the connection reference. It seems that LocalDB instance starts as soon as there's reference to it (trying to connect) and stops shortly after the last connection is closed, hence that number changes after closing SQL Editor (or simply closing all connections to it) and opening/connecting a few minutes later.

At first I thought named pipe was the cause but it couldn't retrieve code from TCP/IP connections either.
Sat Sep 26, 2015 2:31 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7847

Post Reply with quote
The Repository Browser is actually connected to the database, because the left side database tree is populated. It is the DDL scripting function that fails. That function indeed needs a separate connection which depends on SMO API.

Here is what I found out for this issue https://connect.microsoft.com/SQLServer/feedback/details/723737/smo-cant-connect-to-localdb-instances
You may need to install SQL Management Studio Express on your computer to get that working and/or apply .NET update 4.0.2 http://support.microsoft.com/kb/2544514
Sat Sep 26, 2015 3:52 pm View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2108

Post Reply with quote
SysOp wrote:
You may need to install SQL Management Studio Express on your computer to get that working and/or apply .NET update 4.0.2 http://support.microsoft.com/kb/2544514


I've got SQL Management Studio installed (though not the Express one) so I decided to go the second option but when trying to apply the update I got an error message:
Quote:
KB2544514 does not apply, or is blocked by another condition on your computer.


SysOp wrote:
The Repository Browser is actually connected to the database, because the left side database tree is populated. It is the DDL scripting function that fails. That function indeed needs a separate connection which depends on SMO API.

That would explain why it won't work on a LocalDB instance but it doesn't work on other standard server installations either.
Mon Sep 28, 2015 3:49 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7847

Post Reply with quote
What do you get when running the following command

saDDL.exe -l -c "server name here" -u "login name here" -p "password here" -d "db name here" -s "schema name here" -o "table name here" -t table

Please substitute parameter values as required. If you use Windows authenticated connections, ommit u and -p parameters
Mon Sep 28, 2015 1:20 pm View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2108

Post Reply with quote
I got what was expected. In case where the server was only accessible through IP option like -c "172.16.2.xx" worked (though it took very long time) but -c "LINESRV0yy" failed. Where I could ping the server using both IP and its name both options worked. The problem is that saDDL is always called using the server name regardless if that was used to establish the connection or not.
Mon Sep 28, 2015 4:13 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7847

Post Reply with quote
One old classics solution for dealing with name and IP mapping is to enter them into hosts file (see https://www.google.com/?gws_rd=ssl#q=windows+hosts+file). That is a simple one time change which would resolve issue of IP mapping by name.
Mon Sep 28, 2015 7:52 pm View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2108

Post Reply with quote
Yes, that works, but requires regular updates to hosts file.
Tue Sep 29, 2015 3:22 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
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
Design by Freestyle XL / Flowers Online.