Author |
Message |
gemisigo
Joined: 11 Mar 2010 Posts: 2137
|
|
[SA 9.0.166 Pro] - Connection indicator + FR |
|
There are several locations in SQL Editor some connection properties are displayed (see screenshots below)
and
Upon establishing connection the window title, tab title, and tab all show the connection name that is given in SA Options > DB Options > DB Connections, and the status bar shows the server name (second image). Later at some point the former three changes into the word Current concatenated with the server name, and the connection name is gone, making servers with not very talkative names like the localdb server in the example completely unrecognizable. At the same time the color associated with the connection vanishes from the status bar server name.
I'm never going to memorize which connection is #05F2A65, not to mention what to do in case that number changes. Also, a new connection name Current appears in SA Options > DB Options > DB Connections. Which is, I guess that's what SA refers to as CurrentGEMWORKS... and the reason the connection color is reset to No.
Is there a way to alter this behavior? I mean I'd really like if the connection name displayed would not change so suddenly. And the connection name could be displayed in the status bar next to the server name.
If the tabs could be colored the same way the status bar server name is, it would be great. If the whole editor background could be tinted with the extremely faded version of that color, distinguishing connection would not require constant checking of those indicators. For example, it could help prevent accidentally running vastly dangerous code on production servers, like I did just a few moments ago (but I guess I'm aiming too high with that one).
|
|
Thu Oct 20, 2016 10:59 am |
|
|
Mindflux
Joined: 25 May 2013 Posts: 838 Country: United States |
|
|
|
I've seen this as well.
In fact my editor currently shows it (no pun intended)
Last edited by Mindflux on Thu Oct 20, 2016 12:54 pm; edited 1 time in total |
|
Thu Oct 20, 2016 11:11 am |
|
|
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7903
|
|
|
|
Is #05F2A65 part of the database instance name?
What does the "Context" query return as your server name? I means the query from SQL Assistant options for SQL Server.
|
|
Thu Oct 20, 2016 12:53 pm |
|
|
gemisigo
Joined: 11 Mar 2010 Posts: 2137
|
|
|
|
It is. It is a named LocalDB instance. Context query returns GEMWORKS\LOCALDB#052F2A65, the same that is returned for
|
|
SELECT @@servername
|
The point is that we should not rely on server name for identification. Either because it can be as meaningless as in the example, or simply because any number of servers can have the same server name which makes them indiscernible.
|
|
Thu Oct 20, 2016 1:06 pm |
|
|
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7903
|
|
|
|
|
|
It is. It is a named LocalDB instance. Context query returns GEMWORKS\LOCALDB#052F2A65, the same that is returned for
|
|
SELECT @@servername |
The point is that we should not rely on server name for identification. Either because it can be as meaningless as in the example, or simply because any number of servers can have the same server name which makes them indiscernible.
|
I see. You can actually change the name of the connection in SQL Assistant settings. In DB Connections section rename it on the left side of the screen to something friendlier, for example, rename to "Sandbox database." After you reconnect this new name will appear in the top title bar and on the editor's tab. Hope this helps.
|
|
Fri Oct 21, 2016 12:51 am |
|
|
gemisigo
Joined: 11 Mar 2010 Posts: 2137
|
|
|
|
Er... I guess you missed a few things described in the first post. I'm aware of the ability to rename connections. If you check the screenshot again, you can see that it shows the connection as (localdb)\kapos(GEMWORKS\LOCALDB#052F2A65), that is, in connection name(server name) format, where localdb(kapos) is the connection name and GEMWORKS\LOCALDB#052F2A65 in the brackets is the server name. The problem is that it changes after a while (I don't know what triggers that), and then only Current + server name is displayed.
|
|
Fri Oct 21, 2016 3:00 am |
|
|
Mindflux
Joined: 25 May 2013 Posts: 838 Country: United States |
|
|
|
Yeah I'm not sure what triggers that change either. Mine goes from FRY to CurrentFRY
|
|
Fri Oct 21, 2016 8:15 am |
|
|
gemisigo
Joined: 11 Mar 2010 Posts: 2137
|
|
|
|
I guess FRY is both your connection and the name of your server as well, right?
|
|
Fri Oct 21, 2016 8:19 am |
|
|
Mindflux
Joined: 25 May 2013 Posts: 838 Country: United States |
|
|
|
|
|
I guess FRY is both your connection and the name of your server as well, right? |
Yes
|
|
Fri Oct 21, 2016 8:28 am |
|
|
gemisigo
Joined: 11 Mar 2010 Posts: 2137
|
|
|
|
Well, this only causes minor confusion when you've got properly named servers.
|
|
Fri Oct 21, 2016 8:31 am |
|
|
Mindflux
Joined: 25 May 2013 Posts: 838 Country: United States |
|
|
|
|
|
Well, this only causes minor confusion when you've got properly named servers. |
Doesn't mean it's not annoying!
I just lived with it because I wasn't sure why it was doing that
|
|
Fri Oct 21, 2016 8:38 am |
|
|
gemisigo
Joined: 11 Mar 2010 Posts: 2137
|
|
|
|
|
|
Doesn't mean it's not annoying!
I just lived with it because I wasn't sure why it was doing that |
I did not say a word about it not being annoying :) I'm frustrated by it as hell...
I'm pretty sure it's the consequence of that mysterious Current connection getting auto-created. However, the reason behind that one is beyond me. SysOp?
|
|
Fri Oct 21, 2016 8:46 am |
|
|
Mindflux
Joined: 25 May 2013 Posts: 838 Country: United States |
|
|
|
|
|
|
|
Doesn't mean it's not annoying!
I just lived with it because I wasn't sure why it was doing that |
I did not say a word about it not being annoying :) I'm frustrated by it as hell...
I'm pretty sure it's the consequence of that mysterious Current connection getting auto-created. However, the reason behind that one is beyond me. SysOp? |
I get connections named (none) and ".", in the DB Connections pane from time to time for who knows what reason.
|
|
Fri Oct 21, 2016 8:50 am |
|
|
gemisigo
Joined: 11 Mar 2010 Posts: 2137
|
|
|
|
The same here. I just dumped those mindlessly.
EDIT: I guess those get created when upgrading SA and it merges a few things from the factory.sas with your.sas.
|
|
Fri Oct 21, 2016 8:55 am |
|
|
Mindflux
Joined: 25 May 2013 Posts: 838 Country: United States |
|
|
|
Aside from the tangent we had. Any ideas why "current" ends up in the connection name in the title bar and tabs?
|
|
Fri Oct 21, 2016 5:26 pm |
|
|
|