Setting Up a Macro in the BIDS Toolbar to Execute an SSIS Package

Here’s an extremely helpful little tip that my friend, Ken Hendrix, showed me the other day. Currently, to execute a single SSIS package in  BIDS, you have to open the Solution Explorer, right-click the package, and click Execute. If you’re debugging a lot or do not have your Solution Explorer open, this can sometimes be a little inconvenient. So Ken came up with a Macro that you can add to your tool bar that will allow you to execute your open package with a single click.

1. The first step is to create the Macro. With BIDS open, click View, select Other Windows, and Select Macro Explorer.
2. In the Macro Explorer, expand MyMacros and right-click on Module1. Select New Macro.

20110729 Execute Package Macro

3. Change the Macro Sub Name to ExecutePackage and add the Sub below:

Sub ExecutePackage() DTE.ExecuteCommand("ProjectandSolutionContextMenus.Item.ExecutePackage") End Sub

Your macro should look like this:


4. Now we need to add the Macro to the toolbar in BIDS. At the end of the Standard toolbar, click the little drop down arrow, select Add or Remove Button. Then select Customize.

Add macro button

5. On the Commands tab of the Customize window, select Macros in the Categories pane. Find the Macro you created. It should read MyMacros.Module1.ExecutePackage if you gave it the same name as I did. Next, drag the Macro into the toolbar where you would like it to be.

Find MyMacro

6. With the Customize window still open, right-click the Macro in the toolbar, click Change Button Image, and select the icon you would like to display for your Macro. I selected the little running man. Lastly, right-click the Macro in the toolbar and click Default Style to remove the text next to the icon in the toolbar.

Change icon

And you’re finished! To execute an SSIS package with the new Macro, either highlight the package in the Solution Explorer or focus on the tab with the open package. Then click the icon to execute your Macro.

Macro toolbar Icon

I hope someone else finds this as helpful as I did. Thanks, Ken!

Leave a Reply