Hangfire: 1.7.0-rc1 not compatible with SQL Server 2008-2012

Created on 20 Mar 2019  路  2Comments  路  Source: HangfireIO/Hangfire

I tried upgrading from 1.7.0-beta2 to 1.7.0-rc1 but encountered a couple of issues with an installation running SQL Server 2008.

  1. The use of CONCAT in migrations scripts: https://github.com/HangfireIO/Hangfire/blob/dev/src/Hangfire.SqlServer/Install.sql#L65 + https://github.com/HangfireIO/Hangfire/blob/dev/src/Hangfire.SqlServer/Install.sql#L395 (+ the ones in DefaultInstall.sql)

    • CONCAT was first supported by SQL 2012 (https://docs.microsoft.com/en-us/sql/t-sql/functions/concat-transact-sql?view=sql-server-2017).
    • Thats probably easy to fix by using "+" concenation instead.
  2. The use of inline INDEX hint in counters aggregator:
    https://github.com/HangfireIO/Hangfire/blob/dev/src/Hangfire.SqlServer/CountersAggregator.cs#L87

    • Throws the following exception:
      System.Data.SqlClient.SqlException (0x80131904): Incorrect syntax near 'INDEX'. If this is intended as a part of a table hint, A WITH keyword and parenthesis are now required. See SQL Server Books Online for proper syntax.
    • Inline index definitions was first supported by SQL 2014 (https://docs.microsoft.com/en-us/sql/t-sql/statements/create-table-transact-sql?view=sql-server-2017#arguments).
    • Possible fix might be to add the index after table variable creation?
sql-server bug

All 2 comments

Oh oh, thanks for reporting this! I've updated the Known issues section in the release notes.

I've switched to using + and CAST instead of CONCAT function and disabled that inline index. Changes are available in RC2. Thanks for reporting this!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nigel-dewar picture nigel-dewar  路  3Comments

dbones picture dbones  路  3Comments

cindro picture cindro  路  3Comments

plmwong picture plmwong  路  3Comments

JvanderStad picture JvanderStad  路  3Comments