Database Reference
In-Depth Information
string sPackageName
= Dts.Variables["PackageName"].Value.ToString();
string sMsg = "Package Name: " + sPackageName;
MessageBox.Show(sMsg, sPackageName);
Dts.TaskResult = (int)ScriptResults.Success;
}
Save the package, project, and solution. You're ready to run!
Debug Execution
Executing the package from within SQL Server Business Intelligence Development
Studio (BIDS) is straightforward. It works the same regardless of the deployment mod-
el selected. However, as with everything in the Visual Studio Integrated Development
Environment (VS IDE), you have several ways to accomplish this.
When you execute an SSIS package inside BIDS, you are invoking the SSIS de-
bugger. The SSIS debugger file is named DtsDebugHost.exe and it's stored in the
< drive >:\Program Files\Microsoft SQL Server\120\DTS\Binn
folder. It's important to realize you're executing the SSIS package inside a debug host
process. Why? There is overhead associated with debugging— those boxes don't
change color for free!
To execute the Chapter2.dtsx package in BIDS, press the F5 key. The debug
host loads, then it loads the package and executes it. You should see a message box
proclaiming the package name. When you click the OK button on the message box, the
Script task in the Chapter2 package control flow turns from yellow to green. A link ap-
pears beneath the Connections Managers tab to indicate package execution has com-
pleted. However, the DtsDebugHost.exe process is still executing. It continues ex-
ecuting until the BIDS debugger is stopped.
Here are some ways to start the BIDS debugger:
• Press the F5 key.
• Click the VCR Play button (the green arrow pointing right) on the tool-
bar.
• Click the Debug drop-down menu and select Start Debugging.
Search WWH ::




Custom Search