Closed bigtunacan closed 1 year ago
I'm getting an ODBC::Error Invalid cursor state during the database_cleaner "clean" step.
Stack trace provided below.
ODBC::Error: 24000 (0) [FreeTDS][SQL Server]Invalid cursor state: SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' ORDER BY TABLE_NAME (ActiveRecord::StatementInvalid) /usr/local/rvm/gems/ruby-1.9.2-p320/gems/activerecord-sqlserver-adapter-3.2.9/lib/active_record/connection_adapters/sqlserver/database_statements.rb:389:in run' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/activerecord-sqlserver-adapter-3.2.9/lib/active_record/connection_adapters/sqlserver/database_statements.rb:389:inblock in raw_connection_run' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/activerecord-sqlserver-adapter-3.2.9/lib/active_record/connection_adapters/sqlserver_adapter.rb:502:in with_sqlserver_error_handling' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/activerecord-sqlserver-adapter-3.2.9/lib/active_record/connection_adapters/sqlserver/database_statements.rb:384:inraw_connection_run' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/activerecord-sqlserver-adapter-3.2.9/lib/active_record/connection_adapters/sqlserver/database_statements.rb:376:in _raw_select' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/activerecord-sqlserver-adapter-3.2.9/lib/active_record/connection_adapters/sqlserver/database_statements.rb:371:inblock in raw_select' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/activerecord-3.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:280:in block in log' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/activesupport-3.2.2/lib/active_support/notifications/instrumenter.rb:20:ininstrument' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/activerecord-3.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:275:in log' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/activerecord-sqlserver-adapter-3.2.9/lib/active_record/connection_adapters/sqlserver/database_statements.rb:371:inraw_select' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/activerecord-sqlserver-adapter-3.2.9/lib/active_record/connection_adapters/sqlserver/database_statements.rb:9:in select_rows' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/activerecord-3.2.2/lib/active_record/connection_adapters/abstract/database_statements.rb:38:inselect_values' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/activerecord-sqlserver-adapter-3.2.9/lib/active_record/connection_adapters/sqlserver/schema_statements.rb:11:in tables' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/database_cleaner-0.9.1/lib/database_cleaner/active_record/truncation.rb:25:indatabase_cleaner_table_cache' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/database_cleaner-0.9.1/lib/database_cleaner/active_record/truncation.rb:243:in tables_to_truncate' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/database_cleaner-0.9.1/lib/database_cleaner/active_record/truncation.rb:235:inblock in clean' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/activerecord-sqlserver-adapter-3.2.9/lib/active_record/connection_adapters/sqlserver_adapter.rb:267:in disable_referential_integrity' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/database_cleaner-0.9.1/lib/database_cleaner/active_record/truncation.rb:231:inclean' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/database_cleaner-0.9.1/lib/database_cleaner/base.rb:77:in clean' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/database_cleaner-0.9.1/lib/database_cleaner/configuration.rb:79:inblock in clean' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/database_cleaner-0.9.1/lib/database_cleaner/configuration.rb:79:in each' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/database_cleaner-0.9.1/lib/database_cleaner/configuration.rb:79:inclean' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/cucumber-rails-1.3.0/lib/cucumber/rails/hooks/database_cleaner.rb:9:in `After'
run' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/activerecord-sqlserver-adapter-3.2.9/lib/active_record/connection_adapters/sqlserver/database_statements.rb:389:in
with_sqlserver_error_handling' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/activerecord-sqlserver-adapter-3.2.9/lib/active_record/connection_adapters/sqlserver/database_statements.rb:384:in
_raw_select' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/activerecord-sqlserver-adapter-3.2.9/lib/active_record/connection_adapters/sqlserver/database_statements.rb:371:in
block in log' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/activesupport-3.2.2/lib/active_support/notifications/instrumenter.rb:20:in
log' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/activerecord-sqlserver-adapter-3.2.9/lib/active_record/connection_adapters/sqlserver/database_statements.rb:371:in
select_rows' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/activerecord-3.2.2/lib/active_record/connection_adapters/abstract/database_statements.rb:38:in
tables' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/database_cleaner-0.9.1/lib/database_cleaner/active_record/truncation.rb:25:in
tables_to_truncate' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/database_cleaner-0.9.1/lib/database_cleaner/active_record/truncation.rb:235:in
disable_referential_integrity' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/database_cleaner-0.9.1/lib/database_cleaner/active_record/truncation.rb:231:in
clean' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/database_cleaner-0.9.1/lib/database_cleaner/configuration.rb:79:in
each' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/database_cleaner-0.9.1/lib/database_cleaner/configuration.rb:79:in
Closing this issue due to inactivity.
I'm getting an ODBC::Error Invalid cursor state during the database_cleaner "clean" step.
Stack trace provided below.
ODBC::Error: 24000 (0) [FreeTDS][SQL Server]Invalid cursor state: SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' ORDER BY TABLE_NAME (ActiveRecord::StatementInvalid) /usr/local/rvm/gems/ruby-1.9.2-p320/gems/activerecord-sqlserver-adapter-3.2.9/lib/active_record/connection_adapters/sqlserver/database_statements.rb:389:in
run' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/activerecord-sqlserver-adapter-3.2.9/lib/active_record/connection_adapters/sqlserver/database_statements.rb:389:in
block in raw_connection_run' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/activerecord-sqlserver-adapter-3.2.9/lib/active_record/connection_adapters/sqlserver_adapter.rb:502:inwith_sqlserver_error_handling' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/activerecord-sqlserver-adapter-3.2.9/lib/active_record/connection_adapters/sqlserver/database_statements.rb:384:in
raw_connection_run' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/activerecord-sqlserver-adapter-3.2.9/lib/active_record/connection_adapters/sqlserver/database_statements.rb:376:in_raw_select' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/activerecord-sqlserver-adapter-3.2.9/lib/active_record/connection_adapters/sqlserver/database_statements.rb:371:in
block in raw_select' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/activerecord-3.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:280:inblock in log' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/activesupport-3.2.2/lib/active_support/notifications/instrumenter.rb:20:in
instrument' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/activerecord-3.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:275:inlog' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/activerecord-sqlserver-adapter-3.2.9/lib/active_record/connection_adapters/sqlserver/database_statements.rb:371:in
raw_select' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/activerecord-sqlserver-adapter-3.2.9/lib/active_record/connection_adapters/sqlserver/database_statements.rb:9:inselect_rows' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/activerecord-3.2.2/lib/active_record/connection_adapters/abstract/database_statements.rb:38:in
select_values' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/activerecord-sqlserver-adapter-3.2.9/lib/active_record/connection_adapters/sqlserver/schema_statements.rb:11:intables' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/database_cleaner-0.9.1/lib/database_cleaner/active_record/truncation.rb:25:in
database_cleaner_table_cache' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/database_cleaner-0.9.1/lib/database_cleaner/active_record/truncation.rb:243:intables_to_truncate' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/database_cleaner-0.9.1/lib/database_cleaner/active_record/truncation.rb:235:in
block in clean' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/activerecord-sqlserver-adapter-3.2.9/lib/active_record/connection_adapters/sqlserver_adapter.rb:267:indisable_referential_integrity' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/database_cleaner-0.9.1/lib/database_cleaner/active_record/truncation.rb:231:in
clean' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/database_cleaner-0.9.1/lib/database_cleaner/base.rb:77:inclean' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/database_cleaner-0.9.1/lib/database_cleaner/configuration.rb:79:in
block in clean' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/database_cleaner-0.9.1/lib/database_cleaner/configuration.rb:79:ineach' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/database_cleaner-0.9.1/lib/database_cleaner/configuration.rb:79:in
clean' /usr/local/rvm/gems/ruby-1.9.2-p320/gems/cucumber-rails-1.3.0/lib/cucumber/rails/hooks/database_cleaner.rb:9:in `After'