Export (0) Print
Expand All

Server Class

 

Applies To: SQL Server 2016 Preview

The Server object represents an instance of SQL Server.

Namespace:   Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)


[EvaluationModeAttribute(AutomatedPolicyEvaluationMode::CheckOnSchedule)]
[RootFacetAttribute((Server^::typeid))]
[PhysicalFacetAttribute]
public ref class Server sealed : SqlSmoObject, ISfcSupportsDesignMode, 
	IAlterable, IScriptable, IServerSettings, IServerInformation, 
	IDmfFacet, IAlienRoot, ISfcDomainLite, ISfcHasConnection

NameDescription
System_CAPS_pubmethodServer()

Initializes a new instance of the Server class.

System_CAPS_pubmethodServer(ServerConnection^)

Initializes a new instance of the Server class based on the specified connection.

System_CAPS_pubmethodServer(String^)

Initializes a new instance of the Server class with the specified name.

NameDescription
System_CAPS_pubpropertyActiveDirectory

Obsolete.Gets information about the Active Directory settings for the instance of SQL Server.

System_CAPS_pubpropertyAffinityInfo

Gets the AffinityInfo object that is associated with an instance of SQL Server.

System_CAPS_pubpropertyAuditLevel

Gets or sets the AuditLevel property value.

System_CAPS_pubpropertyAudits

Represents a collection of Audit objects. Each Audit object represents an audit log defined on the instance of SQL Server.

System_CAPS_pubpropertyAvailabilityGroups

Gets the available groups in the server.

System_CAPS_pubpropertyBackupDevices

Represents a collection of BackupDevice objects. Each BackupDevice object represents a backup device defined on the instance of SQL Server.

System_CAPS_pubpropertyBackupDirectory

Gets or sets the BackupDirectory property value.

System_CAPS_pubpropertyBrowserServiceAccount

Gets the service account that the Browser service runs under on the instance of SQL Server.

System_CAPS_pubpropertyBrowserStartMode

Gets the start mode for the SQL Server Browser Service running on the instance of SQL Server.

System_CAPS_pubpropertyBuildClrVersion

Gets the BuildClrVersion property value.

System_CAPS_pubpropertyBuildClrVersionString

Gets the version string of the CLR that was used while building the instance.

System_CAPS_pubpropertyBuildNumber

Gets the BuildNumber property value.

System_CAPS_pubpropertyClusterName

Gets the name of the cluster.

System_CAPS_pubpropertyClusterQuorumState

Gets the state of the cluster quorum.

System_CAPS_pubpropertyClusterQuorumType

Gets the type of the cluster quorum.

System_CAPS_pubpropertyCollation

Gets the Collation property value.

System_CAPS_pubpropertyCollationID

Gets the CollationID property value.

System_CAPS_pubpropertyComparisonStyle

Gets the Windows comparison style of the collation.

System_CAPS_pubpropertyComputerNamePhysicalNetBIOS

Gets the NetBIOS name of the local computer on which the instance of SQL Server is currently running.

System_CAPS_pubpropertyConfiguration

Gets the configuration options for the instance of SQL Server.

System_CAPS_pubpropertyConnectionContext

Gets the current server connection details for the instance of SQL Server.

System_CAPS_pubpropertyCredentials

Represents a collection of Credential objects. Each Credential object represents a credential defined on the instance of SQL Server.

System_CAPS_pubpropertyCryptographicProviders

Gets the list of server cryptographic providers.

System_CAPS_pubpropertyDatabases

Represents a collection of Database objects. Each Database object represents a database defined on the instance of SQL Server.

System_CAPS_pubpropertyDefaultFile

Gets or sets the DefaultFile property value.

System_CAPS_pubpropertyDefaultLog

Gets or sets the default log of the server.

System_CAPS_pubpropertyDefaultTextMode

Gets or sets the Boolean property value that specifies whether the default text mode is set for the instance of SQL Server.

System_CAPS_pubpropertyEdition

Gets the Edition property value.

System_CAPS_pubpropertyEndpoints

Represents a collection of Endpoint objects. Each Endpoint object represents an endpoint defined on the instance of SQL Server.

System_CAPS_pubpropertyEngineEdition

Gets the edition of the engine.

System_CAPS_pubpropertyErrorLogPath

Gets the ErrorLogPath property value.

System_CAPS_pubpropertyEvents

Gets the server events that are associated with the instance of SQL Server.

System_CAPS_pubpropertyFilestreamLevel

Gets the level of FILESTREAM access specified on the instance of SQL Server.

System_CAPS_pubpropertyFilestreamShareName

Gets the Windows share name where FILESTREAM data is stored on the instance of SQL Server.

System_CAPS_pubpropertyFullTextService

Gets the Microsoft Search Full-Text service implementation for the instance of SQL Server.

System_CAPS_pubpropertyHadrManagerStatus

Gets the status of the Hadr manager.

System_CAPS_pubpropertyInformation

Gets information about the instance of SQL Server.

System_CAPS_pubpropertyInstallDataDirectory

Gets the local Windows directory where the installation data is stored for the instance of SQL Server.

System_CAPS_pubpropertyInstallSharedDirectory

Gets the remote shared directory where the installation data is stored for the instance of SQL Server.

System_CAPS_pubpropertyInstanceName

Gets the instance name of the instance of SQL Server.

System_CAPS_pubpropertyInstances

Gets the DatabaseEngineInstanceCollection which contains each DatabaseEngineInstance which runs on this server.

System_CAPS_pubpropertyIsCaseSensitive

Gets the value that indicates whether the case is sensitive.

System_CAPS_pubpropertyIsClustered

Gets a value that indicating whether the server is clustered.

System_CAPS_pubpropertyIsFullTextInstalled

Gets the Boolean value that specifies whether Full-Text service is installed on the instance of SQL Server.

System_CAPS_pubpropertyIsHadrEnabled

Gets a value that indicates whether the Hadr is enabled.

System_CAPS_pubpropertyIsSingleUser

Gets the property value whether the user is single.

System_CAPS_pubpropertyIsXTPSupported

Gets the Boolean value that specifies whether the instance of SQL Server supports Extreme Transaction Processing (XTP).

System_CAPS_pubpropertyJobServer

Gets the SQL Server Agent associated with the instance of SQL Server.

System_CAPS_pubpropertyLanguage

Gets the language of the server.

System_CAPS_pubpropertyLanguages

Represents a collection of Language objects. Each Language object represents an languages supported by the instance of SQL Server.

System_CAPS_pubpropertyLinkedServers

Represents a collection of LinkedServer objects. Each LinkedServer object represents a linked server registered on the instance of SQL Server.

System_CAPS_pubpropertyLoginMode

Gets or sets the ServerLoginMode property value.

System_CAPS_pubpropertyLogins

Represents a collection of Login objects. Each Login object represents a login defined on the instance of SQL Server.

System_CAPS_pubpropertyMail

Gets the Microsoft SQL Mail service associated with the instance of SQL Server.

System_CAPS_pubpropertyMailProfile

Gets or sets the mail profile of the server.

System_CAPS_pubpropertyMasterDBLogPath

Get the MasterDBLogPath property value.

System_CAPS_pubpropertyMasterDBPath

Gets the MasterDBPath property value.

System_CAPS_pubpropertyMaxPrecision

Gets the MaxPrecision property value.

System_CAPS_pubpropertyName

Gets the name of the server, which is the physical machine name.

System_CAPS_pubpropertyNamedPipesEnabled

Gets the Boolean value that specifies whether Named Pipes provider is enabled for client-server connectivity on the instance of SQL Server.

System_CAPS_pubpropertyNetName

Gets the NetName property value.

System_CAPS_pubpropertyNumberOfLogFiles

Gets or sets the NumberOfLogFiles property value.

System_CAPS_pubpropertyOleDbProviderSettings

Gets the DbProviderSettings property value.

System_CAPS_pubpropertyOSVersion

Gets the OSVersion property value.

System_CAPS_pubpropertyPerfMonMode

Gets or sets the PerfMonMode property value.

System_CAPS_pubpropertyPhysicalMemory

Gets the physical memory used by the server.

System_CAPS_pubpropertyPhysicalMemoryUsageInKB

Gets an Int64 value that specifies the amount of memory in use by the instance of the Database Engine, in kilobytes.

System_CAPS_pubpropertyPlatform

Gets the server platform.

System_CAPS_pubpropertyProcessors

Gets the Processors property value.

System_CAPS_pubpropertyProcessorUsage

Gets an Int32 value that specifies the processor time used by the instance of the Database Engine.

System_CAPS_pubpropertyProduct

Gets the product of the server.

System_CAPS_pubpropertyProductLevel

Gets the ProductLevel property value.

System_CAPS_pubpropertyProperties

Gets a collection of Property objects that represent the object properties.(Inherited from SqlSmoObject.)

System_CAPS_pubpropertyProxyAccount

Gets the proxy account associated with the instance of SQL Server.

System_CAPS_pubpropertyResourceGovernor

Gets the resource governor of the server.

System_CAPS_pubpropertyResourceLastUpdateDateTime

Gets the last time the resource was last updated.

System_CAPS_pubpropertyResourceVersion

Gets the ResourceVersion property.

System_CAPS_pubpropertyResourceVersionString

Gets the ResouceVersionString property value.

System_CAPS_pubpropertyRoles

Represents a collection of ServerRole objects. Each ServerRole object represents a role defined on the instance of SQL Server.

System_CAPS_pubpropertyRootDirectory

Gets the RootDirectory property value.

System_CAPS_pubpropertyServerAuditSpecifications

Represents a collection of ServerAuditSpecification objects. Each ServerAuditSpecification object represents a specific audit specification defined on the instance of SQL Server.

System_CAPS_pubpropertyServerType

Gets the server type for the instance of SQL Server.

System_CAPS_pubpropertyServiceAccount

Gets the service account under which the instance of SQL Server is running.

System_CAPS_pubpropertyServiceInstanceId

Gets the ID value that uniquely identifies the service instance for this instance of SQL Server.

System_CAPS_pubpropertyServiceMasterKey

Gets the service master key associated with the instance of SQL Server.

System_CAPS_pubpropertyServiceName

Gets the service name for the server.

System_CAPS_pubpropertyServiceStartMode

Gets the start mode for the SQL Server service.

System_CAPS_pubpropertySettings

Gets modifiable settings for the instance of SQL Server.

System_CAPS_pubpropertySmartAdmin

Gets the smart admin associated with this server.

System_CAPS_pubpropertySqlCharSet

Gets the value that identifies the character set used by the server.

System_CAPS_pubpropertySqlCharSetName

Gets the name of the character set used by the server.

System_CAPS_pubpropertySqlDomainGroup

Gets the domain group for the instance of SQL Server.

System_CAPS_pubpropertySqlSortOrder

Gets the SQL sort order from the collation.

System_CAPS_pubpropertySqlSortOrderName

Gets the name of the sort order used by the server.

System_CAPS_pubpropertyState

Gets the state of the referenced object.(Inherited from SmoObjectBase.)

System_CAPS_pubpropertyStatus

Gets the current status of the Server.

System_CAPS_pubpropertySystemDataTypes

Represents a collection of SystemDataType objects. Each SystemDataType object represents a system data type defined on the instance of SQL Server.

System_CAPS_pubpropertySystemMessages

Represents a collection of SystemMessage objects. Each SystemMessage object represents a system message defined on the instance of SQL Server.

System_CAPS_pubpropertyTapeLoadWaitTime

Gets or sets the TapeLoadWaitTime property value.

System_CAPS_pubpropertyTcpEnabled

Gets the Boolean value that determines whether TCP/IP protocol is enabled on this instance of SQL Server.

System_CAPS_pubpropertyTriggers

Represents a collection of ServerDdlTrigger objects. Each ServerDdlTrigger object represents a server data definition language (DDL) trigger that is defined on the instance of SQL Server.

System_CAPS_pubpropertyUrn

Gets the Uniform Resource Name (URN) address value that uniquely identifies the object.(Inherited from SqlSmoObject.)

System_CAPS_pubpropertyUserData

Gets or sets user-defined data associated with the referenced object.(Inherited from SmoObjectBase.)

System_CAPS_pubpropertyUserDefinedMessages

Represents a collection of UserDefinedMessage objects. Each UserDefinedMessage object represents a user-defined message defined on the instance of SQL Server.

System_CAPS_pubpropertyUserOptions

Gets the user options for the current connection to the instance of SQL Server.

System_CAPS_pubpropertyVersion

Gets the Version property value.

System_CAPS_pubpropertyVersionMajor

Gets the major version of the server.

System_CAPS_pubpropertyVersionMinor

Gets the VersionMinor property value.

System_CAPS_pubpropertyVersionString

Gets the version string of the server.

NameDescription
System_CAPS_pubmethodAlter()

Updates any Server object property changes on the instance of SQL Server. 

System_CAPS_pubmethodAlter(Boolean)

Updates any Server object property changes on the instance of SQL Server with the option to override value checking.

System_CAPS_pubmethodAttachDatabase(String^, StringCollection^)

Attaches an existing database that is made up of one or more files to the instance of SQL Server with the specified name and using the specified data files. 

System_CAPS_pubmethodAttachDatabase(String^, StringCollection^, AttachOptions)

Attaches an existing database that is made up of one or more files to the instance of SQL Server that has the specified name and using the specified data files and attachment options. 

System_CAPS_pubmethodAttachDatabase(String^, StringCollection^, String^)

Attaches an existing database that is made up of one or more files to the instance of SQL Server with the specified name and using the specified data files. 

System_CAPS_pubmethodAttachDatabase(String^, StringCollection^, String^, AttachOptions)

Attaches an existing database that is made up of one or more files to the instance of SQL Server by using the specified name, data files, and attachment options. 

System_CAPS_pubmethodCompareUrn(Urn^, Urn^)

Compares two URNS.

System_CAPS_pubmethodDeleteBackupHistory(DateTime)

Deletes the backup history for this instance of SQL Server up until the specified date and time.

System_CAPS_pubmethodDeleteBackupHistory(Int32)

Deletes the backup history for the specified media set.

System_CAPS_pubmethodDeleteBackupHistory(String^)

Deletes the backup history for the specified database.

System_CAPS_pubmethodDeny(ServerPermissionSet^, String^)

Denies the specified set of permissions for the specified grantee on the instance of SQL Server.

System_CAPS_pubmethodDeny(ServerPermissionSet^, String^, Boolean)

Denies the specified set of permissions for the specified grantee and other users that the grantee granted the specified set of permissions on the instance of SQL Server.

System_CAPS_pubmethodDeny(ServerPermissionSet^, array<String^>^)

Denies the specified set of permissions for the specified grantees on the instance of SQL Server.

System_CAPS_pubmethodDeny(ServerPermissionSet^, array<String^>^, Boolean)

Denies the specified set of permissions for the specified grantees and other users that the grantee granted the specified set of permissions on the instance of SQL Server.

System_CAPS_pubmethodDetachDatabase(String^, Boolean)

Detaches the specified database from the instance of SQL Server with the option to update statistics before the database is detached.

System_CAPS_pubmethodDetachDatabase(String^, Boolean, Boolean)

Detaches the specified database from the instance of SQL Server with the option to update statistics before the database is detached.

System_CAPS_pubmethodDetachedDatabaseInfo(String^)

Returns information about a detached database file.

System_CAPS_pubmethodDiscover()

Discovers a list of type Object.(Inherited from SqlSmoObject.)

System_CAPS_pubmethodEnumActiveCurrentSessionTraceFlags()

Gets active session flags as a DataTable.

System_CAPS_pubmethodEnumActiveGlobalTraceFlags()

Gets a DataTable that contains active global trace flags.

System_CAPS_pubmethodEnumAvailableMedia()

Enumerates a list of media that is visible to the instance of SQL Server on the local area network.

System_CAPS_pubmethodEnumAvailableMedia(MediaTypes)

Enumerates a list of media that is visible to the instance of SQL Server on the local area network and limited to the type of media specified.

System_CAPS_pubmethodEnumClusterMembersState()

Enumerates the current state of the Windows cluster members of which the instance is part of.

System_CAPS_pubmethodEnumClusterSubnets()

Enumerates a list of cluster subnets.

System_CAPS_pubmethodEnumCollations()

Enumerates a list of collations supported by the instance of SQL Server.

System_CAPS_pubmethodEnumDatabaseMirrorWitnessRoles()

Enumerates a list of database mirror witness roles.

System_CAPS_pubmethodEnumDatabaseMirrorWitnessRoles(String^)

Enumerates a list of mirror witness roles for the specified database.

System_CAPS_pubmethodEnumDetachedDatabaseFiles(String^)

Enumerates a list of detached database files.

System_CAPS_pubmethodEnumDetachedLogFiles(String^)

Enumerates a list of detached log files.

System_CAPS_pubmethodEnumDirectories(String^)

Enumerates a list of directories relative to the specified path.

System_CAPS_pubmethodEnumErrorLogs()

Enumerates a list of SQL Server error log files.

System_CAPS_pubmethodEnumLocks()

Enumerates a list of current locks held on the instance of SQL Server.

System_CAPS_pubmethodEnumLocks(Int32)

Enumerates a list of current locks held by the specified process on the instance of SQL Server.

System_CAPS_pubmethodEnumMembers(RoleTypes)

Enumerates a list of members of server roles and database roles on the instance of SQL Server.

System_CAPS_pubmethodEnumObjectPermissions()

Enumerates a list of object permissions for the instance of SQL Server.

System_CAPS_pubmethodEnumObjectPermissions(ObjectPermissionSet^)

Enumerates a list of object permissions for a specified permission on the instance of SQL Server.

System_CAPS_pubmethodEnumObjectPermissions(String^)

Enumerates a list of object permissions for a specified grantee on the application instance of SQL Server.

System_CAPS_pubmethodEnumObjectPermissions(String^, ObjectPermissionSet^)

Enumerates a list of object permissions for a specified grantee and a specified permission on the instance of SQL Server.

System_CAPS_pubmethodEnumPerformanceCounters()

Enumerates a list of performance counters that are supported by the instance of SQL Server.

System_CAPS_pubmethodEnumPerformanceCounters(String^)

Enumerates a list of performance counters that are supported by the instance of SQL Server for a specified object.

System_CAPS_pubmethodEnumPerformanceCounters(String^, String^)

Enumerates a list of performance counters that are supported by the instance of SQL Server for a specified object and specified counter.

System_CAPS_pubmethodEnumPerformanceCounters(String^, String^, String^)

Enumerates a list of performance counters that are supported by the instance of SQL Server for a specified object, for a specified counter, and on the specified instance of SQL Server.

System_CAPS_pubmethodEnumProcesses()

Enumerates a list of processes running on the instance of SQL Server.

System_CAPS_pubmethodEnumProcesses(Boolean)

Enumerates a list of processes running on the instance of SQL Server with the option to exclude system processes.

System_CAPS_pubmethodEnumProcesses(Int32)

Enumerates a list of information about the specified process.

System_CAPS_pubmethodEnumProcesses(String^)

Enumerates a list of processes running on the instance of SQL Server that are associated with the specified login.

System_CAPS_pubmethodEnumServerAttributes()

Enumerates a list of server attributes for the instance of SQL Server.

System_CAPS_pubmethodEnumServerPermissions()

Enumerates a list of server permissions for the instance of SQL Server.

System_CAPS_pubmethodEnumServerPermissions(ServerPermissionSet^)

Enumerates a list of server permissions for a specified permission on the instance of SQL Server.

System_CAPS_pubmethodEnumServerPermissions(String^)

Enumerates a list of server permissions for a specified grantee on the instance of SQL Server.

System_CAPS_pubmethodEnumServerPermissions(String^, ServerPermissionSet^)

Enumerates a list of server permissions for a specified grantee and a specified permission on the instance of SQL Server.

System_CAPS_pubmethodEnumStartupProcedures()

Enumerates a list of startup procedures.

System_CAPS_pubmethodEnumWindowsDomainGroups()

Enumerates a list of Microsoft Windows group accounts defined on a domain.

System_CAPS_pubmethodEnumWindowsDomainGroups(String^)

Enumerates a list of Microsoft Windows group accounts defined for the specified domain.

System_CAPS_pubmethodEnumWindowsGroupInfo()

Enumerates a list of information about all Microsoft Windows groups that have explicitly granted access to the instance of SQL Server.

System_CAPS_pubmethodEnumWindowsGroupInfo(String^)

Enumerates a list of information about all Microsoft Windows groups that have explicitly granted access to the instance of SQL Server.

System_CAPS_pubmethodEnumWindowsGroupInfo(String^, Boolean)

Enumerates a list of information about all Microsoft Windows groups that have explicitly granted access to the instance of SQL Server and with the option to list the individual members.

System_CAPS_pubmethodEnumWindowsUserInfo()

Enumerates a list of information about all Microsoft Windows users that have explicitly granted access to SQL Server.

System_CAPS_pubmethodEnumWindowsUserInfo(String^)

Enumerates a list of information about all Microsoft Windows users that have explicitly granted access to the instance of SQL Server.

System_CAPS_pubmethodEnumWindowsUserInfo(String^, Boolean)

Enumerates a list of information about all Microsoft Windows users that have explicitly granted access to the instance of SQL Server and with the option to list all the permissions paths (groups) through which the user has been granted access to the instance of SQL Server.

System_CAPS_pubmethodEquals(Object^)

(Inherited from Object.)

System_CAPS_protmethodFormatSqlVariant(Object^)

Formats an object as T: Microsoft.Data.Schema.Sql.DataGenerator.SqlVariant type.(Inherited from SqlSmoObject.)

System_CAPS_pubmethodGetActiveDBConnectionCount(String^)

Returns the number of active connections for the specified database.

System_CAPS_protmethodGetContextDB()

Gets the context database that is associated with this object.(Inherited from SqlSmoObject.)

System_CAPS_protmethodGetDBName()

Gets the database name that is associated with the object.(Inherited from SqlSmoObject.)

System_CAPS_pubmethodGetDefaultInitFields(Type^)

Returns the property types that are initialized by default when the specified object is initialized.

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetPropertyNames(Type^)

Returns the names of the initialized properties for the specified object type.

System_CAPS_protmethodGetPropValue(String^)

Gets a property value of the SqlSmoObject object.(Inherited from SqlSmoObject.)

System_CAPS_protmethodGetPropValueOptional(String^)

Gets a property value of the SqlSmoObject object.(Inherited from SqlSmoObject.)

System_CAPS_protmethodGetPropValueOptionalAllowNull(String^)

Gets a property value of the SqlSmoObject object.(Inherited from SqlSmoObject.)

System_CAPS_protmethodGetServerObject()

Gets the server of the SqlSmoObject object.(Inherited from SqlSmoObject.)

System_CAPS_pubmethodGetSmoObject(Urn^)

Gets a SqlSmoObject that is specified by a URN.

System_CAPS_pubmethodGetStringComparer(String^)

Returns the comparer object corresponding to the collation string passed.

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodGrant(ServerPermissionSet^, String^)

Grants the specified set of permissions to the specified grantee on the instance of SQL Server.

System_CAPS_pubmethodGrant(ServerPermissionSet^, String^, Boolean)

Grants access to the specified permission to the grantee and the ability to grant access to other users on the instance of SQL Server.

System_CAPS_pubmethodGrant(ServerPermissionSet^, String^, Boolean, String^)

Grants the specified set of permissions to the grantee and the ability to grant the set of permissions to other users on the instance of SQL Server under an assumed role.

System_CAPS_pubmethodGrant(ServerPermissionSet^, array<String^>^)

Grants the specified set of permissions to the specified grantees on the instance of SQL Server.

System_CAPS_pubmethodGrant(ServerPermissionSet^, array<String^>^, Boolean)

Grants access to the specified permission to the grantees and the ability to grant access to other users on the instance of SQL Server.

System_CAPS_pubmethodGrant(ServerPermissionSet^, array<String^>^, Boolean, String^)

Grants the specified set of permissions to the grantees and the ability to grant the set of permissions to other users on the instance of SQL Server under an assumed role.

System_CAPS_pubmethodInitialize()

Initializes the object and forces the properties be loaded.(Inherited from SqlSmoObject.)

System_CAPS_pubmethodInitialize(Boolean)

Initializes the object and forces the properties be loaded.(Inherited from SqlSmoObject.)

System_CAPS_pubmethodIsDetachedPrimaryFile(String^)

Verifies whether the specified file is a primary (.mdf) database file.

System_CAPS_protmethodIsObjectInitialized()

Verifies whether the object has been initialized.(Inherited from SqlSmoObject.)

System_CAPS_protmethodIsObjectInSpace()

Verifies whether the object is isolated or connected to the instance of SQL Server.(Inherited from SqlSmoObject.)

System_CAPS_pubmethodIsWindowsGroupMember(String^, String^)

Verifies whether the specified Microsoft Windows user account is a member of the specified Windows group.

System_CAPS_pubmethodJoinAvailabilityGroup(String^)

Indicates a specified object to join the availability group.

System_CAPS_pubmethodKillAllProcesses(String^)

Stops the all processes on the specified database.

System_CAPS_pubmethodKillDatabase(String^)

Deletes the specified database and drops any active connection.

System_CAPS_pubmethodKillProcess(Int32)

Stops the specified process.

System_CAPS_pubmethodPingSqlServerVersion(String^)

Gets the version number of the instance of SQL Server.

System_CAPS_pubmethodPingSqlServerVersion(String^, String^, String^)

Get the version number of the specified instance of SQL Server using the specified login and password to gain access.

System_CAPS_pubmethodReadErrorLog()

Enumerates the SQL Server error log.

System_CAPS_pubmethodReadErrorLog(Int32)

Enumerates the specified SQL Server error log.

System_CAPS_pubmethodRefresh()

Refreshes the objects and properties on the Server object.(Overrides SqlSmoObject::Refresh().)

System_CAPS_pubmethodRevoke(ServerPermissionSet^, String^)

Revokes a previously granted set of permissions from a list of grantees on the instance of SQL Server.

System_CAPS_pubmethodRevoke(ServerPermissionSet^, String^, Boolean, Boolean)

Revokes previously granted permissions from a grantee on the instance of SQL Server and any other users to whom the grantee has granted the specified set of permissions. The grantee is also given the ability to revoke the specified set of permissions from other users under an assumed role.

System_CAPS_pubmethodRevoke(ServerPermissionSet^, String^, Boolean, Boolean, String^)

Revokes previously granted permissions from a grantee on the instance of SQL Server and any other users to whom the grantee has granted the specified set of permissions. The grantee is also given the ability to revoke the specified set of permissions from other users under an assumed role.

System_CAPS_pubmethodRevoke(ServerPermissionSet^, array<String^>^)

Revokes a previously granted set of permissions from a list of grantees on the instance of SQL Server.

System_CAPS_pubmethodRevoke(ServerPermissionSet^, array<String^>^, Boolean, Boolean)

Revokes previously granted permissions from grantees on the instance of SQL Server and any other users to whom the grantees have granted the specified set of permissions. The grantees are also given the ability to revoke the specified set of permissions from other users under an assumed role.

System_CAPS_pubmethodRevoke(ServerPermissionSet^, array<String^>^, Boolean, Boolean, String^)

Revokes previously granted permissions from grantees on the instance of SQL Server and any other users to whom the grantees have granted the specified set of permissions. The grantees are also given the ability to revoke the specified set of permissions from other users under an assumed role.

System_CAPS_pubmethodScript()

Generates a Transact-SQL script that can be used to re-create the server.

System_CAPS_pubmethodScript(ScriptingOptions^)

Generates a Transact-SQL script that can be used to re-create the server by using the specified scripting options.

System_CAPS_pubmethodSetDefaultInitFields(Boolean)

Specifies that all properties are fetched when objects are instantiated.

System_CAPS_pubmethodSetDefaultInitFields(Type^, Boolean)

Specifies all the properties are fetched when objects of the specified type are instantiated.

System_CAPS_pubmethodSetDefaultInitFields(Type^, array<String^>^)

Specifies the properties that are fetched when objects of the specified type are instantiated.

System_CAPS_pubmethodSetDefaultInitFields(Type^, StringCollection^)

Specifies the properties that are fetched when objects of the specified type are instantiated.

System_CAPS_protmethodSetParentImpl(SqlSmoObject^)

Sets the parent of the SqlSmoObject to the newParent parameter.(Inherited from SqlSmoObject.)

System_CAPS_pubmethodSetTraceFlag(Int32, Boolean)

Sets a trace flag.

System_CAPS_pubmethodToString()

Returns a String that represents the referenced object.(Inherited from SqlSmoObject.)

System_CAPS_pubmethodValidate(String^, array<Object^>^)

Validates the state of an object.(Inherited from SmoObjectBase.)

NameDescription
System_CAPS_pubeventPropertyChanged

Represents the event that occurs when a property is changed.(Inherited from SqlSmoObject.)

System_CAPS_pubeventPropertyMetadataChanged

Represents the event that occurs when property metadata changes.(Inherited from SqlSmoObject.)

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodIAlienObject::Discover()

Discovers any dependencies.

Do not reference this member directly in your code. It supports the SQL Server infrastructure.(Inherited from SqlSmoObject.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIAlienObject::GetDomainRoot()

Returns the root of the domain.(Inherited from SqlSmoObject.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIAlienObject::GetParent()

Gets the parent of this object. Do not reference this member directly in your code. It supports the SQL Server infrastructure.(Inherited from SqlSmoObject.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIAlienObject::GetPropertyType(String^)

Gets the type of the specified property.(Inherited from SqlSmoObject.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIAlienObject::GetPropertyValue(String^, Type^)

Gets the value of the specified property.(Inherited from SqlSmoObject.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIAlienObject::GetUrn()

Gets the Unified Resource Name (URN) of the object.

Do not reference this member directly in your code. It supports the SQL Server infrastructure.(Inherited from SqlSmoObject.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIAlienObject::Resolve(String^)

Gets the instance that contains the information about the object from the Unified Resource Name (URN) of the object.(Inherited from SqlSmoObject.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIAlienObject::SetObjectState(SfcObjectState)

Sets the object state to the specified SfcObjectState value.(Inherited from SqlSmoObject.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIAlienObject::SetPropertyValue(String^, Type^, Object^)

Sets the property value.(Inherited from SqlSmoObject.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIAlienRoot::DesignModeInitialize()

Identified for informational purposes only. Not supported. Future compatibility is not guaranteed. Ensures that the Server object is in design mode, that it is disconnected from the instance of the Database Engine it represents.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIAlienRoot::SfcHelper_GetDataTable(Object^, String^, array<String^>^, array<OrderBy^>^)

Identified for informational purposes only. Not supported. Future compatibility is not guaranteed. Gets a DataTable object containing the results from a URN.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIAlienRoot::SfcHelper_GetSmoObject(String^)

Identified for informational purposes only. Not supported. Future compatibility is not guaranteed. Gets the Object that represents the object identified by a specified URN.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIAlienRoot::SfcHelper_GetSmoObjectQuery(String^, array<String^>^, array<OrderBy^>^)

Identified for informational purposes only. Not supported. Future compatibility is not guaranteed. Gets a T:System.Collections.Generic.List of String values.

System_CAPS_pubinterfaceSystem_CAPS_privmethodISfcDomainLite::GetLogicalVersion()

Identified for informational purposes only. Not supported. Future compatibility is not guaranteed. Gets an Int32 value that indicates whether changes have been made to the Server object.

System_CAPS_pubinterfaceSystem_CAPS_privmethodISfcHasConnection::GetConnection()

Identified for informational purposes only. Not supported. Future compatibility is not guaranteed. Gets a connection to an Sfc backing store.

System_CAPS_pubinterfaceSystem_CAPS_privmethodISfcHasConnection::GetConnection(SfcObjectQueryMode)

Identified for informational purposes only. Not supported. Future compatibility is not guaranteed. Gets a connection to an Sfc backing store that supports the requested query mode.

System_CAPS_pubinterfaceSystem_CAPS_privmethodISfcHasConnection::SetConnection(ISfcConnection^)

Identified for informational purposes only. Not supported. Future compatibility is not guaranteed. Sets a connection to an Sfc backing store.

System_CAPS_pubinterfaceSystem_CAPS_privmethodISfcPropertyProvider::GetPropertySet()

Gets the interface reference to the set of properties of this object.

Do not reference this member directly in your code. It supports the SQL Server infrastructure.(Inherited from SqlSmoObject.)

The Server class represents an instance of SQL Server. In SMO programming, the Server object determines the connection to a physical SQL Server installation. The Server class is the highest level in the SMO instance object hierarchy. When a Server object variable is created, it establishes a connection to an instance of SQL Server. If you do not specify the name in the Server class constructor, the connection is always made with the local, default instance of SQL Server.

By using the Server object, you can do the following:

  • Connect to an instance of SQL Server.

  • Modify the connection settings.

  • Run Transact-SQL statements directly.

  • Capture Transact-SQL output from the SMO program.

  • Manage transactions.

  • View operating system information.

  • Modify and view SQL Server settings, information, and user options.

  • Modify and view SQL Server configuration options.

  • Register the instance of SQL Server in the Active Directory directory service.

  • Subscribe to and handle SQL Server events.

  • Reference databases, endpoints, credentials, logins, linked servers, system messages, DDL triggers, system data types, and user-defined messages.

  • Regenerate the service master key.

  • Detach and attach databases.

  • Stop processes or databases.

  • Grant, deny, or revoke permissions on the database.

  • Enumerate information about the server.

  • Read the error log.

  • Remove the backup history.

  • Get and set the default initialization fields for specified types.

  • Create endpoints, such as database mirroring endpoint.

To get Server object properties, users can be a member of the public fixed server role.

To set Server object properties, users must be a member of the sysadmin fixed server role.

Any public static (Shared in Microsoft Visual Basic) members of this type are safe for multithreaded operations. Any instance members are not guaranteed to be thread safe.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2015 Microsoft