0

I am using SQL Server (SQL EXPRESS) 2005 9.0.3042

I have poured through lots of examples.

Made sure TCP port 1433 open for all IP. Made sure browser is started Tried all kinds of config settings

using tedious or mssql

Just trying to find something that will work !!

But all I get is the following errors

ConnectionError: Failed to connect to localhost:1433 - Cannot call write after a stream was destroyed
at ConnectionError (C:\git\adv_energy\sql_node_js\node_modules\tedious\lib\errors.js:13:12)
at Connection.socketError (C:\git\adv_energy\sql_node_js\node_modules\tedious\lib\connection.js:1628:56)
at Socket.<anonymous> (C:\git\adv_energy\sql_node_js\node_modules\tedious\lib\connection.js:1395:14)
at Socket.emit (events.js:327:22)
at errorOrDestroy (internal/streams/destroy.js:108:12)
at onwriteError (_stream_writable.js:418:5)
at onwrite (_stream_writable.js:445:5)
at doWrite (_stream_writable.js:399:11)
at writeOrBuffer (_stream_writable.js:387:5)
at Socket.Writable.write (_stream_writable.js:318:11) {

code: 'ESOCKET' }

prestonjb
  • 1
  • 2
  • sql server 2005 express.... seriously? please consider upgrading to a more recent version (at least, one supported, especially when it's free). Did you make sure that the SQL Server service is running? Did you tried to connect using osql? – MLeblanc Aug 11 '20 at 17:51
  • yes I agree. this is an existing system. I will have to change other sw to ditch 2005. but I was hoping to get inside the DB without having to break the other sw. I did check the service and turned on everything. enabled TCP and started browser service also. haven't heard about osql. I will look into that thanks – prestonjb Aug 11 '20 at 20:04
  • osql is a command line utility to connect to sql server, nothing fancy. but if you can connect, this is not a sql-server issue, can't help you (i don't know node.js) – MLeblanc Aug 11 '20 at 20:12
  • Browser uses port 1434. Not sure if it is actually required for node.js, but if it is, you need to open that port also. – CB_Ron Aug 11 '20 at 22:41
  • @CB_Ron yes I did know that though I dont seem to see that it is an argument. When I specify an instance it seems that mssql/tedious assumes the port? I think I can specify it. and I think it is setup as 1434 (will check again)... For grins on the non instance way (TCP) it does try to use 1433 and if I change it to say 5555 then it times out until I specify in config{} that the port is 5555 then it works the same as above (same error but port is 5555) – prestonjb Aug 12 '20 at 03:26
  • 2
    @MLeblanc Thanks for the tip... I also found sqlcmd as well and with that I can dump a table using a stored proceedure command and make it look proper for a comma delimited file! So yes looks like the DB works. – prestonjb Aug 12 '20 at 03:26

0 Answers0