I'm not certain that it'll be possible to solve this problem - for the most 
part I'm posting this so that if any other unlucky soul has to deal with 
this particular database there'll be a direction to go for the workaround.

I'm trying to connect my favorite SQL gem to a MSSQL / PDW instance. 
(Parallel Data Warehouse, it seems to be a MS-branded distributed SQL 
Server version)

The key point here is that PDW doesn't seem to support the SERVERPROPERTY 
command, which makes Sequel very angry and me very sad. It throws an 
exception from within lib/sequel/adapters/shared/mssql.rb:166 (as one would 
expect), and I can't really do anything. I hacked my way around it by 
monkey-patching the server_version method to always return 10000000 - it 
appears to be a SQL Server 2008 version - and then everything else seems to 
work.

"SELECT @@VERSION" returns: 
Microsoft SQL Server 2008 R2 (RTM) - 10.0.3595.0 (X64) Jul 27 2012 20:35:00 
Copyright (c) Microsoft Corporation Parallel Data Warehouse (64-bit) on 
Windows NT 6.0 <X64> (Build 6002: Service Pack 2)

In my research it doesn't look like all SQL Server instances support the 
@@VERSION either - so couldn't just switch the query. I'd be happy to try 
other commands against the server but it belongs to our IT group so I don't 
have much info to share about the instance specifically. For all I know 
they've somehow disabled SERVERPROPERTY on this specific instance.

In any case: Sequel is awesome and works with PDW with a *little* bit of 
tweaking.

>>>>>>>  Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to