Dieser Artikel wurde noch nicht bewertet - Dieses Thema bewerten.

Server-Klasse

The Server object represents an instance of SQL Server.

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)
[RootFacetAttribute(typeof(Server))]
[EvaluationModeAttribute(AutomatedPolicyEvaluationMode.CheckOnSchedule)]
[PhysicalFacetAttribute]
public sealed class Server : SqlSmoObject, 
	ISfcSupportsDesignMode, IAlterable, IScriptable, IServerSettings, IServerInformation, 
	IDmfFacet, IAlienRoot, ISfcDomainLite, ISfcHasConnection

Der Server-Typ macht folgende Elemente verfügbar.

  NameBeschreibung
Öffentliche MethodeServer()Initializes a new instance of the Server class.
Öffentliche MethodeServer(String)Initializes a new instance of the Server class with the specified name.
Öffentliche MethodeServer(ServerConnection)Initializes a new instance of the Server class based on the specified connection.
Zum Anfang
  NameBeschreibung
Öffentliche EigenschaftActiveDirectory Veraltet Gets information about the Active Directory settings for the instance of SQL Server.
Öffentliche EigenschaftAffinityInfoGets the AffinityInfo object that is associated with an instance of SQL Server.
Öffentliche EigenschaftAuditLevelGets or sets the AuditLevel property value.
Öffentliche EigenschaftAuditsRepresents a collection of Audit objects. Each Audit object represents an audit log defined on the instance of SQL Server.
Öffentliche EigenschaftAvailabilityGroupsGets the available groups in the server.
Öffentliche EigenschaftBackupDevicesRepresents a collection of BackupDevice objects. Each BackupDevice object represents a backup device defined on the instance of SQL Server.
Öffentliche EigenschaftBackupDirectoryGets or sets the BackupDirectory property value.
Öffentliche EigenschaftBrowserServiceAccountGets the service account that the Browser service runs under on the instance of SQL Server.
Öffentliche EigenschaftBrowserStartModeGets the start mode for the SQL Server Browser Service running on the instance of SQL Server.
Öffentliche EigenschaftBuildClrVersionGets the BuildClrVersion property value.
Öffentliche EigenschaftBuildClrVersionStringGets the version string of the CLR that was used while building the instance.
Öffentliche EigenschaftBuildNumberGets the BuildNumber property value.
Öffentliche EigenschaftClusterNameGets the name of the cluster.
Öffentliche EigenschaftClusterQuorumStateGets the state of the cluster quorum.
Öffentliche EigenschaftClusterQuorumTypeGets the type of the cluster quorum.
Öffentliche EigenschaftCollationGets the Collation property value.
Öffentliche EigenschaftCollationIDGets the CollationID property value.
Öffentliche EigenschaftComparisonStyleGets the Windows comparison style of the collation.
Öffentliche EigenschaftComputerNamePhysicalNetBIOSGets the NetBIOS name of the local computer on which the instance of SQL Server is currently running.
Öffentliche EigenschaftConfigurationGets the configuration options for the instance of SQL Server.
Öffentliche EigenschaftConnectionContextGets the current server connection details for the instance of SQL Server.
Öffentliche EigenschaftCredentialsRepresents a collection of Credential objects. Each Credential object represents a credential defined on the instance of SQL Server.
Öffentliche EigenschaftCryptographicProvidersGets the list of server cryptographic providers.
Öffentliche EigenschaftDatabasesRepresents a collection of Database objects. Each Database object represents a database defined on the instance of SQL Server.
Öffentliche EigenschaftDefaultFileGets or sets the DefaultFile property value.
Öffentliche EigenschaftDefaultLogGets or sets the default log of the server.
Öffentliche EigenschaftDefaultTextModeGets or sets the Boolean property value that specifies whether the default text mode is set for the instance of SQL Server.
Öffentliche EigenschaftEditionGets the Edition property value.
Öffentliche EigenschaftEndpointsRepresents a collection of Endpoint objects. Each Endpoint object represents an endpoint defined on the instance of SQL Server.
Öffentliche EigenschaftEngineEditionGets the edition of the engine.
Öffentliche EigenschaftErrorLogPathGets the ErrorLogPath property value.
Öffentliche EigenschaftEventsGets the server events that are associated with the instance of SQL Server.
Öffentliche EigenschaftFilestreamLevelGets the level of FILESTREAM access specified on the instance of SQL Server.
Öffentliche EigenschaftFilestreamShareNameGets the Windows share name where FILESTREAM data is stored on the instance of SQL Server.
Öffentliche EigenschaftFullTextServiceGets the Microsoft Search Full-Text service implementation for the instance of SQL Server.
Öffentliche EigenschaftHadrManagerStatusGets the status of the Hadr manager.
Öffentliche EigenschaftInformationGets information about the instance of SQL Server.
Öffentliche EigenschaftInstallDataDirectoryGets the local Windows directory where the installation data is stored for the instance of SQL Server.
Öffentliche EigenschaftInstallSharedDirectoryGets the remote shared directory where the installation data is stored for the instance of SQL Server.
Öffentliche EigenschaftInstanceNameGets the instance name of the instance of SQL Server.
Öffentliche EigenschaftIsCaseSensitiveGets the value that indicates whether the case is sensitive.
Öffentliche EigenschaftIsClusteredGets the IsClustered property value.
Öffentliche EigenschaftIsFullTextInstalledGets the Boolean value that specifies whether Full-Text service is installed on the instance of SQL Server.
Öffentliche EigenschaftIsHadrEnabledGets a value that indicates whether the Hadr is enabled.
Öffentliche EigenschaftIsSingleUserGets the property value whether the user is single.
Öffentliche EigenschaftJobServerGets the SQL Server Agent associated with the instance of SQL Server.
Öffentliche EigenschaftLanguageGets the language of the server.
Öffentliche EigenschaftLanguagesRepresents a collection of Language objects. Each Language object represents an languages supported by the instance of SQL Server.
Öffentliche EigenschaftLinkedServersRepresents a collection of LinkedServer objects. Each LinkedServer object represents a linked server registered on the instance of SQL Server.
Öffentliche EigenschaftLoginModeGets or sets the ServerLoginMode property value.
Öffentliche EigenschaftLoginsRepresents a collection of Login objects. Each Login object represents a login defined on the instance of SQL Server.
Öffentliche EigenschaftMailGets the Microsoft SQL Mail service associated with the instance of SQL Server.
Öffentliche EigenschaftMailProfileGets or sets the mail profile of the server.
Öffentliche EigenschaftMasterDBLogPathGet the MasterDBLogPath property value.
Öffentliche EigenschaftMasterDBPathGets the MasterDBPath property value.
Öffentliche EigenschaftMaxPrecisionGets the MaxPrecision property value.
Öffentliche EigenschaftNameGets the name of the server, which is the physical machine name.
Öffentliche EigenschaftNamedPipesEnabledGets the Boolean value that specifies whether Named Pipes provider is enabled for client-server connectivity on the instance of SQL Server.
Öffentliche EigenschaftNetNameGets the NetName property value.
Öffentliche EigenschaftNumberOfLogFilesGets or sets the NumberOfLogFiles property value.
Öffentliche EigenschaftOleDbProviderSettingsGets the DbProviderSettings property value.
Öffentliche EigenschaftOSVersionGets the OSVersion property value.
Öffentliche EigenschaftPerfMonModeGets or sets the PerfMonMode property value.
Öffentliche EigenschaftPhysicalMemoryGets the physical memory used by the server.
Öffentliche EigenschaftPhysicalMemoryUsageInKBGets an Int64 value that specifies the amount of memory in use by the instance of the Database Engine, in kilobytes.
Öffentliche EigenschaftPlatformGets the server platform.
Öffentliche EigenschaftProcessorsGets the Processors property value.
Öffentliche EigenschaftProcessorUsageGets an Int32 value that specifies the processor time used by the instance of the Database Engine.
Öffentliche EigenschaftProductGets the product of the server.
Öffentliche EigenschaftProductLevelGets the ProductLevel property value.
Öffentliche EigenschaftPropertiesGets a collection of Property objects that represent the object properties. (Geerbt von SqlSmoObject.)
Öffentliche EigenschaftProxyAccountGets the proxy account associated with the instance of SQL Server.
Öffentliche EigenschaftResourceGovernorGets the resource governor of the server.
Öffentliche EigenschaftResourceLastUpdateDateTimeGets the last time the resource was last updated.
Öffentliche EigenschaftResourceVersionGets the ResourceVersion property.
Öffentliche EigenschaftResourceVersionStringGets the ResouceVersionString property value.
Öffentliche EigenschaftRolesRepresents a collection of ServerRole objects. Each ServerRole object represents a role defined on the instance of SQL Server.
Öffentliche EigenschaftRootDirectoryGets the RootDirectory property value.
Öffentliche EigenschaftServerAuditSpecificationsRepresents a collection of ServerAuditSpecification objects. Each ServerAuditSpecification object represents a specific audit specification defined on the instance of SQL Server.
Öffentliche EigenschaftServerTypeGets the server type for the instance of SQL Server.
Öffentliche EigenschaftServiceAccountGets the service account under which the instance of SQL Server is running.
Öffentliche EigenschaftServiceInstanceIdGets the ID value that uniquely identifies the service instance for this instance of SQL Server.
Öffentliche EigenschaftServiceMasterKeyGets the service master key associated with the instance of SQL Server.
Öffentliche EigenschaftServiceNameGets the service name for the server.
Öffentliche EigenschaftServiceStartModeGets the start mode for the SQL Server service.
Öffentliche EigenschaftSettingsGets modifiable settings for the instance of SQL Server.
Öffentliche EigenschaftSqlCharSetGets the value that identifies the character set used by the server.
Öffentliche EigenschaftSqlCharSetNameGets the name of the character set used by the server.
Öffentliche EigenschaftSqlDomainGroupGets the domain group for the instance of SQL Server.
Öffentliche EigenschaftSqlSortOrderGets the SQL sort order from the collation.
Öffentliche EigenschaftSqlSortOrderNameGets the name of the sort order used by the server.
Öffentliche EigenschaftStateGets the state of the referenced object. (Geerbt von SmoObjectBase.)
Öffentliche EigenschaftStatusGets the current status of the Server.
Öffentliche EigenschaftSystemDataTypesRepresents a collection of SystemDataType objects. Each SystemDataType object represents a system data type defined on the instance of SQL Server.
Öffentliche EigenschaftSystemMessagesRepresents a collection of SystemMessage objects. Each SystemMessage object represents a system message defined on the instance of SQL Server.
Öffentliche EigenschaftTapeLoadWaitTimeGets or sets the TapeLoadWaitTime property value.
Öffentliche EigenschaftTcpEnabledGets the Boolean value that determines whether TCP/IP protocol is enabled on this instance of SQL Server.
Öffentliche EigenschaftTriggersRepresents 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.
Öffentliche EigenschaftUrnGets the Uniform Resource Name (URN) address value that uniquely identifies the object. (Geerbt von SqlSmoObject.)
Öffentliche EigenschaftUserDataGets or sets user-defined data associated with the referenced object. (Geerbt von SmoObjectBase.)
Öffentliche EigenschaftUserDefinedMessagesRepresents a collection of UserDefinedMessage objects. Each UserDefinedMessage object represents a user-defined message defined on the instance of SQL Server.
Öffentliche EigenschaftUserOptionsGets the user options for the current connection to the instance of SQL Server.
Öffentliche EigenschaftVersionGets the Version property value.
Öffentliche EigenschaftVersionMajorGets the major version of the server.
Öffentliche EigenschaftVersionMinorGets the VersionMinor property value.
Öffentliche EigenschaftVersionStringGets the version string of the server.
Zum Anfang
  NameBeschreibung
Öffentliche MethodeAlter()Updates any Server object property changes on the instance of SQL Server. 
Öffentliche MethodeAlter(Boolean)Updates any Server object property changes on the instance of SQL Server with the option to override value checking.
Öffentliche MethodeAttachDatabase(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. 
Öffentliche MethodeAttachDatabase(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. 
Öffentliche MethodeAttachDatabase(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. 
Öffentliche MethodeAttachDatabase(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. 
Öffentliche MethodeCompareUrnCompares two URNS.
Öffentliche MethodeDeleteBackupHistory(DateTime)Deletes the backup history for this instance of SQL Server up until the specified date and time.
Öffentliche MethodeDeleteBackupHistory(Int32)Deletes the backup history for the specified media set.
Öffentliche MethodeDeleteBackupHistory(String)Deletes the backup history for the specified database.
Öffentliche MethodeDeny(ServerPermissionSet, String)Denies the specified set of permissions for the specified grantee on the instance of SQL Server.
Öffentliche MethodeDeny(ServerPermissionSet, String[])Denies the specified set of permissions for the specified grantees on the instance of SQL Server.
Öffentliche MethodeDeny(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.
Öffentliche MethodeDeny(ServerPermissionSet, 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.
Öffentliche MethodeDetachDatabase(String, Boolean)Detaches the specified database from the instance of SQL Server with the option to update statistics before the database is detached.
Öffentliche MethodeDetachDatabase(String, Boolean, Boolean)Detaches the specified database from the instance of SQL Server with the option to update statistics before the database is detached.
Öffentliche MethodeDetachedDatabaseInfoReturns information about a detached database file.
Öffentliche MethodeDiscoverDiscovers a list of type Object. (Geerbt von SqlSmoObject.)
Öffentliche MethodeEnumActiveCurrentSessionTraceFlagsGets active session flags as a DataTable.
Öffentliche MethodeEnumActiveGlobalTraceFlagsGets a DataTable that contains active global trace flags.
Öffentliche MethodeEnumAvailableMedia()Enumerates a list of media that is visible to the instance of SQL Server on the local area network.
Öffentliche MethodeEnumAvailableMedia(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.
Öffentliche MethodeEnumClusterMembersStateEnumerates the current state of the Windows cluster members of which the instance is part of.
Öffentliche MethodeEnumClusterSubnetsEnumerates a list of cluster subnets.
Öffentliche MethodeEnumCollationsEnumerates a list of collations supported by the instance of SQL Server.
Öffentliche MethodeEnumDatabaseMirrorWitnessRoles()Enumerates a list of database mirror witness roles.
Öffentliche MethodeEnumDatabaseMirrorWitnessRoles(String)Enumerates a list of mirror witness roles for the specified database.
Öffentliche MethodeEnumDetachedDatabaseFilesEnumerates a list of detached database files.
Öffentliche MethodeEnumDetachedLogFilesEnumerates a list of detached log files.
Öffentliche MethodeEnumDirectoriesEnumerates a list of directories relative to the specified path.
Öffentliche MethodeEnumErrorLogsEnumerates a list of SQL Server error log files.
Öffentliche MethodeEnumLocks()Enumerates a list of current locks held on the instance of SQL Server.
Öffentliche MethodeEnumLocks(Int32)Enumerates a list of current locks held by the specified process on the instance of SQL Server.
Öffentliche MethodeEnumMembersEnumerates a list of members of server roles and database roles on the instance of SQL Server.
Öffentliche MethodeEnumObjectPermissions()Enumerates a list of object permissions for the instance of SQL Server.
Öffentliche MethodeEnumObjectPermissions(String)Enumerates a list of object permissions for a specified grantee on the application instance of SQL Server.
Öffentliche MethodeEnumObjectPermissions(ObjectPermissionSet)Enumerates a list of object permissions for a specified permission on the instance of SQL Server.
Öffentliche MethodeEnumObjectPermissions(String, ObjectPermissionSet)Enumerates a list of object permissions for a specified grantee and a specified permission on the instance of SQL Server.
Öffentliche MethodeEnumPerformanceCounters()Enumerates a list of performance counters that are supported by the instance of SQL Server.
Öffentliche MethodeEnumPerformanceCounters(String)Enumerates a list of performance counters that are supported by the instance of SQL Server for a specified object.
Öffentliche MethodeEnumPerformanceCounters(String, String)Enumerates a list of performance counters that are supported by the instance of SQL Server for a specified object and specified counter.
Öffentliche MethodeEnumPerformanceCounters(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.
Öffentliche MethodeEnumProcesses()Enumerates a list of processes running on the instance of SQL Server.
Öffentliche MethodeEnumProcesses(Boolean)Enumerates a list of processes running on the instance of SQL Server with the option to exclude system processes.
Öffentliche MethodeEnumProcesses(Int32)Enumerates a list of information about the specified process.
Öffentliche MethodeEnumProcesses(String)Enumerates a list of processes running on the instance of SQL Server that are associated with the specified login.
Öffentliche MethodeEnumServerAttributesEnumerates a list of server attributes for the instance of SQL Server.
Öffentliche MethodeEnumServerPermissions()Enumerates a list of server permissions for the instance of SQL Server.
Öffentliche MethodeEnumServerPermissions(String)Enumerates a list of server permissions for a specified grantee on the instance of SQL Server.
Öffentliche MethodeEnumServerPermissions(ServerPermissionSet)Enumerates a list of server permissions for a specified permission on the instance of SQL Server.
Öffentliche MethodeEnumServerPermissions(String, ServerPermissionSet)Enumerates a list of server permissions for a specified grantee and a specified permission on the instance of SQL Server.
Öffentliche MethodeEnumStartupProceduresEnumerates a list of startup procedures.
Öffentliche MethodeEnumWindowsDomainGroups()Enumerates a list of Microsoft Windows group accounts defined on a domain.
Öffentliche MethodeEnumWindowsDomainGroups(String)Enumerates a list of Microsoft Windows group accounts defined for the specified domain.
Öffentliche MethodeEnumWindowsGroupInfo()Enumerates a list of information about all Microsoft Windows groups that have explicitly granted access to the instance of SQL Server.
Öffentliche MethodeEnumWindowsGroupInfo(String)Enumerates a list of information about all Microsoft Windows groups that have explicitly granted access to the instance of SQL Server.
Öffentliche MethodeEnumWindowsGroupInfo(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.
Öffentliche MethodeEnumWindowsUserInfo()Enumerates a list of information about all Microsoft Windows users that have explicitly granted access to SQL Server.
Öffentliche MethodeEnumWindowsUserInfo(String)Enumerates a list of information about all Microsoft Windows users that have explicitly granted access to the instance of SQL Server.
Öffentliche MethodeEnumWindowsUserInfo(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.
Öffentliche MethodeEquals (Geerbt von Object.)
Geschützte MethodeFormatSqlVariantFormats an object as SqlVariant type. (Geerbt von SqlSmoObject.)
Öffentliche MethodeGetActiveDBConnectionCountReturns the number of active connections for the specified database.
Geschützte MethodeGetContextDBGets the context database that is associated with this object. (Geerbt von SqlSmoObject.)
Geschützte MethodeGetDBNameGets the database name that is associated with the object. (Geerbt von SqlSmoObject.)
Öffentliche MethodeGetDefaultInitFieldsReturns the property types that are initialized by default when the specified object is initialized.
Öffentliche MethodeGetHashCode (Geerbt von Object.)
Öffentliche MethodeGetPropertyNamesReturns the names of the initialized properties for the specified object type
Geschützte MethodeGetPropValueGets a property value of the SqlSmoObject object. (Geerbt von SqlSmoObject.)
Geschützte MethodeGetPropValueOptionalGets a property value of the SqlSmoObject object. (Geerbt von SqlSmoObject.)
Geschützte MethodeGetPropValueOptionalAllowNullGets a property value of the SqlSmoObject object. (Geerbt von SqlSmoObject.)
Geschützte MethodeGetServerObjectGets the server of the SqlSmoObject object. (Geerbt von SqlSmoObject.)
Öffentliche MethodeGetSmoObjectGets a SqlSmoObject that is specified by a URN.
Öffentliche MethodeGetStringComparerReturns the comparer object corresponding to the collation string passed.
Öffentliche MethodeGetType (Geerbt von Object.)
Öffentliche MethodeGrant(ServerPermissionSet, String)Grants the specified set of permissions to the specified grantee on the instance of SQL Server.
Öffentliche MethodeGrant(ServerPermissionSet, String[])Grants the specified set of permissions to the specified grantees on the instance of SQL Server.
Öffentliche MethodeGrant(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.
Öffentliche MethodeGrant(ServerPermissionSet, 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.
Öffentliche MethodeGrant(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.
Öffentliche MethodeGrant(ServerPermissionSet, 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.
Öffentliche MethodeInitialize()Initializes the object and forces the properties be loaded. (Geerbt von SqlSmoObject.)
Öffentliche MethodeInitialize(Boolean)Initializes the object and forces the properties be loaded. (Geerbt von SqlSmoObject.)
Öffentliche MethodeIsDetachedPrimaryFileVerifies whether the specified file is a primary (.mdf) database file.
Geschützte MethodeIsObjectInitializedVerifies whether the object has been initialized. (Geerbt von SqlSmoObject.)
Geschützte MethodeIsObjectInSpaceVerifies whether the object is isolated or connected to the instance of SQL Server. (Geerbt von SqlSmoObject.)
Öffentliche MethodeIsWindowsGroupMemberVerifies whether the specified Microsoft Windows user account is a member of the specified Windows group.
Öffentliche MethodeJoinAvailabilityGroupIndicates a specified object to join the availability group.
Öffentliche MethodeKillAllProcessesStops the all processes on the specified database.
Öffentliche MethodeKillDatabaseDeletes the specified database and drops any active connection.
Öffentliche MethodeKillProcessStops the specified process.
Öffentliche MethodePingSqlServerVersion(String)Gets the version number of the instance of SQL Server.
Öffentliche MethodePingSqlServerVersion(String, String, String)Get the version number of the specified instance of SQL Server using the specified login and password to gain access.
Öffentliche MethodeReadErrorLog()Enumerates the SQL Server error log.
Öffentliche MethodeReadErrorLog(Int32)Enumerates the specified SQL Server error log.
Öffentliche MethodeRefreshRefreshes the objects and properties on the Server object. (Überschreibt SqlSmoObject.Refresh().)
Öffentliche MethodeRevoke(ServerPermissionSet, String)Revokes a previously granted set of permissions from a list of grantees on the instance of SQL Server.
Öffentliche MethodeRevoke(ServerPermissionSet, String[])Revokes a previously granted set of permissions from a list of grantees on the instance of SQL Server.
Öffentliche MethodeRevoke(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.
Öffentliche MethodeRevoke(ServerPermissionSet, 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.
Öffentliche MethodeRevoke(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.
Öffentliche MethodeRevoke(ServerPermissionSet, 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.
Öffentliche MethodeScript()Generates a Transact-SQL script that can be used to re-create the server.
Öffentliche MethodeScript(ScriptingOptions)Generates a Transact-SQL script that can be used to re-create the server by using the specified scripting options.
Öffentliche MethodeSetDefaultInitFields(Boolean)Specifies that all properties are fetched when objects are instantiated.
Öffentliche MethodeSetDefaultInitFields(Type, Boolean)Specifies all the properties are fetched when objects of the specified type are instantiated.
Öffentliche MethodeSetDefaultInitFields(Type, StringCollection)Specifies the properties that are fetched when objects of the specified type are instantiated.
Öffentliche MethodeSetDefaultInitFields(Type, String[])Specifies the properties that are fetched when objects of the specified type are instantiated.
Geschützte MethodeSetParentImplSets the parent of the SqlSmoObject to the newParent parameter. (Geerbt von SqlSmoObject.)
Öffentliche MethodeSetTraceFlagSets a trace flag.
Öffentliche MethodeToStringReturns a String that represents the referenced object. (Geerbt von SqlSmoObject.)
Öffentliche MethodeValidateValidates the state of an object. (Geerbt von SmoObjectBase.)
Zum Anfang
  NameBeschreibung
Öffentliches EreignisPropertyChangedRepresents the event that occurs when a property is changed. (Geerbt von SqlSmoObject.)
Öffentliches EreignisPropertyMetadataChangedRepresents the event that occurs when property metadata changes. (Geerbt von SqlSmoObject.)
Zum Anfang
  NameBeschreibung
Explizite SchnittstellenimplementierungPrivate MethodeIAlienObject.DiscoverDiscovers any dependencies. Verweisen Sie nicht direkt im Code auf dieses Element. Unterstützt die SQL Server-Infrastruktur. (Geerbt von SqlSmoObject.)
Explizite SchnittstellenimplementierungPrivate MethodeIAlienObject.GetDomainRootReturns the root of the domain. (Geerbt von SqlSmoObject.)
Explizite SchnittstellenimplementierungPrivate MethodeIAlienObject.GetParentGets the parent of this object. Verweisen Sie nicht direkt im Code auf dieses Element. Unterstützt die SQL Server-Infrastruktur. (Geerbt von SqlSmoObject.)
Explizite SchnittstellenimplementierungPrivate MethodeIAlienObject.GetPropertyTypeGets the type of the specified property. (Geerbt von SqlSmoObject.)
Explizite SchnittstellenimplementierungPrivate MethodeIAlienObject.GetPropertyValueGets the value of the specified property. (Geerbt von SqlSmoObject.)
Explizite SchnittstellenimplementierungPrivate MethodeIAlienObject.GetUrnGets the Unified Resource Name (URN) of the object. Verweisen Sie nicht direkt im Code auf dieses Element. Unterstützt die SQL Server-Infrastruktur. (Geerbt von SqlSmoObject.)
Explizite SchnittstellenimplementierungPrivate MethodeIAlienObject.ResolveGets the instance that contains the information about the object from the Unified Resource Name (URN) of the object. (Geerbt von SqlSmoObject.)
Explizite SchnittstellenimplementierungPrivate MethodeIAlienObject.SetObjectStateSets the object state to the specified SfcObjectState value. (Geerbt von SqlSmoObject.)
Explizite SchnittstellenimplementierungPrivate MethodeIAlienObject.SetPropertyValueSets the property value. (Geerbt von SqlSmoObject.)
Explizite SchnittstellenimplementierungPrivate MethodeIAlienRoot.DesignModeInitializeNur für Informationszwecke identifiziert. Nicht unterstützt. Zukünftige Kompatibilität wird nicht sichergestellt. Ensures that the Server object is in design mode, that it is disconnected from the instance of the Database Engine it represents.
Explizite SchnittstellenimplementierungPrivate MethodeIAlienRoot.SfcHelper_GetDataTableNur für Informationszwecke identifiziert. Nicht unterstützt. Zukünftige Kompatibilität wird nicht sichergestellt. Gets a DataTable object containing the results from a URN.
Explizite SchnittstellenimplementierungPrivate MethodeIAlienRoot.SfcHelper_GetSmoObjectNur für Informationszwecke identifiziert. Nicht unterstützt. Zukünftige Kompatibilität wird nicht sichergestellt. Gets the Object that represents the object identified by a specified URN.
Explizite SchnittstellenimplementierungPrivate MethodeIAlienRoot.SfcHelper_GetSmoObjectQueryNur für Informationszwecke identifiziert. Nicht unterstützt. Zukünftige Kompatibilität wird nicht sichergestellt. Gets a List of String values.
Explizite SchnittstellenimplementierungPrivate EigenschaftISfcDomainLite.DomainInstanceNameGets the instance name of the domain.
Explizite SchnittstellenimplementierungPrivate EigenschaftISfcDomainLite.DomainNameGets the domain name.
Explizite SchnittstellenimplementierungPrivate MethodeISfcDomainLite.GetLogicalVersionNur für Informationszwecke identifiziert. Nicht unterstützt. Zukünftige Kompatibilität wird nicht sichergestellt. Gets an Int32 value that indicates whether changes have been made to the Server object.
Explizite SchnittstellenimplementierungPrivate EigenschaftISfcHasConnection.ConnectionContextGets the context for the connection represented by the current Server object.
Explizite SchnittstellenimplementierungPrivate MethodeISfcHasConnection.GetConnection()Nur für Informationszwecke identifiziert. Nicht unterstützt. Zukünftige Kompatibilität wird nicht sichergestellt. Gets a connection to an Sfc backing store.
Explizite SchnittstellenimplementierungPrivate MethodeISfcHasConnection.GetConnection(SfcObjectQueryMode)Nur für Informationszwecke identifiziert. Nicht unterstützt. Zukünftige Kompatibilität wird nicht sichergestellt. Gets a connection to an Sfc backing store that supports the requested query mode.
Explizite SchnittstellenimplementierungPrivate MethodeISfcHasConnection.SetConnectionNur für Informationszwecke identifiziert. Nicht unterstützt. Zukünftige Kompatibilität wird nicht sichergestellt. Sets a connection to an Sfc backing store.
Explizite SchnittstellenimplementierungPrivate MethodeISfcPropertyProvider.GetPropertySetGets the interface reference to the set of properties of this object. (Geerbt von SqlSmoObject.)
Explizite SchnittstellenimplementierungPrivate EigenschaftISfcSupportsDesignMode.IsDesignModeGets a Boolean value that specifies whether the Server supports design mode.
Zum Anfang

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.

Thread Safety

Alle öffentlichen, statischen Elemente dieses Typs (Shared in Microsoft Visual Basic) sind für Vorgänge mit mehreren Threads sicher. Bei Instanzmembern ist die Threadsicherheit nicht gewährleistet.

Alle öffentlichen static (Shared in Visual Basic)-Elemente dieses Typs sind Threadsicher. Für Instanzelemente wird die Threadsicherheit nicht gewährleistet.
Fanden Sie dies hilfreich?
(1500 verbleibende Zeichen)

Community-Beiträge

HINZUFÜGEN
© 2013 Microsoft. Alle Rechte vorbehalten.