• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SQL Server : Exception when taking connection second time, with out closing first

 
ak singh
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I installed sql server 2005 (dev)
I have a java program which takes connection from database
connection string is :
"jdbc:sqlserver://localhost:1434;databaseName=abc"

It works fine, I modified the code now it takes connection and without closing the connection it tries to take another connection (with same database every thing same)Second time it throws an exception msg saying:: "An I/O error occurred while receiving the TDS prelogin response."

I thought its because of maximum no of connections but maximum no of connection is set to 0(ulimited).

what can be the problem and how to fix this PLEASE HELP ME!!!

 
ak singh
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please help...
 
Sreeni Gundla
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ak singh wrote:Please help...


what code changes you have done is there anything specific to Connection String ..?
please paste the complete error message you have.
 
Sreeni Gundla
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sreeni Gundla wrote:
ak singh wrote:Please help...


what code changes you have done is there anything specific to Connection String ..?
please paste the complete error message you have.


try this
http://www.windows-tech.info/15/9b35e0338be4f112.php
 
ak singh
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Error log is ::

 
ak singh
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I projected the problem in very simplified way.. Actually the problem was : I migrated my application, which is used by upto 500 concurrent user, from Oracle DB to Sql Server 2005. Same peace of code was working fine for Oracle database, but didnt work for Sql Server 2005.
I have fixed the problem. I commited a mistake, I was taking connection from prot 1434 (which is for browser) beacuse I was not able to take the connection from port 1433 (actually it was disabled ) when I enabled the TCS/IP protocal and changed the URL string to 1433 it started working fine.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic