Unsupported Microsoft SQL Azure Version Error #247

Closed
subakva opened this Issue Jan 14, 2013 · 5 comments

Comments

Projects
None yet
4 participants

subakva commented Jan 14, 2013

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?

Collaborator

metaskills commented Jan 14, 2013

I would be very open to that.

@subakva subakva added a commit to carbonfive/activerecord-sqlserver-adapter that referenced this issue Jan 14, 2013

@subakva subakva [#247] Check SQL version using the product version rather than the year 9e08c9f

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....

Never mind. I grabbed the fork from subakva.

taktran commented Mar 12, 2013

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.

Collaborator

metaskills commented Jul 7, 2013

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 closed this Jul 7, 2013

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