Error While Transfering System Versioned Temporal Tables
还没有人认领这个 Issue。
评估
调研方向
从报告的 SMO.Transfer 配置开始,使用系统版本控制的时态表和自定义表/视图选择重现该失败。比较 SqlBulkCopy 报告的源列和目标列映射;当传输完成且没有 ColumnMapping 异常时即表示完成。
由索引模型根据 Issue 内容生成。
描述
Hello,
While doing a direct database Transfer using the SMO.Transfer Object, I get this error at the System Versioned Temporal Tables:
Unhandled exception. Microsoft.SqlServer.Management.Common.TransferException: An error occurred while transferring data. See the inner exception for details.
---> System.InvalidOperationException: The given ColumnMapping does not match up with any column in the
source or destination.
at Microsoft.Data.SqlClient.SqlBulkCopy.AnalyzeTargetAndCreateUpdateBulkCommand(BulkCopySimpleResultSet internalResults)
at Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServerInternalRestContinuedAsync(BulkCopySimpleResultSet internalResults, CancellationToken cts, TaskCompletionSource1 source)
at Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServerInternalRestAsync(CancellationToken cts, TaskCompletionSource1 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(DbDataReader reader)
at Microsoft.SqlServer.Management.Smo.Transfer.SqlBulkCopyData(SqlConnection sourceConnection, SqlConnection destinationConnection, TransferWriter writer, SqlTransaction transaction)
at Microsoft.SqlServer.Management.Smo.Transfer.TransferData()
--- End of inner exception stack trace ---
at Microsoft.SqlServer.Management.Smo.Transfer.TransferData()
I am hoping that there is a flag that I need to turn on or that because I turned off a setting this has happened. Here is my current setup for my Transfer object:
`var transfer = new Transfer(sourceDB);
transfer.CopyAllObjects = false;
transfer.CopyData = true;
transfer.CopyAllTables = false;
transfer.CopyAllViews = false;
transfer.CopyAllStoredProcedures = false;
transfer.CopyAllUserDefinedFunctions = false;
transfer.PrefetchObjects = true;
transfer.Options.WithDependencies = true;
transfer.Options.ContinueScriptingOnError = true;
transfer.Options.IncludeIfNotExists = true;
transfer.Options.AllowSystemObjects = false;
transfer.Options.Indexes = true;
transfer.Options.ClusteredIndexes = true;
transfer.Options.NonClusteredIndexes = true;
transfer.Options.DriAll = true;
transfer.Options.ChangeTracking = true;
transfer.Options.EnforceScriptingOptions = false;
transfer.Options.Bindings = true;
transfer.Options.IncludeHeaders = true;
transfer.Options.ClusteredIndexes = true;
transfer.Options.ExtendedProperties = true;
transfer.Options.AllowSystemObjects = true;
transfer.Options.Permissions = false;
transfer.DestinationDatabase = destinationDBName;
transfer.DestinationServer = destinationSQLInstanceName;
transfer.DestinationPassword = destinationSQLPassword;
transfer.DestinationLogin = destinationSQLUser;
transfer.DestinationLoginSecure = false;
`
With a custom list of tables and Views.
- 主要语言
- C#
- 星标
- 143
- 派生
- 28
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/sqlmanagementobjects 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 62/100
-
难度 3/5 1-2 天 新手友好度 72/100
-
难度 4/5 3-5 天 新手友好度 74/100
-
难度 3/5 1-2 天 新手友好度 78/100
-
难度 3/5 1-2 天 新手友好度 68/100
查看 microsoft/sqlmanagementobjects 的全部 Issue
相似的 Issue
-
Status: Waiting triage Type: Bug
难度 2/5 1-3 小时 新手友好度 84/100
nanoframework/Home#1857 ·
-
kind/bug kind/regression
难度 2/5 1-3 小时 新手友好度 78/100
unoplatform/uno.toolkit.ui#1646 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
nightscout/nocturne#1379 ·
-
难度 2/5 1-3 小时 新手友好度 86/100
elastic/esql-dotnet#47 ·
-
难度 1/5 1 小时以内 新手友好度 85/100