Favorites or macros in SQL Server Management Studio?

I have several databases in which I always use SQL Server Management Studio. I would like to be able to create a toolbar button or keyboard shortcut that automatically opens a new query window (in the current instance of SSMS) and connects to this (registered, possibly) database. It. It's all I need. And this ashtray, and the oars, and the remote control. It's all I need.

As now, I need to expand Object Explorer, collapse / expand two to eight trees, right-click on my database and select "New query". I see no way to do this, it will probably save me 30-60 seconds a day, which costs at least one dollar and NINE CENTS.

+7
sql-server sql-server-2005 ssms
source share
5 answers

I’m the developer of SSMSBoost add-ons and it has exactly what you need: it allows you to manage the list of preferred servers / databases and quickly switch between them through the custom Combobox in the toolbar, you can also tell if you want all the servers to be open in ObjectExplorer at startup , and if it is necessary for them to open a new request window (for each server).

SSMSBoost also allows you to define aliases (instead of server8273128> MainServer, server231232> BackupServer, etc.). It has more features - but they are not within the scope of this topic.

Look at the image - you can see the Quick Connection Switch drop-down menu with some servers from the preferred connections, "SSMSBoostDemoServer" is an alias for the server, the next name is original.

One more thing - the add-in is available in the version for free .

SSMSBoost toolbar

+9
source share

Did you try to create a registered server?

Take a look at the Registered Servers view (Ctrl-Alt-G). Define a connection to the server. Set a password and select the Remember Password check box if you are not using Windows Authentication. On the Connection Properties tab, specify your preferred database. Save the server registration.

Now, in order to connect to this database on this server (provided that you have the Registered Server panel always visible, like me), you just need to select this node registration and press Ctrl-N.

This should save at least 43 seconds per day.

+2
source share

I have not read all of this yet, but this article is about creating add-ins for SSMS, which you may be able to do to automate what you want.

+2
source share

You can create a shortcut to start SQL Server Management studio using command-line options as follows:

SQLWB.EXE - launches SQL Server Management Studio from the command line or Start β†’ Run text box. Through your switches, you can specify the type of server (-t S, -t A or -t C for SQL Server, Analysis Server or SQL Server Mobile Edition, respectively), server name (-S) and database (-d) to which You want to connect, provide authentication information, or specify which requests, projects, or solutions to open (-i filename). The default values ​​(in the absence of switches) are defined in the Tools β†’ Options menu in SQL Server Management Studio.

[A source]

+1
source share

This solution is admittedly hacked, but if you can determine the exact keystrokes needed to execute each macro, you can use a free tool like AutoHotKey to automate keystrokes using any keyboard shortcuts.

+1
source share

All Articles