Creating Your First Package


Before you jump into the fundamentals of the toolset, you should exercise some of the BIDS features by creating a very basic package. If you don't understand some of this, don't worry yet. It will make much more sense later in this chapter and in Chapter 3. This quick example will show you how to configure a task and how to chain tasks together with precedence constraints.

Start by opening BIDS by selecting Start Programs Microsoft SQL Server 2005 SQL Server Business Intelligence Development Studio. Once BIDS is open, select New Project from the File menu. Under the Business Intelligence Project Type on the left, select Integration Services Project. Call the project "Basic Package" for the Name option, and then click OK.

In the Solution Explorer to the right of BIDS, you'll see that an empty package called Package1.dtsx was created. On the left of BIDS is your Toolbox, which contains all of the work items that you can accomplish in whatever tab you're in. In the Toolbox, drag the Execute Process task over to the empty design pane in the middle. Double-click on the task to configure it. This opens the editor for the given task, transformation, or data connection you wish to configure. Name the task Notepad, and you can optionally enter a description in the General page. Select the Process page in the left pane, and for the Executable option, select Notepad .exe. Click OK to exit the editor.

Drag another Execute Process task over and double-click on it to open the editor again. Name this task Calc. In the Process page, type calc.exe for the Executable option. Click OK to exit the editor. Click the first Notepad task and you'll see a green arrow pointing downward from the task. This is a precedence constraint, which was mentioned in Chapter 1. Left-click on the arrow and drag it onto the Calc task. These tasks are now connected, and the Calc task will not execute until the first task succeeds.

Click the Save icon to save the package. Select Debug Start Debugging or hit F5. This will execute the package. You should first see Notepad open, and once you close Notepad, the Windows calculator will open (as shown in Figure 2-11). Once you close the calculator, the package will complete. The two tasks should also show as green in color, which means they successfully executed. You can click the Stop button or select Stop Debugging under the Debug menu to complete the package's execution.

image from book
Figure 2-11

Congratulations, you have created your first package. Granted, this package will never be used in a production environment, but it does show you the basic concepts in SSIS. It's important to note that you will not develop packages that have interactive windows like this. If you were to execute this in production, it would wait for a user's interaction to close the window before the package would complete. The concepts you were introduced to here will be described in greater detail in each upcoming chapter, and now you'll learn about the features that are available to you in BIDS.



Professional SQL Server 2005 Integration Services
Wireless Java : Developing with Java 2, Micro Edition
ISBN: 189311550X
EAN: 2147483647
Year: 2006
Pages: 182

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net