OLE DB Destination usage 1

Source: Internet
Author: User
Tags bulk insert ole

OLE DB Destination component is the data flow load to Destination, a total of 5 kinds data Access Mode, the general Destination component internal implementation of the principle is to use the insert Statement to insert data into the database.

If OLE DB Destination component selected Data Access Mode uses the Fast load option, the SQL command used by the component changes and the insert becomes a bulk INSERT.

If data access mode does not use the fast load option, Destination component uses the INSERT clause to insert the information into the database, and if data access mode uses the fast load option, the Des Tination component uses the BULK INSERT clause to insert data into the database, significantly increasing the performance.

If destination table does not exist, you can click the New button and component automatically generate a TSQL script for CREATE TABLE, generating destination table.

CREATE TABLE [OLE DB Destination] (    [code]varchar(ten),    [  name]varchar()

The use of New on MSDN is described below

Create a new table by using the Create Table dialog box.

When you click New, integration Services generates a default CREATE TABLE statement based on the connected data s Ource. This default CREATE table statement would not include the FILESTREAM attribute even if the source table includes a column W ith the FILESTREAM attribute declared. To run a integration Services component with the FILESTREAM attribute, first implement FILESTREAM storage on the Destinat Ion database. Then, add the FILESTREAM attribute to the CREATE TABLE statement in the Create Table dialog box.

MSDN 5 Types of Data Access mode for OLE DB Destination are described below

Data access mode,specify The method for loading data into the destination.

Table name or view name variable

SQL command

td> td>

Option

Description

Table or view

load data into a table or view in the OLE DB destination.

Table or View-fast load

Load data into a table or view in the OLE DB destination and use the fast load option. For more information about the fast load data access modes, which is optimized for bulk inserts

Specify the table or view name in a variable.

Table name or view name Variable-fast load

Specify the table or view name in a VA Riable, and use the fast load option to load the data. For more information about the fast load data access modes, which is optimized for bulk inserts

Load data into the OLE DB destination by using a SQL query.

Data Access Mode Dynamic OptionsEach of the settings for Data access ModeDisplays a dynamic set of options specific to that setting. The following sections describe each of the dynamic options available for each Data access ModeSetting.

Data Access mode = Table or view Name of the table or the view

Select the name of the table or view from a list of those available in the data source.

Data Access mode = Table or view–fast load Name of the table or view

Select a table or view from the database by using this list, or create a new table by clicking New.

Keep identity

Specify whether to copy the identity values when the data is loaded. This property is available only with the fast load option. The default value of this property is false.

Keep nulls

Specify whether to copy null values if data is loaded. This property is available only with the fast load option. The default value of this property is false.

Table Lock

Specify whether the table is locked during the load. The default value of the is true.

Check constraints

Specify whether the destination checks constraints when it loads data. The default value of the is true.

Rows per Batch

Specify the number of rows in a batch. The default value of this property is –1, which indicates that no value has been assigned.

Maximum Insert Commit Size

Specify the batch size, the OLE DB destination tries to commit during fast load operations. The value of 0 indicates, all data is committed in a, and all rows are been processed.

A value of 0 might cause the running package to stop responding if the OLE DB destination and an Other data flow component is updating the same source table. To prevent the package from stopping, set the Maximum Insert commit size option to 2147483647.

 

If you provide a value for this property, the destination commits rows in batches that is the smaller of (a) the maximum Insert Commit Size , or (b) the remaining rows in the buffer, which is currently being processed.

Any constraint failure at the destination causes the entire batch of rows defined by Maximum Insert commit size to fail.

 

Data Access mode = Table name or view name variable Variable name

Select the variable that contains the name of the table or view.

Data Access Mode = Table name or view name Variable–fast load) Variable name

Select the variable that contains the name of the table or view.

Keep identity

Specify whether to copy the identity values when the data is loaded. This property is available only with the fast load option. The default value of this property is false.

Keep nulls

Specify whether to copy null values if data is loaded. This property is available only with the fast load option. The default value of this property is false.

Table Lock

Specify whether the table is locked during the load. The default value of this property is false.

Check constraints

Specify whether the task checks constraints. The default value of this property is false.

Rows per Batch

Specify the number of rows in a batch. The default value of this property is –1, which indicates that no value has been assigned.

Clear the text box in the OLE DB Destination Editor to indicate so do not want to assign a custom value for The property.

Maximum Insert Commit Size

Specify the batch size, the OLE DB destination tries to commit during fast load operations. The default value of 2147483647 indicates, all data are committed in a single batch after all rows has been p Rocessed.

A value of 0 might cause the running package to stop responding if the OLE DB destination and another data flow C Omponent is updating the same source table. To prevent the package from stopping, set the Maximum Insert commits the size option to 2147483647.

Data access mode = SQL Command SQL Command Text

Enter the text of a SQL query, build the query by clicking Build Query, or locate the file, contains the Quer Y text by clicking Browse.

The OLE DB destination does not a support parameters. If you need to execute a parameterized INSERT statement, consider the OLE DB Command transformation.

Build Query

Use the Query Builder dialog box to construct the SQL Query visually.

Browse

Use the Open dialog box to locate the file that contains the text of the SQL query.

Parse Query

Verify The syntax of the query text.

OLE DB Destination usage 1

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.