Server-Klasse

The Server object represents an instance of SQL Server.

Vererbungshierarchie

System.Object
  Microsoft.SqlServer.Management.Smo.SmoObjectBase
    Microsoft.SqlServer.Management.Smo.SqlSmoObject
      Microsoft.SqlServer.Management.Smo.Server

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

Syntax

'Declaration
<PhysicalFacetAttribute> _
<EvaluationModeAttribute(AutomatedPolicyEvaluationMode.CheckOnSchedule)> _
<RootFacetAttribute(GetType(Server))> _
Public NotInheritable Class Server _
    Inherits SqlSmoObject _
    Implements ISfcSupportsDesignMode, IAlterable, IScriptable, IServerSettings,  _
    IServerInformation, IDmfFacet, IAlienRoot, ISfcDomainLite, ISfcHasConnection
'Usage
Dim instance As Server
[PhysicalFacetAttribute]
[EvaluationModeAttribute(AutomatedPolicyEvaluationMode.CheckOnSchedule)]
[RootFacetAttribute(typeof(Server))]
public sealed class Server : SqlSmoObject, 
    ISfcSupportsDesignMode, IAlterable, IScriptable, IServerSettings, IServerInformation, 
    IDmfFacet, IAlienRoot, ISfcDomainLite, ISfcHasConnection
[PhysicalFacetAttribute]
[EvaluationModeAttribute(AutomatedPolicyEvaluationMode::CheckOnSchedule)]
[RootFacetAttribute(typeof(Server))]
public ref class Server sealed : public SqlSmoObject, 
    ISfcSupportsDesignMode, IAlterable, IScriptable, IServerSettings, IServerInformation, 
    IDmfFacet, IAlienRoot, ISfcDomainLite, ISfcHasConnection
[<SealedAttribute>]
[<PhysicalFacetAttribute>]
[<EvaluationModeAttribute(AutomatedPolicyEvaluationMode.CheckOnSchedule)>]
[<RootFacetAttribute(typeof(Server))>]
type Server =  
    class 
        inherit SqlSmoObject 
        interface ISfcSupportsDesignMode 
        interface IAlterable 
        interface IScriptable 
        interface IServerSettings 
        interface IServerInformation 
        interface IDmfFacet 
        interface IAlienRoot 
        interface ISfcDomainLite 
        interface ISfcHasConnection 
    end
public final class Server extends SqlSmoObject implements ISfcSupportsDesignMode, IAlterable, IScriptable, IServerSettings, IServerInformation, IDmfFacet, IAlienRoot, ISfcDomainLite, ISfcHasConnection

Der Server-Typ macht folgende Elemente verfügbar.

Konstruktoren

  Name Beschreibung
Öffentliche Methode Server() Initializes a new instance of the Server class.
Öffentliche Methode Server(String) Initializes a new instance of the Server class with the specified name.
Öffentliche Methode Server(ServerConnection) Initializes a new instance of the Server class based on the specified connection.

Zum Anfang

Eigenschaften

  Name Beschreibung
Öffentliche Eigenschaft ActiveDirectory Veraltet Gets information about the Active Directory settings for the instance of SQL Server.
Öffentliche Eigenschaft AffinityInfo Gets the AffinityInfo object that is associated with an instance of SQL Server.
Öffentliche Eigenschaft AuditLevel Gets or sets the AuditLevel property value.
Öffentliche Eigenschaft Audits Represents a collection of Audit objects. Each Audit object represents an audit log defined on the instance of SQL Server.
Öffentliche Eigenschaft AvailabilityGroups Gets the available groups in the server.
Öffentliche Eigenschaft BackupDevices Represents a collection of BackupDevice objects. Each BackupDevice object represents a backup device defined on the instance of SQL Server.
Öffentliche Eigenschaft BackupDirectory Gets or sets the BackupDirectory property value.
Öffentliche Eigenschaft BrowserServiceAccount Gets the service account that the Browser service runs under on the instance of SQL Server.
Öffentliche Eigenschaft BrowserStartMode Gets the start mode for the SQL Server Browser Service running on the instance of SQL Server.
Öffentliche Eigenschaft BuildClrVersion Gets the BuildClrVersion property value.
Öffentliche Eigenschaft BuildClrVersionString Gets the version string of the CLR that was used while building the instance.
Öffentliche Eigenschaft BuildNumber Gets the BuildNumber property value.
Öffentliche Eigenschaft ClusterName Gets the name of the cluster.
Öffentliche Eigenschaft ClusterQuorumState Gets the state of the cluster quorum.
Öffentliche Eigenschaft ClusterQuorumType Gets the type of the cluster quorum.
Öffentliche Eigenschaft Collation Gets the Collation property value.
Öffentliche Eigenschaft CollationID Gets the CollationID property value.
Öffentliche Eigenschaft ComparisonStyle Gets the Windows comparison style of the collation.
Öffentliche Eigenschaft ComputerNamePhysicalNetBIOS Gets the NetBIOS name of the local computer on which the instance of SQL Server is currently running.
Öffentliche Eigenschaft Configuration Gets the configuration options for the instance of SQL Server.
Öffentliche Eigenschaft ConnectionContext Gets the current server connection details for the instance of SQL Server.
Öffentliche Eigenschaft Credentials Represents a collection of Credential objects. Each Credential object represents a credential defined on the instance of SQL Server.
Öffentliche Eigenschaft CryptographicProviders Gets the list of server cryptographic providers.
Öffentliche Eigenschaft Databases Represents a collection of Database objects. Each Database object represents a database defined on the instance of SQL Server.
Öffentliche Eigenschaft DefaultFile Gets or sets the DefaultFile property value.
Öffentliche Eigenschaft DefaultLog Gets or sets the default log of the server.
Öffentliche Eigenschaft DefaultTextMode Gets or sets the Boolean property value that specifies whether the default text mode is set for the instance of SQL Server.
Öffentliche Eigenschaft Edition Gets the Edition property value.
Öffentliche Eigenschaft Endpoints Represents a collection of Endpoint objects. Each Endpoint object represents an endpoint defined on the instance of SQL Server.
Öffentliche Eigenschaft EngineEdition Gets the edition of the engine.
Öffentliche Eigenschaft ErrorLogPath Gets the ErrorLogPath property value.
Öffentliche Eigenschaft Events Gets the server events that are associated with the instance of SQL Server.
Öffentliche Eigenschaft FilestreamLevel Gets the level of FILESTREAM access specified on the instance of SQL Server.
Öffentliche Eigenschaft FilestreamShareName Gets the Windows share name where FILESTREAM data is stored on the instance of SQL Server.
Öffentliche Eigenschaft FullTextService Gets the Microsoft Search Full-Text service implementation for the instance of SQL Server.
Öffentliche Eigenschaft HadrManagerStatus Gets the status of the Hadr manager.
Öffentliche Eigenschaft Information Gets information about the instance of SQL Server.
Öffentliche Eigenschaft InstallDataDirectory Gets the local Windows directory where the installation data is stored for the instance of SQL Server.
Öffentliche Eigenschaft InstallSharedDirectory Gets the remote shared directory where the installation data is stored for the instance of SQL Server.
Öffentliche Eigenschaft InstanceName Gets the instance name of the instance of SQL Server.
Öffentliche Eigenschaft IsCaseSensitive Gets the value that indicates whether the case is sensitive.
Öffentliche Eigenschaft IsClustered Gets the IsClustered property value.
Öffentliche Eigenschaft IsFullTextInstalled Gets the Boolean value that specifies whether Full-Text service is installed on the instance of SQL Server.
Öffentliche Eigenschaft IsHadrEnabled Gets a value that indicates whether the Hadr is enabled.
Öffentliche Eigenschaft IsSingleUser Gets the property value whether the user is single.
Öffentliche Eigenschaft JobServer Gets the SQL Server Agent associated with the instance of SQL Server.
Öffentliche Eigenschaft Language Gets the language of the server.
Öffentliche Eigenschaft Languages Represents a collection of Language objects. Each Language object represents an languages supported by the instance of SQL Server.
Öffentliche Eigenschaft LinkedServers Represents a collection of LinkedServer objects. Each LinkedServer object represents a linked server registered on the instance of SQL Server.
Öffentliche Eigenschaft LoginMode Gets or sets the ServerLoginMode property value.
Öffentliche Eigenschaft Logins Represents a collection of Login objects. Each Login object represents a login defined on the instance of SQL Server.
Öffentliche Eigenschaft Mail Gets the Microsoft SQL Mail service associated with the instance of SQL Server.
Öffentliche Eigenschaft MailProfile Gets or sets the mail profile of the server.
Öffentliche Eigenschaft MasterDBLogPath Get the MasterDBLogPath property value.
Öffentliche Eigenschaft MasterDBPath Gets the MasterDBPath property value.
Öffentliche Eigenschaft MaxPrecision Gets the MaxPrecision property value.
Öffentliche Eigenschaft Name Gets the name of the server, which is the physical machine name.
Öffentliche Eigenschaft NamedPipesEnabled Gets the Boolean value that specifies whether Named Pipes provider is enabled for client-server connectivity on the instance of SQL Server.
Öffentliche Eigenschaft NetName Gets the NetName property value.
Öffentliche Eigenschaft NumberOfLogFiles Gets or sets the NumberOfLogFiles property value.
Öffentliche Eigenschaft OleDbProviderSettings Gets the DbProviderSettings property value.
Öffentliche Eigenschaft OSVersion Gets the OSVersion property value.
Öffentliche Eigenschaft PerfMonMode Gets or sets the PerfMonMode property value.
Öffentliche Eigenschaft PhysicalMemory Gets the physical memory used by the server.
Öffentliche Eigenschaft PhysicalMemoryUsageInKB Gets an Int64 value that specifies the amount of memory in use by the instance of the Database Engine, in kilobytes.
Öffentliche Eigenschaft Platform Gets the server platform.
Öffentliche Eigenschaft Processors Gets the Processors property value.
Öffentliche Eigenschaft ProcessorUsage Gets an Int32 value that specifies the processor time used by the instance of the Database Engine.
Öffentliche Eigenschaft Product Gets the product of the server.
Öffentliche Eigenschaft ProductLevel Gets the ProductLevel property value.
Öffentliche Eigenschaft Properties Gets a collection of Property objects that represent the object properties. (Geerbt von SqlSmoObject.)
Öffentliche Eigenschaft ProxyAccount Gets the proxy account associated with the instance of SQL Server.
Öffentliche Eigenschaft ResourceGovernor Gets the resource governor of the server.
Öffentliche Eigenschaft ResourceLastUpdateDateTime Gets the last time the resource was last updated.
Öffentliche Eigenschaft ResourceVersion Gets the ResourceVersion property.
Öffentliche Eigenschaft ResourceVersionString Gets the ResouceVersionString property value.
Öffentliche Eigenschaft Roles Represents a collection of ServerRole objects. Each ServerRole object represents a role defined on the instance of SQL Server.
Öffentliche Eigenschaft RootDirectory Gets the RootDirectory property value.
Öffentliche Eigenschaft ServerAuditSpecifications Represents a collection of ServerAuditSpecification objects. Each ServerAuditSpecification object represents a specific audit specification defined on the instance of SQL Server.
Öffentliche Eigenschaft ServerType Gets the server type for the instance of SQL Server.
Öffentliche Eigenschaft ServiceAccount Gets the service account under which the instance of SQL Server is running.
Öffentliche Eigenschaft ServiceInstanceId Gets the ID value that uniquely identifies the service instance for this instance of SQL Server.
Öffentliche Eigenschaft ServiceMasterKey Gets the service master key associated with the instance of SQL Server.
Öffentliche Eigenschaft ServiceName Gets the service name for the server.
Öffentliche Eigenschaft ServiceStartMode Gets the start mode for the SQL Server service.
Öffentliche Eigenschaft Settings Gets modifiable settings for the instance of SQL Server.
Öffentliche Eigenschaft SqlCharSet Gets the value that identifies the character set used by the server.
Öffentliche Eigenschaft SqlCharSetName Gets the name of the character set used by the server.
Öffentliche Eigenschaft SqlDomainGroup Gets the domain group for the instance of SQL Server.
Öffentliche Eigenschaft SqlSortOrder Gets the SQL sort order from the collation.
Öffentliche Eigenschaft SqlSortOrderName Gets the name of the sort order used by the server.
Öffentliche Eigenschaft State Gets the state of the referenced object. (Geerbt von SmoObjectBase.)
Öffentliche Eigenschaft Status Gets the current status of the Server.
Öffentliche Eigenschaft SystemDataTypes Represents a collection of SystemDataType objects. Each SystemDataType object represents a system data type defined on the instance of SQL Server.
Öffentliche Eigenschaft SystemMessages Represents a collection of SystemMessage objects. Each SystemMessage object represents a system message defined on the instance of SQL Server.
Öffentliche Eigenschaft TapeLoadWaitTime Gets or sets the TapeLoadWaitTime property value.
Öffentliche Eigenschaft TcpEnabled Gets the Boolean value that determines whether TCP/IP protocol is enabled on this instance of SQL Server.
Öffentliche Eigenschaft Triggers 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.
Öffentliche Eigenschaft Urn Gets the Uniform Resource Name (URN) address value that uniquely identifies the object. (Geerbt von SqlSmoObject.)
Öffentliche Eigenschaft UserData Gets or sets user-defined data associated with the referenced object. (Geerbt von SmoObjectBase.)
Öffentliche Eigenschaft UserDefinedMessages Represents a collection of UserDefinedMessage objects. Each UserDefinedMessage object represents a user-defined message defined on the instance of SQL Server.
Öffentliche Eigenschaft UserOptions Gets the user options for the current connection to the instance of SQL Server.
Öffentliche Eigenschaft Version Gets the Version property value.
Öffentliche Eigenschaft VersionMajor Gets the major version of the server.
Öffentliche Eigenschaft VersionMinor Gets the VersionMinor property value.
Öffentliche Eigenschaft VersionString Gets the version string of the server.

Zum Anfang

Methoden

  Name Beschreibung
Öffentliche Methode Alter() Updates any Server object property changes on the instance of SQL Server. 
Öffentliche Methode Alter(Boolean) Updates any Server object property changes on the instance of SQL Server with the option to override value checking.
Öffentliche Methode AttachDatabase(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 Methode AttachDatabase(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 Methode AttachDatabase(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 Methode AttachDatabase(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 Methode CompareUrn Compares two URNS.
Öffentliche Methode DeleteBackupHistory(DateTime) Deletes the backup history for this instance of SQL Server up until the specified date and time.
Öffentliche Methode DeleteBackupHistory(Int32) Deletes the backup history for the specified media set.
Öffentliche Methode DeleteBackupHistory(String) Deletes the backup history for the specified database.
Öffentliche Methode Deny(ServerPermissionSet, String) Denies the specified set of permissions for the specified grantee on the instance of SQL Server.
Öffentliche Methode Deny(ServerPermissionSet, array<String[]) Denies the specified set of permissions for the specified grantees on the instance of SQL Server.
Öffentliche Methode Deny(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 Methode Deny(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.
Öffentliche Methode DetachDatabase(String, Boolean) Detaches the specified database from the instance of SQL Server with the option to update statistics before the database is detached.
Öffentliche Methode DetachDatabase(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 Methode DetachedDatabaseInfo Returns information about a detached database file.
Öffentliche Methode Discover Discovers a list of type Object. (Geerbt von SqlSmoObject.)
Öffentliche Methode EnumActiveCurrentSessionTraceFlags Gets active session flags as a DataTable.
Öffentliche Methode EnumActiveGlobalTraceFlags Gets a DataTable that contains active global trace flags.
Öffentliche Methode EnumAvailableMedia() Enumerates a list of media that is visible to the instance of SQL Server on the local area network.
Öffentliche Methode EnumAvailableMedia(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 Methode EnumClusterMembersState Enumerates the current state of the Windows cluster members of which the instance is part of.
Öffentliche Methode EnumClusterSubnets Enumerates a list of cluster subnets.
Öffentliche Methode EnumCollations Enumerates a list of collations supported by the instance of SQL Server.
Öffentliche Methode EnumDatabaseMirrorWitnessRoles() Enumerates a list of database mirror witness roles.
Öffentliche Methode EnumDatabaseMirrorWitnessRoles(String) Enumerates a list of mirror witness roles for the specified database.
Öffentliche Methode EnumDetachedDatabaseFiles Enumerates a list of detached database files.
Öffentliche Methode EnumDetachedLogFiles Enumerates a list of detached log files.
Öffentliche Methode EnumDirectories Enumerates a list of directories relative to the specified path.
Öffentliche Methode EnumErrorLogs Enumerates a list of SQL Server error log files.
Öffentliche Methode EnumLocks() Enumerates a list of current locks held on the instance of SQL Server.
Öffentliche Methode EnumLocks(Int32) Enumerates a list of current locks held by the specified process on the instance of SQL Server.
Öffentliche Methode EnumMembers Enumerates a list of members of server roles and database roles on the instance of SQL Server.
Öffentliche Methode EnumObjectPermissions() Enumerates a list of object permissions for the instance of SQL Server.
Öffentliche Methode EnumObjectPermissions(String) Enumerates a list of object permissions for a specified grantee on the application instance of SQL Server.
Öffentliche Methode EnumObjectPermissions(ObjectPermissionSet) Enumerates a list of object permissions for a specified permission on the instance of SQL Server.
Öffentliche Methode EnumObjectPermissions(String, ObjectPermissionSet) Enumerates a list of object permissions for a specified grantee and a specified permission on the instance of SQL Server.
Öffentliche Methode EnumPerformanceCounters() Enumerates a list of performance counters that are supported by the instance of SQL Server.
Öffentliche Methode EnumPerformanceCounters(String) Enumerates a list of performance counters that are supported by the instance of SQL Server for a specified object.
Öffentliche Methode EnumPerformanceCounters(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 Methode EnumPerformanceCounters(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 Methode EnumProcesses() Enumerates a list of processes running on the instance of SQL Server.
Öffentliche Methode EnumProcesses(Boolean) Enumerates a list of processes running on the instance of SQL Server with the option to exclude system processes.
Öffentliche Methode EnumProcesses(Int32) Enumerates a list of information about the specified process.
Öffentliche Methode EnumProcesses(String) Enumerates a list of processes running on the instance of SQL Server that are associated with the specified login.
Öffentliche Methode EnumServerAttributes Enumerates a list of server attributes for the instance of SQL Server.
Öffentliche Methode EnumServerPermissions() Enumerates a list of server permissions for the instance of SQL Server.
Öffentliche Methode EnumServerPermissions(String) Enumerates a list of server permissions for a specified grantee on the instance of SQL Server.
Öffentliche Methode EnumServerPermissions(ServerPermissionSet) Enumerates a list of server permissions for a specified permission on the instance of SQL Server.
Öffentliche Methode EnumServerPermissions(String, ServerPermissionSet) Enumerates a list of server permissions for a specified grantee and a specified permission on the instance of SQL Server.
Öffentliche Methode EnumStartupProcedures Enumerates a list of startup procedures.
Öffentliche Methode EnumWindowsDomainGroups() Enumerates a list of Microsoft Windows group accounts defined on a domain.
Öffentliche Methode EnumWindowsDomainGroups(String) Enumerates a list of Microsoft Windows group accounts defined for the specified domain.
Öffentliche Methode EnumWindowsGroupInfo() Enumerates a list of information about all Microsoft Windows groups that have explicitly granted access to the instance of SQL Server.
Öffentliche Methode EnumWindowsGroupInfo(String) Enumerates a list of information about all Microsoft Windows groups that have explicitly granted access to the instance of SQL Server.
Öffentliche Methode EnumWindowsGroupInfo(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 Methode EnumWindowsUserInfo() Enumerates a list of information about all Microsoft Windows users that have explicitly granted access to SQL Server.
Öffentliche Methode EnumWindowsUserInfo(String) Enumerates a list of information about all Microsoft Windows users that have explicitly granted access to the instance of SQL Server.
Öffentliche Methode EnumWindowsUserInfo(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 Methode Equals (Geerbt von Object.)
Geschützte Methode FormatSqlVariant Formats an object as SqlVariant type. (Geerbt von SqlSmoObject.)
Öffentliche Methode GetActiveDBConnectionCount Returns the number of active connections for the specified database.
Geschützte Methode GetContextDB Gets the context database that is associated with this object. (Geerbt von SqlSmoObject.)
Geschützte Methode GetDBName Gets the database name that is associated with the object. (Geerbt von SqlSmoObject.)
Öffentliche Methode GetDefaultInitFields Returns the property types that are initialized by default when the specified object is initialized.
Öffentliche Methode GetHashCode (Geerbt von Object.)
Öffentliche Methode GetPropertyNames Returns the names of the initialized properties for the specified object type
Geschützte Methode GetPropValue Gets a property value of the SqlSmoObject object. (Geerbt von SqlSmoObject.)
Geschützte Methode GetPropValueOptional Gets a property value of the SqlSmoObject object. (Geerbt von SqlSmoObject.)
Geschützte Methode GetPropValueOptionalAllowNull Gets a property value of the SqlSmoObject object. (Geerbt von SqlSmoObject.)
Geschützte Methode GetServerObject Gets the server of the SqlSmoObject object. (Geerbt von SqlSmoObject.)
Öffentliche Methode GetSmoObject Gets a SqlSmoObject that is specified by a URN.
Öffentliche Methode GetStringComparer Returns the comparer object corresponding to the collation string passed.
Öffentliche Methode GetType (Geerbt von Object.)
Öffentliche Methode Grant(ServerPermissionSet, String) Grants the specified set of permissions to the specified grantee on the instance of SQL Server.
Öffentliche Methode Grant(ServerPermissionSet, array<String[]) Grants the specified set of permissions to the specified grantees on the instance of SQL Server.
Öffentliche Methode Grant(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 Methode Grant(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.
Öffentliche Methode Grant(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 Methode Grant(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.
Öffentliche Methode Initialize() Initializes the object and forces the properties be loaded. (Geerbt von SqlSmoObject.)
Öffentliche Methode Initialize(Boolean) Initializes the object and forces the properties be loaded. (Geerbt von SqlSmoObject.)
Öffentliche Methode IsDetachedPrimaryFile Verifies whether the specified file is a primary (.mdf) database file.
Geschützte Methode IsObjectInitialized Verifies whether the object has been initialized. (Geerbt von SqlSmoObject.)
Geschützte Methode IsObjectInSpace Verifies whether the object is isolated or connected to the instance of SQL Server. (Geerbt von SqlSmoObject.)
Öffentliche Methode IsWindowsGroupMember Verifies whether the specified Microsoft Windows user account is a member of the specified Windows group.
Öffentliche Methode JoinAvailabilityGroup Indicates a specified object to join the availability group.
Öffentliche Methode KillAllProcesses Stops the all processes on the specified database.
Öffentliche Methode KillDatabase Deletes the specified database and drops any active connection.
Öffentliche Methode KillProcess Stops the specified process.
Öffentliche Methode PingSqlServerVersion(String) Gets the version number of the instance of SQL Server.
Öffentliche Methode PingSqlServerVersion(String, String, String) Get the version number of the specified instance of SQL Server using the specified login and password to gain access.
Öffentliche Methode ReadErrorLog() Enumerates the SQL Server error log.
Öffentliche Methode ReadErrorLog(Int32) Enumerates the specified SQL Server error log.
Öffentliche Methode Refresh Refreshes the objects and properties on the Server object. (Überschreibt SqlSmoObject.Refresh().)
Öffentliche Methode Revoke(ServerPermissionSet, String) Revokes a previously granted set of permissions from a list of grantees on the instance of SQL Server.
Öffentliche Methode Revoke(ServerPermissionSet, array<String[]) Revokes a previously granted set of permissions from a list of grantees on the instance of SQL Server.
Öffentliche Methode Revoke(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 Methode Revoke(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.
Öffentliche Methode Revoke(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 Methode Revoke(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.
Öffentliche Methode Script() Generates a Transact-SQL script that can be used to re-create the server.
Öffentliche Methode Script(ScriptingOptions) Generates a Transact-SQL script that can be used to re-create the server by using the specified scripting options.
Öffentliche Methode SetDefaultInitFields(Boolean) Specifies that all properties are fetched when objects are instantiated.
Öffentliche Methode SetDefaultInitFields(Type, Boolean) Specifies all the properties are fetched when objects of the specified type are instantiated.
Öffentliche Methode SetDefaultInitFields(Type, StringCollection) Specifies the properties that are fetched when objects of the specified type are instantiated.
Öffentliche Methode SetDefaultInitFields(Type, array<String[]) Specifies the properties that are fetched when objects of the specified type are instantiated.
Geschützte Methode SetParentImpl Sets the parent of the SqlSmoObject to the newParent parameter. (Geerbt von SqlSmoObject.)
Öffentliche Methode SetTraceFlag Sets a trace flag.
Öffentliche Methode ToString Returns a String that represents the referenced object. (Geerbt von SqlSmoObject.)
Öffentliche Methode Validate Validates the state of an object. (Geerbt von SmoObjectBase.)

Zum Anfang

Ereignisse

  Name Beschreibung
Öffentliches Ereignis PropertyChanged Represents the event that occurs when a property is changed. (Geerbt von SqlSmoObject.)
Öffentliches Ereignis PropertyMetadataChanged Represents the event that occurs when property metadata changes. (Geerbt von SqlSmoObject.)

Zum Anfang

Explizite Schnittstellenimplementierungen

  Name Beschreibung
Explizite SchnittstellenimplementierungPrivate Methode IAlienObject.Discover Discovers any dependencies. Verweisen Sie nicht direkt im Code auf dieses Element. Unterstützt die SQL Server-Infrastruktur. (Geerbt von SqlSmoObject.)
Explizite SchnittstellenimplementierungPrivate Methode IAlienObject.GetDomainRoot Returns the root of the domain. (Geerbt von SqlSmoObject.)
Explizite SchnittstellenimplementierungPrivate Methode IAlienObject.GetParent Gets 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 Methode IAlienObject.GetPropertyType Gets the type of the specified property. (Geerbt von SqlSmoObject.)
Explizite SchnittstellenimplementierungPrivate Methode IAlienObject.GetPropertyValue Gets the value of the specified property. (Geerbt von SqlSmoObject.)
Explizite SchnittstellenimplementierungPrivate Methode IAlienObject.GetUrn Gets 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 Methode IAlienObject.Resolve Gets the instance that contains the information about the object from the Unified Resource Name (URN) of the object. (Geerbt von SqlSmoObject.)
Explizite SchnittstellenimplementierungPrivate Methode IAlienObject.SetObjectState Sets the object state to the specified SfcObjectState value. (Geerbt von SqlSmoObject.)
Explizite SchnittstellenimplementierungPrivate Methode IAlienObject.SetPropertyValue Sets the property value. (Geerbt von SqlSmoObject.)
Explizite SchnittstellenimplementierungPrivate Methode IAlienRoot.DesignModeInitialize Nur 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 Methode IAlienRoot.SfcHelper_GetDataTable Nur 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 Methode IAlienRoot.SfcHelper_GetSmoObject Nur 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 Methode IAlienRoot.SfcHelper_GetSmoObjectQuery Nur für Informationszwecke identifiziert. Nicht unterstützt. Zukünftige Kompatibilität wird nicht sichergestellt. Gets a List of String values.
Explizite SchnittstellenimplementierungPrivate Eigenschaft ISfcDomainLite.DomainInstanceName Gets the instance name of the domain.
Explizite SchnittstellenimplementierungPrivate Eigenschaft ISfcDomainLite.DomainName Gets the domain name.
Explizite SchnittstellenimplementierungPrivate Methode ISfcDomainLite.GetLogicalVersion Nur 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 Eigenschaft ISfcHasConnection.ConnectionContext Gets the context for the connection represented by the current Server object.
Explizite SchnittstellenimplementierungPrivate Methode ISfcHasConnection.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 Methode ISfcHasConnection.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 Methode ISfcHasConnection.SetConnection Nur für Informationszwecke identifiziert. Nicht unterstützt. Zukünftige Kompatibilität wird nicht sichergestellt. Sets a connection to an Sfc backing store.
Explizite SchnittstellenimplementierungPrivate Methode ISfcPropertyProvider.GetPropertySet Gets the interface reference to the set of properties of this object. (Geerbt von SqlSmoObject.)
Explizite SchnittstellenimplementierungPrivate Eigenschaft ISfcSupportsDesignMode.IsDesignMode Gets a Boolean value that specifies whether the Server supports design mode.

Zum Anfang

Hinweise

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.

Beispiele

Herstellen einer Verbindung zu einer Instanz von SQL Server

Threadsicherheit

Alle öffentlichen static (Shared in Visual Basic)-Elemente dieses Typs sind Threadsicher. Für Instanzelemente wird die Threadsicherheit nicht gewährleistet.

Siehe auch

Verweis

Microsoft.SqlServer.Management.Smo-Namespace

Andere Ressourcen

Herstellen einer Verbindung zu einer Instanz von SQL Server

Trennen der Verbindung zu einer Instanz von SQL Server