Вы находитесь на странице: 1из 6

Data Flow

The Data Flow task encapsulates the data flow engine that moves data between sources and destinations,
providing the facility to transform, clean, and modify data as it is moved. Addition of a Data Flow task to a
package control flow makes it possible for the package to extract, transform, and load data.

Bulk Insert
The Bulk Insert task provides the quickest way to copy large amounts of data into a SQL Server table or view.
For example, suppose your company stores its million-row product list on a mainframe system, but the
company's e-commerce system uses SQL Server 2005 to populate Web pages. You must update the SQL Server
product table nightly with the master product list from the mainframe. To update the table, you save the product
list in a tab-delimited format and use the Bulk Insert task to copy the data directly into the SQL Server table.

Execute SQL
The Execute SQL task runs SQL statements or stored procedures from a package. The task can contain either a
single SQL statement or multiple SQL statements that run sequentially. You can use the Execute SQL task for
the following purposes:

Transfer Database
The Transfer Database task transfers a SQL Server database between two instances of SQL Server. In contrast
to the other tasks that only transfer SQL Server objects by copying them, the Transfer Database task can either
copy or move a database. The task can copy a database between instances of SQL Server 2000, instances of
SQL Server 2005, or one of each. This task can also be used to copy a database within the same server.

Transfer Error Messages


The Transfer Error Messages task transfers one or more SQL Server user-defined error messages between
instances of SQL Server. User-defined messages are messages with an identifier that is equal to or greater than
50000. Messages with an identifier less than 50000 are system error messages, which cannot be transferred by
using the Transfer Error Messages task.

Transfer Jobs
The Transfer Jobs task transfers one or more SQL Server Agent jobs between instances of SQL Server.

Transfer Logins
The Transfer Logins task transfers one or more logins between instances of SQL Server.

Transfer Master Stored Procedures


The Transfer Master Stored Procedures task transfers one or more user-defined stored procedures between
master databases on instances of SQL Server. To transfer a stored procedure from the master database, the
owner of the procedure must be dbo.

Transfer SQL Server Objects


The Transfer SQL Server Objects task transfers one or more types of objects in a SQL Server database between
instances of SQL Server. For example, the task can copy tables and stored procedures. Depending on the
version of SQL Server that is used as a source, different types of objects are available to copy. For example,
only a SQL Server 2005 database includes schemas and user-defined aggregates.

Analysis Services Execute DDL


The Analysis Services Execute DDL task runs data definition language (DDL) statements that can create, drop,
or alter mining models and multidimensional objects such as cubes and dimensions. For example, a DDL
statement can create a partition in the Adventure Works cube, or delete a dimension in Adventure Works
DW, the sample Analysis Services database included in SQL Server 2005.

Analysis Services Processing


The Analysis Services Processing task processes Analysis Services objects such as cubes, dimensions, and
mining models.

Data Mining Query


The Data Mining Query task runs prediction queries based on data mining models built in Analysis Services.
The prediction query creates a prediction for new data by using mining models. For example, a prediction query
can predict how many sailboats are likely to sell during the summer months or generate a list of prospective
customers who are likely to buy a sailboat.

File System
The File System task performs operations on files and directories in the file system. For example, by using the
File System task, a package can create, move, or delete directories and files. You can also use the File System
task to set attributes on files and directories. For example, the File System task can make files hidden or read-
only.

FTP
The FTP task downloads and uploads data files and manages directories on servers. For example, a package can
download data files from a remote server or an Internet location as part of an Integration Services package
workflow.

Message Queue
The Message Queue task allows you to use Microsoft Message Queuing (MSMQ) to send and receive messages
between SQL Server Integration Services packages, or to send messages to an application queue that is
processed by a custom application. These messages can take the form of simple text, files, or variables and their
values

Send Mail
The Send Mail task sends an e-mail message. By using the Send Mail task, a package can send messages if
tasks in the package workflow succeed or fail, or send messages in response to an event that the package raises
at run time. For example, the task can notify a database administrator about the success or failure of the Backup
Database task

Web Service
The Web Service task executes a Web service method. You can use the Web Service task for the following
purposes:
• Writing to a variable the values that a Web service method returns. For example, you could obtain the
highest temperature of the day from a Web service method, and then use that value to update a variable
that is used in an expression that sets a column value.
• Writing to a file the values that a Web service method returns. For example, a list of potential customers
can be written to a file and the file then used as a data source in a package that cleans the data before it
is written to a database.

XML
The XML task is used to work with XML data. Using this task, a package can retrieve XML documents, apply
operations to the documents using Extensible Stylesheet Language Transformations (XSLT) style sheets and
XPath expressions, merge multiple documents, or validate, compare, and save the updated documents to files
and variables.

ActiveX Script
The ActiveX Script task provides a way to continue to use custom code that was developed using ActiveX
script, until such scripts can be upgraded to use the more advanced features provided by the Script task.
ActiveX script has typically been used for the following purposes:
• Including business logic in packages. For example, ActiveX script can use conditional logic to manage
package workflow.
• Writing functions that use conditional logic to set variable values. For example, an ActiveX script can
access values in a database table using ActiveX Data Objects (ADO) and populate variables with table
values.
• Performing complex computations. For example, an ActiveX script can compute new dates by applying
built-in functions such DateAdd and DateDiff to data values.
• Accessing data using other technologies that are not supported by built-in connection types. For
example, an ActiveX script can use Active Directory Service Interfaces (ADSI) to access and extract the
user names from Active Directory.

Execute Package
The Execute Package task extends the enterprise capabilities of Integration Services by letting packages run
other packages as part of a workflow.

Execute Process
The Execute Process task runs an application or batch file as part of a SQL Server 2005 Integration Services
(SSIS) package workflow. Although you can use the Execute Process task to open any standard application,
such as Microsoft Excel or Microsoft Word, you typically use it to run business applications or batch files that
work against a data source. For example, you can use the Execute Process task to expand a text file. Then the
package can use the text file as a data source for the data flow in the package. As another example, you can use
the Execute Process task to run a custom Visual Basic application that generates a daily sales report. Then you
can attach the report to a Send Mail task and forward the report to a distribution list.

Execute DTS 2000 Package


The Execute DTS 2000 Package task runs packages that were developed by using the SQL Server 2000 tools.
By using this task, you can include SQL Server 2000 DTS packages in SQL Server 2005 data transformation
solutions. A package can include both Execute Package tasks and Execute DTS 2000 Package tasks, because
each type of task uses a different version of the run-time engine.

Script
The Script task provides code to perform functions that are not available in the built-in tasks and
transformations that SQL Server 2005 Integration Services provides. The Script task can also combine
functions in one script instead of using multiple tasks and transformations. The code is custom Microsoft Visual
Basic .NET code that is compiled and executed at package run time.

For Loop
The For Loop container defines a repeating control flow in a package. The loop implementation is similar to the
For looping structure in programming languages. In each repeat of the loop, the For Loop container evaluates
an expression and repeats its workflow until the expression evaluates to False.
The For Loop container uses the following elements to define the loop:
• An optional initialization expression that assigns values to the loop counters.
• An evaluation expression that contains the expression used to test whether the loop should stop or
continue.
• An optional iteration expression that increments or decrements the loop counter
Foreach Loop

The Foreach Loop container defines a repeating control flow in a package. The loop implementation is similar
to Foreach looping structure in programming languages. In a package, looping is enabled by using a Foreach
enumerator. The Foreach Loop container repeats the control flow for each member of a specified enumerator.
SQL Server 2005 Integration Services (SSIS) provides the following enumerator types:
• ADO enumerator to enumerate rows in tables. For example, you can get the rows in an ADO recordset.
• ADO.NET Schema Rowset enumerator to enumerate the schema information about a data source. For
example, you can enumerate and get a list of the tables in the AdventureWorks SQL Server database.
• File enumerator to enumerate files in a folder. The enumerator can traverse subfolders. For example,
you can read all the files that have the *.log file name extension in the Windows folder.
• From Variable enumerator to enumerate the enumerable object that a specified variable contains. For
example, the variable contains the result of a query that is enumerated at run time.
• Item enumerator to enumerate items that are collections. For example, you can enumerate the rows and
the columns in an Excel spreadsheet.
• Nodelist enumerator to enumerate the result set of an XML Path Language (XPath) expression. For
example, this expression enumerates and gets a list of all the authors in the classical period:
/authors/author[@period='classical'].
• SMO enumerator to enumerate SQL Server Management Objects (SMO) objects. For example, you can
enumerate and get a list of the views in a SQL Server database.

Sequence
The Sequence container defines a control flow that is a subset of the package control flow. Sequence containers
group the package into multiple separate control flows, each containing one or more tasks and containers that
run within the overall package control flow.
There are many benefits of using a Sequence container:
• Disabling groups of tasks to focus package debugging on one subset of the package control flow.
• Managing properties on multiple tasks in one location by setting properties on a Sequence container
instead of on the individual tasks.
• Providing scope for variables that a group of related tasks and containers use.

WMI Data Reader


The WMI Data Reader task runs queries using the Windows Management Instrumentation (WMI) Query
Language that returns information from WMI about a computer system. You can use the WMI Data Reader
task for the following purposes:
• Query the Windows event logs on a local or remote computer and write the information to a file or
variable.
• Obtain information about the presence, state, or properties of hardware components, and then use this
information to determine whether other tasks in the control flow should run.
• Get a list of applications and determine what version of each application is installed.

WMI Event Watcher


The WMI Event Watcher task watches for a Windows Management Instrumentation (WMI) event using a
Management Instrumentation Query Language (WQL) event query to specify events of interest. You can use
the WMI Event Watcher task for the following purposes:
• Wait for notification that files are added to a folder and then initiate the processing of the file.
• Run a package that deletes files when the available memory on a server drops lower than a specified
percentage.
• Watch for installation of an application, and then run a package that uses the application

Back Up Database
The Back Up Database task performs different types of SQL Server database backups.

Check Database Integrity


The Check Database Integrity task checks the allocation and structural integrity of all the objects in the
specified database. The task can check a single database or multiple databases, and you can choose whether to
also check the database indexes.

Execute SQL Server Agent Job


The Execute SQL Server Agent Job task runs SQL Server Agent jobs. SQL Server Agent jobs automate tasks
that you perform repeatedly. You can create jobs that execute Transact-SQL statements and ActiveX scripts,
perform Analysis Services and Replication maintenance tasks, or run packages. SQL Server Agent is a
Microsoft Windows service that runs jobs, monitors Microsoft SQL Server, and fires alerts.

Execute T-SQL Statement


This task is similar to the Execute SQL task. However, the Execute T-SQL Statement task supports only the
Transact-SQL version of the SQL language and you cannot use this task to run statements on servers that use
other dialects of the SQL language. If you need to run parameterized queries, save the query results to
variables, or use property expressions, you should use the Execute SQL task instead of the Execute T-SQL
Statement task.

History Cleanup
The History Cleanup task deletes entries in the following history tables in the SQL Server msdb database.
• backupfile
• backupfilegroup
• backupmediafamily
• backupmediaset
• backupset
• restorefile
• restorefilegroup
• restorehistory
By using the History Cleanup task, a package can delete historical data related to backup and restore activities,
SQL Server Agent jobs, and database maintenance plans.

Notify Operator
The Notify Operator task sends notification messages to SQL Server Agent operators. A SQL Server Agent
operator is an alias for a person or group that can receive electronic notifications.

Rebuild Index
The Rebuild Index task rebuilds indexes in SQL Server database tables and views.

Reorganize Index
The Reorganize Index task reorganizes indexes in SQL Server database tables and views.

Shrink Database
The Shrink Database task reduces the size of SQL Server database data and log files.

Update Statistics
The Update Statistics task updates information about the distribution of key values for one or more statistics
groups (collections) in the specified table or indexed view.

Вам также может понравиться