Hi Today i will start discuss with "BULK INSERT" Task.
BULK INSERT Task used to copy the large amount data from text files to SQL Server Tables.
EX: You have one (1) million records of data present in your text (.txt) file and if you want to import into SQL Server Table, the easiest way to achieve this is by using BULK INSERT Task.
You can configure BULK INSERT Task Like Below:
1. Drag and drop BULK INSERT TASK from Toolbox to CONTROL FLOW
2.Double Click on Bulk Insert Task to open task editor . After Opening your Task should look like this
3. Click on "Connections" from the left side menu and choose your SQL DATABASE and Related TABLE By configuring OLEDB Connection Manger.
4. Select "source file" connection path under "source" option.
5. click on the "options" in the left tab of the editor, and select Starting row(First row). Also specify actions to perform on the destinations table or view when the task inserts the data.
6. At last run the package and your source(.txt) data will copy into Destination (SQL Server Table).
Bulk Insert task is easy to use and configure. But it has some limitations. They are:
1.It only allows to append the data into the table and you cannot perform truncate and
load.
2. Only FaltFile can be used as source and not any other types
3. Only SQL Server Databases Can be used as destination. It doesn't Support any other
Files/RDBS Systems.
4. A failure in the Bulk insert task doesnot automatically load back sucessfully loaded
batches
5. only members of SYSADMIN fixed server role can run a package that contains Bulk.
BULK INSERT Task used to copy the large amount data from text files to SQL Server Tables.
EX: You have one (1) million records of data present in your text (.txt) file and if you want to import into SQL Server Table, the easiest way to achieve this is by using BULK INSERT Task.
You can configure BULK INSERT Task Like Below:
1. Drag and drop BULK INSERT TASK from Toolbox to CONTROL FLOW
2.Double Click on Bulk Insert Task to open task editor . After Opening your Task should look like this
3. Click on "Connections" from the left side menu and choose your SQL DATABASE and Related TABLE By configuring OLEDB Connection Manger.
4. Select "source file" connection path under "source" option.
5. click on the "options" in the left tab of the editor, and select Starting row(First row). Also specify actions to perform on the destinations table or view when the task inserts the data.
6. At last run the package and your source(.txt) data will copy into Destination (SQL Server Table).
Bulk Insert task is easy to use and configure. But it has some limitations. They are:
1.It only allows to append the data into the table and you cannot perform truncate and
load.
2. Only FaltFile can be used as source and not any other types
3. Only SQL Server Databases Can be used as destination. It doesn't Support any other
Files/RDBS Systems.
4. A failure in the Bulk insert task doesnot automatically load back sucessfully loaded
batches
5. only members of SYSADMIN fixed server role can run a package that contains Bulk.
No comments:
Post a Comment