Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 7129

Import flat file SQL Server 2017

$
0
0

I have created csv file from a table in a database created in SQL Server 2017.

Now I am trying to import data from that csv file and size of file is 19GB.

The following error appeared and import stops

TITLE: Microsoft SQL Server Management Studio
------------------------------
Error inserting data into table. (Microsoft.SqlServer.Import.Wizard)
------------------------------
ADDITIONAL INFORMATION:
Error inserting data into table. (Microsoft.SqlServer.Prose.Import)
------------------------------
Object reference not set to an instance of an object. (Microsoft.SqlServer.Prose.Import)
------------------------------
BUTTONS:

OK
------------------------------

===================================
Error inserting data into table. (Microsoft.SqlServer.Import.Wizard)
------------------------------
Program Location:
   at Microsoft.SqlServer.Import.Wizard.InsertData.ResultCheck(Result result)
   at Microsoft.SqlServer.Import.Wizard.InsertData.DoWork()
   at Microsoft.SqlServer.Management.TaskForms.SimpleWorkItem.Run()
===================================
Error inserting data into table. (Microsoft.SqlServer.Prose.Import)
------------------------------
Program Location:
   at Microsoft.SqlServer.Prose.Import.BcpSynthesis.InsertIntoDB(String inputFilePath, String tableName, String schemaName, SqlConnection connection, Int32 batchSize, SqlTransaction transaction)
   at Microsoft.SqlServer.Prose.Import.BcpProcess.<>c__DisplayClass42_0.<InsertIntoDb>b__0()
   at Microsoft.SqlServer.Prose.Import.BcpProcess.ExecuteOperation(Action operation)
===================================
Object reference not set to an instance of an object. (Microsoft.SqlServer.Prose.Import)
------------------------------
Program Location:
   at Microsoft.SqlServer.Prose.Import.OutputDataReader.GetValue(Int32 i)
   at System.Data.SqlClient.SqlBulkCopy.GetValueFromSourceRow(Int32 destRowIndex, Boolean& isSqlType, Boolean& isDataFeed, Boolean& isNull)
   at System.Data.SqlClient.SqlBulkCopy.ReadWriteColumnValueAsync(Int32 col)
   at System.Data.SqlClient.SqlBulkCopy.CopyColumnsAsync(Int32 col, TaskCompletionSource`1 source)
   at System.Data.SqlClient.SqlBulkCopy.CopyRowsAsync(Int32 rowsSoFar, Int32 totalRows, CancellationToken cts, TaskCompletionSource`1 source)
   at System.Data.SqlClient.SqlBulkCopy.CopyBatchesAsyncContinued(BulkCopySimpleResultSet internalResults, String updateBulkCommandText, CancellationToken cts, TaskCompletionSource`1 source)
   at System.Data.SqlClient.SqlBulkCopy.CopyBatchesAsync(BulkCopySimpleResultSet internalResults, String updateBulkCommandText, CancellationToken cts, TaskCompletionSource`1 source)
   at System.Data.SqlClient.SqlBulkCopy.WriteToServerInternalRestContinuedAsync(BulkCopySimpleResultSet internalResults, CancellationToken cts, TaskCompletionSource`1 source)
   at System.Data.SqlClient.SqlBulkCopy.WriteToServerInternalRestAsync(CancellationToken cts, TaskCompletionSource`1 source)
   at System.Data.SqlClient.SqlBulkCopy.WriteToServerInternalAsync(CancellationToken ctoken)
   at System.Data.SqlClient.SqlBulkCopy.WriteRowSourceToServerAsync(Int32 columnCount, CancellationToken ctoken)
   at System.Data.SqlClient.SqlBulkCopy.WriteToServer(IDataReader reader)
   at Microsoft.SqlServer.Prose.Import.BcpSynthesis.InsertIntoDB(String inputFilePath, String tableName, String schemaName, SqlConnection connection, Int32 batchSize, SqlTransaction transaction)


Viewing all articles
Browse latest Browse all 7129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>