Monday, March 19, 2012

Example of SMO or WMI to configure SQL Server port number.

Hi,

Are there any one who give a example of SMO or WMI to set SQL Server port number?

Use the server class:

http://msdn2.microsoft.com/en-us/library/microsoft.sqlserver.management.smo.server.aspx

Buck Woody

|||

Actually, you need to use the ServerProtocols namespace from Microsoft.SqlServer.Management.Smo.Wmi. MSDN doesn't have much good help on this specifically, but I found a couple blogs worth looking at:

http://sqlserver2005.de/SQLServer2005/MyBlog/tabid/56/EntryID/19/Default.aspx

http://www.sqljunkies.com/WebLog/marathonsqlguy/archive/2006/11/30/25785.aspx <-- This has a good sample of how to look at the properties, it's a short leap to setting them from here.

The ServerProtocol topic in BOL is at http://msdn2.microsoft.com/en-us/library/microsoft.sqlserver.management.smo.wmi.serverprotocol.aspx.

Mike

No comments:

Post a Comment