1. Efficient way to bulk load data in .NET using SqlBulkCopy: http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlbulkcopy.aspx
This SqlBulkCopy outperforms the ADO.NET SqlDataAdapter bulk operations a lot. Check out the performance analysis in this link: http://sqlblog.com/blogs/alberto_ferrari/archive/2009/11/30/sqlbulkcopy-performance-analysis.aspx
looks very impressive.
2. Bulk Insert using SSIS: http://henkvandervalk.com/speeding-up-ssis-bulk-inserts-into-sql-server (impressive 22GB in over 8 minutes)
3. Data Loading Performance Guide: http://msdn.microsoft.com/en-us/library/dd425070.aspx
Creating SSIS Package
Top 10 SQL Server Integration Services Best Practices
Code demo
Add Refereance to Microsoft.SQLServer.ManagedDTS.dll
using
Application app = new Application();Package package = app.LoadPackage(@"\\Imatbccwdvapp04\AVTL\CSParsers\config\CorpDB_SECY.dtsx", null);// package.ImportConfigurationFile("c:\\ExamplePackage.dtsConfig");//Variables vars = package.Variables;//vars["MyVariable"].Value = "value from c#";
}DTSExecResult result = package.Execute();
{ Microsoft.SqlServer.Dts.Runtime;
No comments:
Post a Comment