Tag: ef bulkinsert

批量插入在Azure SQL Server中无法正常工作

我无法使用C#webapi将大量数据插入Azure SQL Server数据库 考虑 我想在SQL中插入60K>数据。 在我的本地SQL服务器中没有问题,但在Azure SQL中它的连接超时 我的方法:(所有都在本地sql server中工作,但不在Azure sql server中) 1)尝试使用EF逐个插入记录(10000次约10分钟,大部分超时) 2)尝试使用批量插入扩展和EF 3)在SqlBulkCopy中尝试 4)尝试增加连接字符串中的连接超时 5)尝试在Dbcontext中增加命令时间。 exceptionStackTrace Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding. System.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is […]