Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 SQL server port problem

Author  Topic 

ravilobo
Master Smack Fu Yak Hacker

1184 Posts

Posted - 2009-07-30 : 21:04:30
We have a large number of production instances, where we need to change the
port setting from dynamic to static.

We wrote a script to do this change, with a port number unused by any other
application.

However the script failed on some of the servers. We feel there may be an
application that uses dynamic PORT that we have chosen for SQL Server.

Is there a work around for this problem?

------------------------
I think, therefore I am - Rene Descartes

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2009-07-30 : 22:35:51
quote:
However the script failed on some of the servers.

Check that the port is available on those server. You can use netstat to find out.

quote:
We feel there may be an
application that uses dynamic PORT that we have chosen for SQL Server.

You mean the application uses the same PORT as what you have chosen for SQL Server ? Are you using the same static port no for all your servers ? Try choose a 5 digits port no instead


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

ravilobo
Master Smack Fu Yak Hacker

1184 Posts

Posted - 2009-07-30 : 23:09:56
quote:

Check that the port is available on those server. You can use netstat to find out.


I used netstat to find the free port; however i feel a app is also using dynamic port. It's a coincidence that the app and sql server tried to gain the same port. That's why the code failed on only few of the server.

quote:
We feel there may be an
You mean the application uses the same PORT as what you have chosen for SQL Server ?


Yes.

quote:

Are you using the same static port no for all your servers ?


Yes.

quote:

Try choose a 5 digits port no instead


How does it reduces the chances for the app from getting the same port number?



------------------------
I think, therefore I am - Rene Descartes
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2009-07-30 : 23:16:24
there are less app uses 5 digits port no. Whatever port no you have chosen, you still have to ensure that it is not used in all your servers.

If an application is using dynamic port no which happens to coincide with your port no, try to stop that app first, change your port no, start the sql server and then that app. If that app is using dynamic port, it will not be able to use the same port when it starts as it had been used by SQL Server.


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

ravilobo
Master Smack Fu Yak Hacker

1184 Posts

Posted - 2009-07-31 : 00:04:46
quote:

If an application is using dynamic port no which happens to coincide with your port no, try to stop that app first, change your port no, start the sql server and then that app. If that app is using dynamic port, it will not be able to use the same port when it starts as it had been used by SQL Server.




This should work. However I have 2000+ instances. I don't know which app is using the port. I need to find a way to stop the app by scripting.


Thank you for your help.

------------------------
I think, therefore I am - Rene Descartes
Go to Top of Page
   

- Advertisement -