On Apr 22, 7:52 pm, djo <[email protected]> wrote:
> Am running ruby 1.8.7 (2010-01-10 patchlevel 249) [i386-mingw32], on
> win XP talking to MSSQL 2008 (10.0.2531).
> The connection is via ADO ie:
>
>     @srcdb =
> Sequel.connect(:adapter=>'ado', :host=>options[:host], 
> :database=>options[:srcdb], :user=>options[:user], 
> :password=>options[:password])
>     @destdb =
> Sequel.connect(:adapter=>'ado', :host=>options[:host], 
> :database=>options[:dstdb], :user=>options[:user], 
> :password=>options[:password])
>
> My script is reading data from @srcdb & writing to @destdb.
> When the volume of data being migrated increases, I get this error:
>
> I, [2010-04-23T14:47:53.711986 #5860]  INFO -- : SELECT  UserGUID
>                 FROM  frst.dbo.portalUsers
>                 WHERE   Email = '[email protected]'
> C:/bin/Ruby/lib/ruby/gems/1.8/gems/sequel-3.10.0/lib/sequel/adapters/
> ado.rb:47:in `method_missing': WIN32OLERuntimeError: Execute (S
> equel::DatabaseError)
>     OLE error code:80004005 in Microsoft OLE DB Provider for ODBC
> Drivers
>       [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not
> exist or access denied.
>     HRESULT error code:0x80020009
>       Exception occurred.
>         from C:/bin/Ruby/lib/ruby/gems/1.8/gems/sequel-3.10.0/lib/
> sequel/adapters/ado.rb:47:in `execute'
>         from C:/bin/Ruby/lib/ruby/gems/1.8/gems/sequel-3.10.0/lib/
> sequel/connection_pool/single.rb:21:in `hold'
>         from C:/bin/Ruby/lib/ruby/gems/1.8/gems/sequel-3.10.0/lib/
> sequel/database.rb:535:in `synchronize'
>         from C:/bin/Ruby/lib/ruby/gems/1.8/gems/sequel-3.10.0/lib/
> sequel/adapters/ado.rb:45:in `execute'
>         from C:/bin/Ruby/lib/ruby/gems/1.8/gems/sequel-3.10.0/lib/
> sequel/dataset/actions.rb:100:in `execute'
>         from C:/bin/Ruby/lib/ruby/gems/1.8/gems/sequel-3.10.0/lib/
> sequel/adapters/ado.rb:79:in `fetch_rows'
>         from C:/bin/Ruby/lib/ruby/gems/1.8/gems/sequel-3.10.0/lib/
> sequel/adapters/shared/mssql.rb:225:in `fetch_rows'
>         from C:/bin/Ruby/lib/ruby/gems/1.8/gems/sequel-3.10.0/lib/
> sequel/dataset/actions.rb:61:in `each'
>         from C:/bin/Ruby/lib/ruby/gems/1.8/gems/sequel-3.10.0/lib/
> sequel/dataset/convenience.rb:232:in `single_record'
>         from C:/bin/Ruby/lib/ruby/gems/1.8/gems/sequel-3.10.0/lib/
> sequel/dataset/convenience.rb:58:in `first'
>         from ./ProgressReport/mappings/InvestmentProcessLookups.rb:
> 20:in `lookup_systemuser_guid'
>         from ./ProgressReport/mappings/ProjectMapping.rb:52:in
> `map_from_obiproposals_to_projectstatushistory'
>         from ./lib/migrate.rb:134:in `send'
>         from ./lib/migrate.rb:134:in `run'
>         from C:/bin/Ruby/lib/ruby/gems/1.8/gems/sequel-3.10.0/lib/
> sequel/dataset/actions.rb:15:in `each'
>         from C:/bin/Ruby/lib/ruby/gems/1.8/gems/sequel-3.10.0/lib/
> sequel/dataset/actions.rb:15:in `all'
>         from ./lib/migrate.rb:132:in `run'
>         from ./lib/migrate.rb:127:in `each'
>         from ./lib/migrate.rb:127:in `run'
>         from ./lib/migrate.rb:124:in `each'
>         from ./lib/migrate.rb:124:in `run'
>         from migrate.rb:12
>
> The SQL being generated is fine - when I run it manually it works no
> problem.
> I've tried placing my insert statements inside a @destdb.transaction
> block, but to no avail.
>
> However when I split the migration in 2 bits it works, which almost
> feels like I'm hitting a resource limit somewhere?
>
> If the ADO connector is problematic, can anyone suggest the most
> reliable JDBC driver to use against MSSQL 2008?
>
> Thanks in advance:
> Dave Oram

The ADO adapter does not support transactions as the underlying driver
does not provide a consistent connection object.  You should not use
the ADO adapter for anything that requires transactions, and I would
recommend against using it in production unless your workload is read
only.

The JDBC or ODBC adapters both do a decent job supporting MSSQL, with
the JDBC adapter providing the best support for it.  Obviously, to use
the JDBC adapter, you must be running JRuby.

Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en.

Reply via email to