Adding a Format SQL Button to the Redgate Toolbar

存储架构 2017-11-15

I’ve gotten used to CTRL+K,Y to format SQL with SQL Prompt, but a customer wanted a button on the toolbar. It’s fairly easy to do, but I thought I should document the process for others.

First, if you click the small area on the right of a toolbar in SSMS, you’ll get an “Add or Remove Buttons” menu, as shown here.

If you click that, you’ll see this dialog.

In this case, I’m happy with the buttons, I want to customize my toolbar. Click that option. This opens up the dialog below, and I’ll want to click the “add Command” to add a menu item as a button.

From here, I get a list of all SSMS menus. In this case, I’ve clicked the Dimension item, and I can see all the possible menu items on the right.

However, I want a SQL Prompt item, so I need to scroll down the left to SQL Prompt. Once I click that, I see the commands on the right,

Now scroll the right to find Format SQL.

Click OK and then your new button appears in the list.

And on the toolbar.

Now you GUI clickers can reformat SQL quickly.

Voice of the DBA

责编内容by:Voice of the DBA (源链)。感谢您的支持!


PHP SQL: Selection of fields from three ... I am currently facing a problem where I am unable to link 3 separate SQL tables....
SQL Server 2016 Memory Accounting: A Suspicious Su... *** Come back soon, under construction :grin::grin::grin: *** Wading through al...
Converting HASH_VALUE to SQL_ID The V$SQL.SQL_ID is a 64-bit number in a base32 notation. And the V$SQL.HASH_VAL...
Add a version control to the existing SQL Server d... I am part of a development team currently working with a database that does not ...
Insert data into tables linked by a foreign key I am using PostgreSQL. Customer ================== Customer_ID | Name Order =...