activerecord-sqlserver-adapter icon indicating copy to clipboard operation
activerecord-sqlserver-adapter copied to clipboard

Unsupported Microsoft SQL Azure Version Error

Open subakva opened this issue 13 years ago • 5 comments

Microsoft recently changed the version string in their SQL Azure product to "Microsoft SQL Azure (RTM) - 11.0.2224.11 Jan 4 2013 16:38:21 Copyright (c) Microsoft Corporation". This is causing the ActiveRecord adapter to fail with a NotImplementedError.

Adding 2013 to the list of supported versions would resolve the problem, but it seems to me that the version year check isn't really relevant for Azure. It would be unfortunate to have to fix this same problem every year as they update their build string.

It appears that the@@version string for both Azure and SQL Server contains an actual build number that could be used to identify the versions. It looks as if the supported versions should be 9, 10, and 11 by this standard.

Would you be open to a patch that checks the version number rather than the product name?

subakva avatar Jan 14 '13 16:01 subakva

I would be very open to that.

metaskills avatar Jan 14 '13 17:01 metaskills

I have an application running on Azure right now and it just died with the error mentioned above. Is there something I can do to "patch" the application for now? It's rather important....

mvoltolina avatar Jan 21 '13 18:01 mvoltolina

Never mind. I grabbed the fork from subakva.

mvoltolina avatar Jan 21 '13 20:01 mvoltolina

Another approach that seems to work for me (on rails 3) is to monkey patch with the following initializer script:

# config/initializers/add_2013_to_sql_server_adapter.rb
ActiveRecord::ConnectionAdapters::SQLServerAdapter::SUPPORTED_VERSIONS << 2013

as per #180. At least till 2013 is supported officially.

taktran avatar Mar 12 '13 07:03 taktran

The new version out later today will fix this. The year may still be wrong, but Azure will work. Pull requests for persnickety proper year would be great.

metaskills avatar Jul 07 '13 17:07 metaskills