Server.Name Property
Gets the name of the server, which is the physical machine name.
Namespace: Microsoft.SqlServer.Management.Smo
Assembly: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
Syntax
'Deklaracja
<SfcPropertyAttribute> _
<SfcKeyAttribute(0)> _
Public ReadOnly Property Name As String
[SfcPropertyAttribute]
[SfcKeyAttribute(0)]
public string Name { get; }
[SfcPropertyAttribute]
[SfcKeyAttribute(0)]
public:
virtual property String^ Name {
String^ get () sealed;
}
/** @property */
public final String get_Name ()
public final function get Name () : String
Property Value
A String value that specifies the name of server.
Example
Console.WriteLine(srv.Name)
Thread Safety
Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms
Development Platforms
For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server.
Target Platforms
For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server.
See Also