473,395 Members | 2,079 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

JDBC - connect timed out to SQL Server 2000

144 100+
hello,

i tried to connect to SQL Server 2000 on my localhost through JDBC. i used the Microsoft SQL Server JDBC Driver 2.0, i was trying to add a new Entity Class from Databases... in Netbean 6.7.1

i couldnt make it, as i got the following error

Expand|Select|Wrap|Line Numbers
  1. Unable to add connection. Cannot establish a connection to
  2. jdbc:sqlserver://localhost:1433;databaseName=Northwind using 
  3. com.microsoft.sqlserver.jdbc.SQLServerDriver (The TCP/IP connection 
  4. to the host localhost, port 1433 has failed. Error: "connect timed out. 
  5. Verify the connaction propoerties, check that an instance of SQL 
  6. Server is running on the host and accepting TCP/IP connections 
  7. at the port, and that no firewall is blocking TCP connections to the port.".).
  8.  
i've verified through Server Network Utility the the TCP/IP protocol is enabled and is listening on port 1433. but when i run the command "netstat -an" i don't see any service listening on port 1433.

i can connect to the database server through the query analyzer though,
what's possibly wrong? has there been any issue regarding to this?

Thank you.
Oct 12 '09 #1
1 4169
Dököll
2,364 Expert 2GB
Hey thesti!

Add the code in question, we recently switched to SQL 2005 from 2000. Not quick to say I know SQL Server like the back of my hands but there were times when I thought there must be a better way, I don't say that anymore.

Also, you may need credentials to connect your app to the server.

I would do some of the critical steps first. Write code that you know will work as far as a connection, so you can isolate the server being the issue.

Simple JDBC/ODBC connections with datasource:

Expand|Select|Wrap|Line Numbers
  1.  
  2. sun.jdbc.odbc.JdbcOdbcDriver
  3. jdbc:odbc:Northwind
  4.  
  5.  
Which means you'd need to try and connect to an Access database via Administrative Tools. If you can connect, then it is not your code or the server.

Then you would try sqlserver, with creds and see...

Alternatively, you can do likewsie with sqlserver with creds on Admin Tools to keep it simple for troubleshooting (Only do this locally, if app is promoted to full blown app server jdbc/odbc datasource via Admin Tools will have unfriendly results) :-)

Post what you have for a closer look, the whole thing... catch blocks and all:-) look into your creds, you will need those, except of course if the admins near leave it all open for all to see:-)

C-ya!
Nov 10 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: JShurmatz | last post by:
If anyone can shed some light on this problem I would greatly appreciate it. I am unsuccessfully trying to use a database connnection retrieved from a pool configured using Java System Web...
1
by: dfdfd | last post by:
I have a MSDE database that I am trying to connect to with JDBC. I don't have SQL Server installed. Is this possible? When I try to connect I get the error: java.sql.SQLException: Login...
0
by: Swami | last post by:
Hi, I have installed MQ SQL Server 2000 on my laptop and trying to use SPARTA 2000 JDBC Driver (inetmssql.jar) to connect to the local db. I wrote a sample Java app to test the connection and I...
6
by: Swami | last post by:
Hi, I have installed MQ SQL Server 2000 on my laptop and trying to use SPRINTA 2000 JDBC Driver (inetmssql.jar) to connect to the local db. I wrote a sample Java app to test the connection and I...
1
by: doniravi | last post by:
hello sir... i m using sql server 2000 database and usig jsp to access it when accessig i am getting followig error java.sql.SQLException: Unable to connect. Invalid URL. i installed...
2
by: bevis | last post by:
I'm new to sql server and mysql but this seems like it should be a pretty straight forward jdbc connection. But I have spent almost 2 days just trying to get a jdbc connection. Please help if you...
3
by: Anoop | last post by:
Is it true that there are no type 4 jdbc drivers to connect to a DB2 server v7.1? The DB2 server is hosted on ACF2 (OS/390). We would be connecting from windows and solaris boxes. If it is true,...
1
by: aj | last post by:
I'm a newbie w/ SQL Server 2005. We will be connecting to SQL Server 2005 via JDBC. We have made this work by using an SQL Server account, rather than an Active Directory (AD) account, even...
2
by: prasath03 | last post by:
Hi, I am using Microsoft SQL Server 2000 Driver for JDBC to connect to SQL Sever 2000. It is just a test application whether its connect or not. But I got the following errors: Error is:...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.