• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How do i know , on which port MS Sql Server is running?

 
vinay prasad
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am getting the following error when i try to run my program,
Please suggest me how do i know , which port my db server is running?


the error is as follows : < i have tried with 1433, its not working >
----------------------------------------------------------------------------
java.sql.SQLException: [Atinav][JDBC SQL Server Driver:Ver C3.0C] Invalid Port N
umber
at net.avenir.jdbc3.Driver.parseURL(Driver.java:246)
at net.avenir.jdbc3.Driver.connect(Driver.java:448)
at java.sql.DriverManager.getConnection(DriverManager.java:517)
at java.sql.DriverManager.getConnection(DriverManager.java:177)
at SimpleSelect.main(SimpleSelect.java:23)
----------------------------------------------------------------------------

Thanks all in advance
Vinay
 
Dylan Stamatopolis
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the JVM running on Windows or *n?x ?
 
vinay prasad
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
jvm is running on windows 200p professional...
 
vinay prasad
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if anybody out there to know this thing. show me some way....:<
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want to know what port a process is using on windows use netstat -ao. You should be able to find the PID that way, then use something like Process Explorer to work out what the process with that PID is called.

Another useful trick when using SQL Server is to create a .udl file (just create a text file and change the extension). Open it and you'll get a dialog box for setting up connections. If you create and test your connection this way(make sure you set the Provider correctly), then open the .uld file in a text browser, you can cut and past the connection URL. Saves a lot of headaches with invalid connection URLs.
[ June 24, 2004: Message edited by: Paul Sturrock ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic