Partilhar via


ServerAlias Constructor (ManagedComputer, String)

Initializes a new instance of the ServerAlias class on the specified WMI installation and with the specified name.

Namespace: Microsoft.SqlServer.Management.Smo.Wmi
Assembly: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

Syntax

'Declaration
Public Sub New ( _
    managedComputer As ManagedComputer, _
    name As String _
)
public ServerAlias (
    ManagedComputer managedComputer,
    string name
)
public:
ServerAlias (
    ManagedComputer^ managedComputer, 
    String^ name
)
public ServerAlias (
    ManagedComputer managedComputer, 
    String name
)
public function ServerAlias (
    managedComputer : ManagedComputer, 
    name : String
)

Parameters

  • managedComputer
    A ManagedComputer object value that specifies the WMI installation for which the server connection alias is used.
  • name
    A String value that specifies the name of the server connection alias.

Remarks

This namespace, class, or member is supported only in version 2.0 of the Microsoft .NET Framework.

Example

How to: Stop and Restart the Microsoft SQL Server Service to the Instance of SQL Server in Visual Basic .NET

Platforms

Development Platforms

For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.

Target Platforms

For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.

See Also

Reference

ServerAlias Class
ServerAlias Members
Microsoft.SqlServer.Management.Smo.Wmi Namespace

Other Resources

Managing Services and Network Settings by Using WMI Provider
WMI and SQL Server
Connecting to the SQL Server Database Engine