8

Recently I've found out, that there's an option to include most commonly used queries to be executed by clicking a button on SSMS toolbar.

You can do that by following these steps:

  1. Right mouse click on toolbar
  2. Click Customize
  3. Create new toolbar
  4. Modify it
  5. Add Command
  6. Under Query categories there's option to add up to 9 Custom SPs

Now when I came here, things look like that: enter image description here

However I'm struggling on how to add the actual procedure, that needs to be executed.

There's an option to add multiple SPs:

  1. Custom SP 1
  2. Custom SP 2
  3. ...
  4. sp_help
  5. sp_lock
  6. sp_who

How do I assign my procedure to be Custom SP 1, for instance?

To be clear: My goal is to have a button in SSMS toolbar, which would execute my desired procedure (query) on click.

4

1 回答 1

4

这是一个很好的问题,但要做到这一点,你必须采取一种可怕的方式。

不幸的是,我有德语版的 SSMS,所以我的屏幕可能会让你有点困惑。

下面你可以看到一个指南:

第一步 选项窗口

第二步 选择一个免费的快捷方式

最后 分配给工具栏

这似乎有点不舒服,但这是我知道/可以想象的唯一方法。

让我知道这是否有帮助!干杯

于 2017-03-13T08:04:50.230 回答