Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Script for Changing Port Number of SQL Server 2005 Expand / Collapse
Author
Message
Posted Tuesday, October 14, 2008 11:45 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, December 03, 2008 12:42 AM
Points: 3, 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.
Post #585965
Posted Wednesday, October 15, 2008 12:16 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Monday, April 14, 2014 7:05 PM
Points: 197, Visits: 158
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



Post #586442
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse