You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While testing babelfish with an old dotnet code base we discovered that performing a bulk copy into an temporary table throws an exception:
System.InvalidOperationException
HResult=0x80131509
Message=Cannot access destination table '#TemporaryTable'.
Source=Microsoft.Data.SqlClient
StackTrace:
at Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServerInternalRestAsync(CancellationToken cts, TaskCompletionSource`1 source)
at Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServerInternalAsync(CancellationToken ctoken)
at Microsoft.Data.SqlClient.SqlBulkCopy.WriteRowSourceToServerAsync(Int32 columnCount, CancellationToken ctoken)
at Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServer(DataTable table, DataRowState rowState)
at Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServer(DataTable table)
at Inoa.DbInfra.Test.SqlServer.UnitOfWorkTest.Test() in D:\_INOA\Dev\inoa-common\dbinfra\test\SqlServer\UnitOfWorkTest.cs:line 69
This exception was originally thrown at this call stack:
[External Code]
Inner Exception 1:
SqlException: procedure tempdb_dbo.sp_tablecollations_100(nvarchar) does not exist
The following code is a minimal repro for the test we performed.
publicvoidWorks()// This works as expected{usingvarconnection=new SqlConnection(_env.ConnectionString);
connection.Open();usingvarcreateTableCommand= connection.CreateCommand();
createTableCommand.CommandText ="CREATE TABLE PersistentTable (ColumnA INT NOT NULL)";
createTableCommand.ExecuteNonQuery();using(varbulkCopy=new SqlBulkCopy(connection)){
bulkCopy.DestinationTableName ="PersistentTable";vardataTable=new DataTable();
dataTable.Columns.Add("ColumnA",typeof(int));for(vari=0;i<10;i++){
dataTable.Rows.Add(i);}
bulkCopy.WriteToServer(dataTable);}}publicvoidFails()// Throws InvalidOperationException{usingvarconnection=new SqlConnection(_env.ConnectionString);
connection.Open();usingvarcreateTempTableCommand= connection.CreateCommand();
createTempTableCommand.CommandText ="CREATE TABLE #TemporaryTable (ColumnA INT NOT NULL)";
createTempTableCommand.ExecuteNonQuery();using(varbulkCopy=new SqlBulkCopy(connection)){
bulkCopy.DestinationTableName ="#TemporaryTable";vardataTable=new DataTable();
dataTable.Columns.Add("ColumnA",typeof(int));for(vari=0;i<10;i++){
dataTable.Rows.Add(i);}
bulkCopy.WriteToServer(dataTable);}}
This is a know limitation? If so, there are any plans to implement this in Babelfish?
Version
BABEL_4_X_DEV (Default)
Extension
babelfishpg_tsql (Default)
Which flavor of Linux are you using when you see the bug?
Ubuntu (Default)
Relevant log output
No response
Code of Conduct
I agree to follow this project's Code of Conduct.
The text was updated successfully, but these errors were encountered:
What happened?
While testing babelfish with an old dotnet code base we discovered that performing a bulk copy into an temporary table throws an exception:
The following code is a minimal repro for the test we performed.
This is a know limitation? If so, there are any plans to implement this in Babelfish?
Version
BABEL_4_X_DEV (Default)
Extension
babelfishpg_tsql (Default)
Which flavor of Linux are you using when you see the bug?
Ubuntu (Default)
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: