A way for one-click connect to remote SQL Server 2008 and execute T-SQL command

Dear experts,

I just implement a complicated DB solution with SQL Server 2008, but it is not complated. So I need an tool or settings which allows me with 1 click to open a connection to remote SQL Server where I to execute T-SQL /with copy/paste - for example I modify a SP on my local DB and need to put it production DB/. Now I do this with MS SQL Server Management studio, but it require 3-5 clicks and navigation with Registered servers that I want to automaise as I expect OFTEN to do such operations. The ideal solution is to make a button in the Management Studio which directly open a remote SQL Server and even open a default Database, or Shortcut key but I found no such option. May be this could be provided with an external Adds-Ins?

I’m sure this is a common task for many colleagues. What is the best/fastes tool approach for such kind of operations?
dvplayltdAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Eugene ZCommented:
you can try to use the command line sqlcmd Utility to this

http://technet.microsoft.com/en-us/library/ms162773(v=sql.105).aspx
0
Aaron TomoskySD-WAN SimplifiedCommented:
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
dvplayltdAuthor Commented:
sqlcmd can do the job I ask, but not in good for me style. When I say update to DB - i mean update of 2-5 SP, not one text line and without visual interface it is not practical.

SSMS command line params look useful ... I'll give you the points or part of points if other useful answer come.

Is there a way in SSMS to make a shortcut to Registered server tab and to put it as button on toolbar. This will be 100 % a solution like I need, i look in SSMS but find no way.
0
Newly released Acronis True Image 2019

In announcing the release of the 15th Anniversary Edition of Acronis True Image 2019, the company revealed that its artificial intelligence-based anti-ransomware technology – stopped more than 200,000 ransomware attacks on 150,000 customers last year.

Ryan McCauleyEnterprise Analytics ManagerCommented:
I'm not sure how often you expect to do this, or how many servers you'll be updated, and while it seems like you're just trying to avoid something annoying, I just wanted to offer up that creating and maintaining a solution in SSMS to avoid this issue might be more trouble than it's worth - if it only saves you a few clicks a month, it's not likely to work the effort.

That said, there are some options outside of SSMS that might fit your needs nicely - Powershell is one, can connect to however many servers you want (a list from a file, even) and execute your script, even collecting the results from all the servers on which it ran the script. Your time might be better spent learning how to use Powershell and writing a solution there.
0
dvplayltdAuthor Commented:
To ryanmccauley

I'm with 15+ years in IT as both programmer and admin, the ask is because ALL the time I do such operations - for now with 2 Databases every day I do T-SQL change 5-10 times per day, but when Databases becoume 10 - you may calculate on your own how much click this mean. And worst-if I forget to apply ot one DB ...

PowerShell .. i take fast look, but it do now look like useful for me.
0
dvplayltdAuthor Commented:
10x. Until I found better solution, I'll use this. In fact, I already start useing it. Better solution - may be with Red Gate or other commercial tool.
0
Ryan McCauleyEnterprise Analytics ManagerCommented:
I realize it's tedious - I wasn't trying to suggest that manual is better, and didn't realize the scope of your need. It's just the kind of task that I tend to see over-engineered to solve a very small problem - in your case, it sounds like it's common enough that it makes sense to have another solution.

Red-Gate does have a tool called "Multi-Script" that will execute the exact same script on multiple SQL Servers at once and return all the results in one place:

http://www.red-gate.com/products/dba/sql-multi-script/

We've always used it to change our SA password globally or do collections of configuration data, and it works well for that - I suspect it would work for you too for what you're looking to do.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2008

From novice to tech pro — start learning today.