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)
 Programmatically updating the port number.

Author  Topic 

ravilobo
Master Smack Fu Yak Hacker

1184 Posts

Posted - 2009-05-11 : 23:00:25
Is it possible to update SQL Server port programmatically? I need to do this on several servers, I am looking for an automated option.


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

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-05-12 : 00:35:00
You can do it by updating the registry, which can be modified via xp_regwrite from T-SQL.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

ravilobo
Master Smack Fu Yak Hacker

1184 Posts

Posted - 2009-05-12 : 00:46:17
Great!
I too was thinking in that direction.

I have two questions,
1. Do you know the registry key? Are there multiple keys in need of update?
2. Do I need to do a server restart?

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

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2009-05-12 : 01:11:27
this might help . .
http://decipherinfosys.wordpress.com/2008/01/02/finding-the-port-number-for-a-particular-sql-server-instance/


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

Go to Top of Page

ravilobo
Master Smack Fu Yak Hacker

1184 Posts

Posted - 2009-05-12 : 10:33:21
Thanks khtan!
That helped a lot.

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

- Advertisement -