cretz/node-tds

SQL 2008 connection problem

Opened this issue · 4 comments

I tried connecting to SQL 2008 without success. Is this supported?

The instance is a SQL Azure instance that supports TDS v7.3 A or B. This is my code:

var tds = require('tds')

var conn = new tds.Connection({
  host: 'bsx92c1i9t.database.windows.net',
  port: 1433,
  database: 'arr',
  userName: 'arr',
  password: // cut out
  tdsVersion: 0x730A0003, // SQL Azure only supports TDS v7.3 A and B
  logDebug: true,
  logError: true
})

conn.on('error', function(error) {
  console.error('Received error', error);
});
conn.on('message', function(message) {
  console.info('Received info', message);
});

conn.connect(function (error) {
    console.log('connected: ': error)
})

And this is the output I see:

Connecting to SQL Server with config {"host":"bsx92c1i9t.database.windows.net","port":1433,"database":"arr","userName":"tjanczuk","password":"<cut out>","tdsVersion":50334323,"logDebug":true,"logError":true}
Connection established, pre-login commencing
Sending packet: PRELOGIN at state 1
Inserting header for type:  18
Packet size: 41
Received 37 bytes at state 1 <Buffer 04 01 00 25 00 00 01 00 00 00 15 00 06 01 00 1b 00 01 02 00 1c 00 01 03 00 1d 00 00 ff 0b 00 04 df 00 02 03 00>
Retrieved header:  { type: 4,
  status: 1,
  length: 37,
  processId: 0,
  packetId: 1,
  window: 0 }
Found non token stream packet
Added pending value type: 0, offset: 21, length: 6
Added pending value type: 1, offset: 27, length: 1
Added pending value type: 2, offset: 28, length: 1
Added pending value type: 3, offset: 29, length: 0
Version:  [ 11, 0, 4, 223, 0, 2 ]
Encryption:  3
Reading instance name of length: 1
Instance name:  
Ignoring thread ID: 
Buffer remaining:  <Buffer >
Logging in with config {"host":"bsx92c1i9t.database.windows.net","port":1433,"database":"arr","userName":"tjanczuk","password":"<cut out>","tdsVersion":50334323,"logDebug":true,"logError":true}
Sending packet: LOGIN7 at state 3
Inserting header for type:  16
Packet size: 244
Socket closed

I will look into this.

Any update on this? I'm seeing this as well.

Also seeing this problem

I encountered this issue as well.