Author |
Message |
rnan
Joined: 12 Jul 2012 Posts: 56 Country: Faroe Islands |
|
Change conenction for corrent query ? |
|
I have a query in ssms 2014
I see it
it runs on server 1
Now I want to run this query on server 2.
Is there any option to "change connection" ?
You should defenitlly addd this.
best will be also on "registered servers section".
|
|
Sun Oct 29, 2017 9:45 am |
|
![](templates/GreenTech/images/spacer.gif) |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7849
|
|
|
|
Of course there is. I assume you are referring to SQL Assistant SQL Editor. You can simply change the connection in the current tab (SQL Assistant / Connect menu or right-click then select Conenct)
But even better, you can have your SQL code executed on multiple servers concurrently in parallel, or sequentially. Please see in the manual CHAPTER 14, Executing SQL Scripts on
Multiple Servers
|
|
Mon Oct 30, 2017 9:57 am |
|
![](templates/GreenTech/images/spacer.gif) |
rnan
Joined: 12 Jul 2012 Posts: 56 Country: Faroe Islands |
|
Im talking about ssms. With swlassistant |
|
Im not using swl assistant editor
|
|
Mon Oct 30, 2017 10:01 am |
|
![](templates/GreenTech/images/spacer.gif) |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7849
|
|
|
|
what are you using? I cannot help you if I don't know what you are doing. Please provide all necessary details.
|
|
Mon Oct 30, 2017 10:07 am |
|
![](templates/GreenTech/images/spacer.gif) |
rnan
Joined: 12 Jul 2012 Posts: 56 Country: Faroe Islands |
|
well |
|
im using ssms2014 with sql assistant
It would be great to have on registered servers : " set as active connection"
so when you see a query in front on you , you can jsut change connection and execute the query.
|
|
Mon Oct 30, 2017 10:26 am |
|
![](templates/GreenTech/images/spacer.gif) |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7849
|
|
|
|
In SSMS all connections are managed by SSMS. SQL Assistant add-on depends on SSMS connections. So if you want to execute your code on a different server, you will need to use the Query -> Connection -> Change Connection...menu in SSMS to change the connection.
Please note that you still can use SQL Assistant -> Execute & Schedule SQL -> Execute Code (Multiple Servers)... menu to run your code on multiple servers as I mentioned earlier.
|
|
Wed Nov 01, 2017 2:27 am |
|
![](templates/GreenTech/images/spacer.gif) |
rnan
Joined: 12 Jul 2012 Posts: 56 Country: Faroe Islands |
|
This is not the same. |
|
This is not the same.
With SSMs-> query-> change connection it opens a new window and as you know the passwords is not always saved.
what im trying to tell you is that you might want to consider adding on the registered servers : a right click with : "Set As ActiveConnection"
that's it.
registered servers are 100% store passwords. and no other window is opened .Right click and that's it.
In other words :
https://i.stack.imgur.com/Z2iCm.png
You should make developers life easy.
When someone is using many connections/servers and he needs to run the same query on a selected (not all) servers :
Right click on registered servers is the best thing to do.
Im just saying,.
pass it on to the developers or to the author.
|
|
Wed Nov 01, 2017 4:02 am |
|
![](templates/GreenTech/images/spacer.gif) |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7849
|
|
|
|
Why do you ignore my suggestion for using the existing facility in SQL Assistant for running code on different servers?
Let me try to describe it differently.
You can save the same connections (register if you wish) in SQL Assistant settings. You only need to do that once.
To have the code in the active editor run on one or more servers all it takes is pressing one hot key to open Multi-server code execution dialog, clicking names of the server(s) you want and then clicking Execute. What could be simpler than that?
Am I missing anything here?
By the way, in SSMS the registered servers info is stored encrypted. I doubt add-ons and external applications can use it for anything.
|
|
Wed Nov 01, 2017 11:21 am |
|
![](templates/GreenTech/images/spacer.gif) |
rnan
Joined: 12 Jul 2012 Posts: 56 Country: Faroe Islands |
|
|
Wed Nov 01, 2017 11:34 am |
|
![](templates/GreenTech/images/spacer.gif) |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7849
|
|
|
|
Consider me stupid, but I still fail to understand what you are trying to say.
Are you saying you don't like the advanced SQL Assistant's data grid with multidimensional in memory data analytics, multi-format data exporting and scripting, with 1 click export to Excel with worksheet conditional formatting and data filtering, with 1 click multi-column sorting, etc... and you find, quote "which doesn't even uses the regular output result grid window ?!?!" better?
Best of all I can run the same script, say it's a deployment script, on a bunch of servers concurrently without a need to switch and run it on each of them separately. Connection names you see on my screenshot are for a bunch of test servers, that's why their names aren't pretty. In a real world I would expect to see the actual SQL Server names or their human friendly aliases, it's up to the user naming them in SQL Assistant settings (in the Options dialog, DB Connections). From where I stand, that's an enhancement over "the regular output result grid window."
By the way, what you see on my screenshot below was produced using development version 9.5. But your existing 9.2 version has the same features as what's pictured there, less new toolbars and less new charting capabilities. Please try something other thaa SELECT count(1), try a multiple-column/multi-row result set. You can execute it directly in SSMS using Ctrl+Shift+F9, no need to use multi-server execute to get it. Right-click the grid, try different menus. I hope you will like what you see.
(click images to see their full size version)
![](https://s1.postimg.org/1ibd4cvrez/ssms_n_grid_2.png)
|
|
Thu Nov 02, 2017 1:41 am |
|
![](templates/GreenTech/images/spacer.gif) |
rnan
Joined: 12 Jul 2012 Posts: 56 Country: Faroe Islands |
|
|
|
why do you force results on SQL Assistant's data grid ?
Have you ever considered that there are other options for the regular result grid which sql assitnt do not provide ?
For example : viewing certain information ( file) as the file itself ?
https://i.stack.imgur.com/WMzty.png
You should at least give the user an option : "show on a regular ssms grid"
becuase as a dba - there are other plugins ( as you can see in the picture).
Again im just suggesting a feature
Im not fighting with you.
SA is a magnificent tool
|
|
Thu Nov 02, 2017 3:38 am |
|
![](templates/GreenTech/images/spacer.gif) |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7849
|
|
|
|
Hi,
You certainly have a point. And I agree that deeper integration with SSMS is useful and enhances overall user's experience. I really appreciate your feedback. It helps us to better understand product usage scenarios and find out what we can improve on our part.
Why the other grid: SQL Assistant is a multi-platform multi-database tool supporting multiple development environments, SSMS happens to be one of them. We are trying to provide as much common functionality available in each target environment as possible. We don't force SQL Assistant's grid and other features, we make them available in SSMS using the add-on as a kind of bridge. The very same grid is available in VS, in Notepad++, in Toad, in PL/SQL Developer, in IBM Data Studio, etc... That multi-server code execution function requires SQL Assistant's "common" grid as the output in case output to screen selected as the destination. It can also write to data or log file capturing output and data from multiple servers, which as far as I understand is more useful for deploying changes and other things across multiple servers, as well as collecting statistics.
|
|
Thu Nov 02, 2017 9:29 am |
|
![](templates/GreenTech/images/spacer.gif) |
gemisigo
Joined: 11 Mar 2010 Posts: 2109
|
|
|
|
Sorry for interrupting, I only want to understand the issue here. You're obviously not using SQL Editor which would require using the technique SysOp mentioned. You're using SSMS, in which SA follows whatever connection your current tab has. You're also running the queries in SSMS and therefore get the results in its native grid (text/file/whatsoever).
So, what prevents you from changing the connection using registered servers the same way https://i.stack.imgur.com/XsLHV.gif shows? Being already able to do that, why would you need SA to do the same thing?
|
|
Fri Nov 10, 2017 6:30 pm |
|
![](templates/GreenTech/images/spacer.gif) |
|