Beginning Microsoft SQL Server 2008 ... - S3 Tech Training
Beginning Microsoft SQL Server 2008 ... - S3 Tech Training Beginning Microsoft SQL Server 2008 ... - S3 Tech Training
Chapter 18: Getting Integrated with Integration Services Connection Managers This is a bit of misnomer. This isn’t so much a list of connection managers as it is a list of connections. By taking a look at the Description column, you’ll see many of the key properties for each connection your package uses. Notice that in our example package, we have two connections, and if you look closely, you’ll see how one relates to file information (for our connection to the flat file we’re using) and there is another that specifically relates to SQL Server (the export source connection). Execution Options Do not underestimate the importance of this one. Not only does it allow you to specify how, at a high level, you want things to happen if something goes wrong (if there’s an error), but it also allows you to establish checkpoint tracking — making it easy to see when and where your package is getting to different execution points. This can be critical in performance tuning and debugging. Reporting This one is all about letting you know what is happening. You can set up for feedback: exactly how much feedback is based on which events you decide to track and the level of information you establish. Logging This one is fairly complex to set up and get going, but has a very high “coolness” factor in terms of giving you a very flexible architecture of tracking even the most complex of packages. Using this area, you can configure your package to write log information to a number of preconfigured “providers” (essentially, well understood destinations for your log data). In addition to the preinstalled providers such as text files and even a SQL Server table, you can even create your own custom providers (not for the faint of heart). You can log at the package level, or you can get very detailed levels of granularity and write to different locations for different tasks within your package. Set Values This establishes the starting value of any run-time properties your package uses. (There are none in our simple package.) Verification Totally different packages can have the same file name (just be in a different spot in the file system, for example). In addition, packages have the ability to retain different versions of themselves within the same file or package store. The Verification dialog is all about filtering or verifying what package/version you want to execute. Command Line 560 You can execute SSIS packages from the command line (handy when, for example, you’re trying to run DTS packages out of a batch file). This option within the SSIS Package Execution Utility is about specifying parameters you would have used if you had run the package from the command line. The utility will establish most of this for you; the option here is just to allow you to perform something of an override on the options used when you tell the utility to execute.
Executing the Package If you simply click Execute in the Package Execution Utility, your package will be off and running. After it runs, you should find a text file in whatever location you told your package to store it; open it up, take a look, and verify that it was what you expected. Executing Using the SQL Server Agent We haven’t really discussed the SQL Server Agent up to this point, but, from an SSIS point of view, think of the SQL Server Agent as a job scheduler that allows you to do the same thing as running DTExec.exe, but doing so on a specific time and frequency basis with very robust job and task scheduling systems to integrate your package into a larger set of system jobs. We will discuss the agent in a bit more detail in our next chapter. Executing a Package from Within a Program SQL Server offers a very rich object model that is usable from within any .NET language. The programmability object model is well beyond the scope of this book, but suffice to say that you can not only programmatically execute packages, but dynamically build packages to meet a certain need before executing them. A Final Word on Packages I want to take a moment and reiterate how much we’ve really only touched the surface of what’s possible. As I’ve said before, there are entire books (rather large ones actually) written around Integration Services as the sole topic. The package we focused on here was generated by the Import/Export Wizard, but the end product was a typical SSIS package. Not only could we edit it, but we could well have built it from scratch ourselves. We could easily add other tasks to deal with things like “scrubbing” data after importing it to some form of “staging” area and then perform additional tasks. We can add complex branching to deal with errors or perform several tasks in parallel; the possibilities go on and on. Summary Chapter 18: Getting Integrated with Integration Services SQL Server Integration Services is a robust Extract, Transform, and Load tool. You can utilize Integration Services to provide one-off or repeated import and export of data to and from your databases — mixing a variety of data sources while you’re at it. While becoming expert in all that Integration Services has to offer is a positively huge undertaking, getting basic imports and exports up and running is a relative piece of cake. I encourage you to start out simple, and then add to it as you go. As you push yourself further and further with what SSIS can do, take a look at other books that are specific to what SSIS has to offer. 561
- Page 548 and 549: Chapter 16: A Brief XML Primer 510
- Page 550 and 551: Chapter 16: A Brief XML Primer 512
- Page 552 and 553: Chapter 16: A Brief XML Primer The
- Page 554 and 555: Chapter 16: A Brief XML Primer 516
- Page 556 and 557: Chapter 17: Reporting for Duty, Sir
- Page 558 and 559: Chapter 17: Reporting for Duty, Sir
- Page 560 and 561: Chapter 17: Reporting for Duty, Sir
- Page 562 and 563: Chapter 17: Reporting for Duty, Sir
- Page 564 and 565: Chapter 17: Reporting for Duty, Sir
- Page 566 and 567: Chapter 17: Reporting for Duty, Sir
- Page 568 and 569: Chapter 17: Reporting for Duty, Sir
- Page 570 and 571: Chapter 17: Reporting for Duty, Sir
- Page 572 and 573: Chapter 17: Reporting for Duty, Sir
- Page 574 and 575: Chapter 17: Reporting for Duty, Sir
- Page 576 and 577: Chapter 17: Reporting for Duty, Sir
- Page 578 and 579: Chapter 17: Reporting for Duty, Sir
- Page 580 and 581: Chapter 17: Reporting for Duty, Sir
- Page 582 and 583: Chapter 18: Getting Integrated with
- Page 584 and 585: Chapter 18: Getting Integrated with
- Page 586 and 587: Chapter 18: Getting Integrated with
- Page 588 and 589: Chapter 18: Getting Integrated with
- Page 590 and 591: Chapter 18: Getting Integrated with
- Page 592 and 593: Chapter 18: Getting Integrated with
- Page 594 and 595: Chapter 18: Getting Integrated with
- Page 596 and 597: Chapter 18: Getting Integrated with
- Page 601 and 602: 19 Playing Administrator And so, he
- Page 603 and 604: ❑ Write the information to the ev
- Page 605 and 606: Creating Jobs and Tasks Using Manag
- Page 607 and 608: Let’s go ahead and move on to the
- Page 609 and 610: Figure 19-8 Figure 19-9 Chapter 19:
- Page 611 and 612: Figure 19-11 Figure 19-12 Chapter 1
- Page 613 and 614: Backup and Reco very No database-dr
- Page 615 and 616: ❑ Differential: This might be ref
- Page 617 and 618: ❑ Simple: Under this model, the t
- Page 619 and 620: The older DBCC commands are still s
- Page 621 and 622: many rows inserted over time and th
- Page 623: Chapter 19: Playing Administrator T
- Page 626 and 627: Appendix A: System Functions In add
- Page 628 and 629: Appendix A: System Functions @@TOTA
- Page 630 and 631: Appendix A: System Functions CHECKS
- Page 632 and 633: Appendix A: System Functions SUM Th
- Page 634 and 635: Appendix A: System Functions The de
- Page 636 and 637: Appendix A: System Functions @@REMS
- Page 638 and 639: Appendix A: System Functions Cert_I
- Page 640 and 641: Appendix A: System Functions Encryp
- Page 642 and 643: Appendix A: System Functions @@FETC
- Page 644 and 645: Appendix A: System Functions CURREN
- Page 646 and 647: Appendix A: System Functions SYSDAT
Chapter 18: Getting Integrated with Integration Services<br />
Connection Managers<br />
This is a bit of misnomer. This isn’t so much a list of connection managers as it is a list of connections. By<br />
taking a look at the Description column, you’ll see many of the key properties for each connection your<br />
package uses. Notice that in our example package, we have two connections, and if you look closely, you’ll<br />
see how one relates to file information (for our connection to the flat file we’re using) and there is another<br />
that specifically relates to <strong>SQL</strong> <strong>Server</strong> (the export source connection).<br />
Execution Options<br />
Do not underestimate the importance of this one. Not only does it allow you to specify how, at a high<br />
level, you want things to happen if something goes wrong (if there’s an error), but it also allows you to<br />
establish checkpoint tracking — making it easy to see when and where your package is getting to different<br />
execution points. This can be critical in performance tuning and debugging.<br />
Reporting<br />
This one is all about letting you know what is happening. You can set up for feedback: exactly how much<br />
feedback is based on which events you decide to track and the level of information you establish.<br />
Logging<br />
This one is fairly complex to set up and get going, but has a very high “coolness” factor in terms of giving<br />
you a very flexible architecture of tracking even the most complex of packages.<br />
Using this area, you can configure your package to write log information to a number of preconfigured<br />
“providers” (essentially, well understood destinations for your log data). In addition to the preinstalled<br />
providers such as text files and even a <strong>SQL</strong> <strong>Server</strong> table, you can even create your own custom providers<br />
(not for the faint of heart). You can log at the package level, or you can get very detailed levels of granularity<br />
and write to different locations for different tasks within your package.<br />
Set Values<br />
This establishes the starting value of any run-time properties your package uses. (There are none in our<br />
simple package.)<br />
Verification<br />
Totally different packages can have the same file name (just be in a different spot in the file system, for<br />
example). In addition, packages have the ability to retain different versions of themselves within the<br />
same file or package store. The Verification dialog is all about filtering or verifying what package/version<br />
you want to execute.<br />
Command Line<br />
560<br />
You can execute SSIS packages from the command line (handy when, for example, you’re trying to run<br />
DTS packages out of a batch file). This option within the SSIS Package Execution Utility is about specifying<br />
parameters you would have used if you had run the package from the command line.<br />
The utility will establish most of this for you; the option here is just to allow you to perform something<br />
of an override on the options used when you tell the utility to execute.