Skip to content

bulk copy: please support DATE / DATETIME datatype #1725

Open
@JDBC-0

Description

@JDBC-0

Is your feature request related to a problem? If so, please give a short summary of the problem and how the feature would resolve it

The current driver (V 9.4.0) does not support bulk copy (better: silently does not use bulk copy) for the described reason:

"Due to the limitations of Bulk Copy API, MONEY, SMALLMONEY, DATE, DATETIME, DATETIMEOFFSET, SMALLDATETIME, TIME, GEOMETRY, and GEOGRAPHY data types, are currently not supported for this feature."

For this reason, the enabled "useBulkCopyForBatchInsert=true" feature has no effect because almost all of our tables have Date, Datetime, Datetime2 columns.

Describe the preferred solution

The URL parameter "useBulkCopyForBatchInsert=true" should also use interanlly bulk copy instead of the prepared INSERT batch statements if the table has DATE or DATETIME/DATETIME2 columns.

Describe alternatives you've considered

We have wrote our own bulk copy solution by writing CSV files and setting the DATE/DATEIMTIME values to the correct strings, but this solution is slower that than standard prepared INSERT batches.

Additional context

Reference Documentations/Specifications

https://docs.microsoft.com/en-us/sql/connect/jdbc/use-bulk-copy-api-batch-insert-operation?view=sql-server-ver15

Reference Implementation

Metadata

Metadata

Assignees

No one assigned

    Labels

    BacklogThe topic in question has been recognized and added to development backlogEnhancementAn enhancement to the driver. Lower priority than bugs.

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions