Skip to content

"Adaptive Server connection timed out" with SQL Server 9.00.4053.00 #23

@madprog

Description

@madprog

Hello,

I'm trying to run rake db:migrate from my rails application to a SQL Server 2005 (9.00.4053.00).
Several commands are run on the server, according to SQL Server Profiler:

set textsize 64512 
go
use MyDatabase
go
SET ANSI_DEFAULTS ON
go
SET CURSOR_CLOSE_ON_COMMIT OFF
go
SET IMPLICIT_TRANSACTIONS OFF
go
SELECT @@version
go
USE [MyDatabase]
go
SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_NAME <> 'dtproperties' AND TABLE_SCHEMA = schema_name()
go
SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_NAME <> 'dtproperties' AND TABLE_SCHEMA = schema_name()
go
SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_NAME <> 'dtproperties' AND TABLE_SCHEMA = schema_name()
go

I patched tiny_tds to add some printf traces in rb_tinytds_raise_error.
From what I understand, the connection times out, and tiny_tds tries to sync with the server again with dbsqlok, but stays locked into this call for 15 minutes, before an other timeout occurs.

05/19/11t08:12:10 rb_tinytds_raise_error(0x01e8f580, 1, Adaptive Server connection timed out, error, 6, 20003, 0)
05/19/11t08:12:10 Calling dbsqlok
05/19/11t08:27:10 rb_tinytds_raise_error(0x01e8f580, 1, Read from the server failed, error, 9, 20004, 60)
05/19/11t08:27:10 Calling dbsqlok
05/19/11t08:27:10 Returned from dbsqlok
05/19/11t08:27:10 rb_tinytds_raise_error(0x01e8f580, 0, DBPROCESS is dead or not enabled, error, 1, 20047, 0)
05/19/11t08:27:10 rb_tinytds_raise_error(0x01e8f580, 0, DBPROCESS is dead or not enabled, error, 1, 20047, 0)

I don't really know how your library works, I'm just guessing. Do you have an idea?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions