Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Error While Transfering System Versioned Temporal Tables

Đang mở
#160 5 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
csharp, sql
Lĩnh vực
databases

Hướng nghiên cứu

Bắt đầu với cấu hình SMO.Transfer đã được báo cáo và tái hiện lỗi bằng cách sử dụng bảng tạm thời được tạo phiên bản bởi hệ thống cùng với lựa chọn bảng/khung nhìn tùy chỉnh. So sánh ánh xạ cột nguồn và đích được SqlBulkCopy báo cáo; hoàn tất khi quá trình truyền hoàn thành mà không có ngoại lệ ColumnMapping.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
C#
Star
143
Fork
28
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của microsoft/sqlmanagementobjects

Tất cả issue của microsoft/sqlmanagementobjects

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.