Skip to content

Conversation

@Chienlin1014
Copy link

Spring Batch SQL Server metadata tables default to VARCHAR, but the Microsoft JDBC driver sends strings as NVARCHAR. This mismatch causes implicit conversions, slows queries, and increases deadlock risk.

Update schema-sqlserver.sql to use NVARCHAR for all string columns, aligning with the driver and improving performance.

Thank you for taking time to contribute this pull request!
You might have already read the contributor guide, but as a reminder, please make sure to:

  • Rebase your changes on the latest main branch and squash your commits
  • Add/Update unit tests as needed
  • Run a build and make sure all tests pass prior to submission
  • Sign-off commits according to the Developer Certificate of Origin

For more details, please check the contributor guide.
Thank you upfront!

@Chienlin1014 Chienlin1014 force-pushed the fix/sqlserver-nvarchar-metadata branch from 3be881c to e6bd4c6 Compare October 30, 2025 05:21
…projects#5064)

Spring Batch SQL Server metadata tables default to VARCHAR, but the Microsoft JDBC driver sends strings as NVARCHAR.
This mismatch causes implicit conversions, slows queries, and increases deadlock risk.

Update schema-sqlserver.sql to use NVARCHAR for all string columns, aligning with the driver and improving performance.

Signed-off-by: Chienlin <chienlin@miniasp.com>
@Chienlin1014 Chienlin1014 force-pushed the fix/sqlserver-nvarchar-metadata branch from e6bd4c6 to ee050d6 Compare October 30, 2025 05:30
@Chienlin1014
Copy link
Author

reference: International features of the JDBC driver

@Chienlin1014
Copy link
Author

Fixes #5064

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant