Here’s the final blog – Part 3 of this series.
Now, we have taken one of the previously build Deploy SSIS function (“ Deploy-File2SQL ”), included in a compiled Windows application, and then integrate this solution to be run from within Visual Studio 2008. For this solution I need to have the following:
1. I’m using SAPIEN Technologies “Primal Forms 2009” (the full edition) which allow me to compile my script creating my executable.
2. Add two of my previously created function: 1. “Show-MsgBox” and 2.“Deploy-File2SQL.ps1“. Then, make some modifications to the code so it can use in this Windows Application.
3. Finally, have my Visual Studio 2008 ready so I can add my solution under the “Tool” pull-down menu.
Here’s how my DeploySSIS Windows Application look like in Primal Form 2009:
Here’s running the application:
The good thing about Primal Forms 2009, is that it will generate the code for the Windows form and you only need to fill the code behind. The best feature I consider valuable is that you can create an Windows executable.
This is just to show you how you can improve your PowerShell scripting to the point of building a practical executable solution that can be easily deploy to a Microsoft application.
Now, let see the integration to Visual Studio 2008. We are going to add our solution under the “Tool” drop-down menu. But, in order to do this we need to, under “Tools”, click on “External Tools…”, then click on the “Add” button, and fill out the information:
Now, when you go back to Visual Studio 2008 and click on the Tool menu, we can see our added item. So, when you completed building your SSIS package solution in Visual Studio and ready to deploy to a server, then you can do this from within your development environment.
This is how it looks:
1. Look for the “Deploy File to SQL”, click to execute
2. Look for the SSIS package to be deploy to SQL Server 2008 Integration Services and the rest of the information will be auto-filled.
3. Before we execute to deploy this package we can do the following:
a. By Default, the “SQL Server Destination” is your local machine, but you can change this to another server.
b. The “Copy To…” field you can rename your SSIS package.
4. Now, we are ready to click on “Execute/Deploy” button to copy our SSIS package to SQL Integration Services:
Our solution works and it will run DTUtil from our “Deploy-File2SQL” function and now you can deploy SSIS packages from your file system to your SSIS SQL Server.
If you would like a copy of this solution, I will have it available from CodePlex Project PSMaxTinyTools or send me an email to firstname.lastname@example.org