SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Script for Changing Port Number of SQL Server 2005


Script for Changing Port Number of SQL Server 2005

Author
Message
vikas_chawla
vikas_chawla
Forum Newbie
Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)

Group: General Forum Members
Points: 7 Visits: 31
What i want to do is that i want a script to change the port number in sql server services in configuration manager. Though i can change manually by going directly to configuration manager but i need a script for some purpose. If anybody know, please fwd it to me.
Shawn Wilson
Shawn Wilson
SSC-Addicted
SSC-Addicted (461 reputation)SSC-Addicted (461 reputation)SSC-Addicted (461 reputation)SSC-Addicted (461 reputation)SSC-Addicted (461 reputation)SSC-Addicted (461 reputation)SSC-Addicted (461 reputation)SSC-Addicted (461 reputation)

Group: General Forum Members
Points: 461 Visits: 286
look at this.... although this only reads, I'm sure there is a registry method to write to the registry as well. I would take a backup of the registry before I'd go poking my fingers around in there as well as make sure I'd do this in a sandbox area too.

http://www.databasejournal.com/features/mssql/article.php/3764516

[EDIT]
upon further digging...here is a script fragment...


$protocolproperty=Get-WmiObject -namespace root\Microsoft\SqlServer\ComputerManagement -class ClientNetworkProtocolProperty `
-filter "PropertyName='Default Port'"
$protocolproperty.SetNumericalValue(7001)

this came from the same site I mentioned above but different article...

http://www.databasejournal.com/features/mssql/article.php/3709441



Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search