Export (0) Print
Expand All
Collapse the table of content
Expand the table of content
Expand Minimize

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)

'Declaration
<SfcKeyAttribute()> _
<SfcPropertyAttribute(SfcPropertyFlags.None Or SfcPropertyFlags.Standalone Or SfcPropertyFlags.SqlAzureDatabase Or SfcPropertyFlags.Matrix)> _
Public ReadOnly Property Name As String 
	Get
'Usage
Dim instance As Server 
Dim value As String 

value = instance.Name

Property Value

Type: String
A String value that specifies the name of server.

Implements

IAlienRoot.Name

C#

Console.WriteLine(srv.Name)

PowerShell

Write-Host $srv.Name
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2015 Microsoft