Condividi tramite


Classe Server

The Server object represents an instance of SQL Server.

Gerarchia di ereditarietà

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

Spazio dei nomi  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

Sintassi

'Dichiarazione
<PhysicalFacetAttribute> _
<EvaluationModeAttribute(AutomatedPolicyEvaluationMode.CheckOnSchedule)> _
<RootFacetAttribute(GetType(Server))> _
Public NotInheritable Class Server _
    Inherits SqlSmoObject _
    Implements ISfcSupportsDesignMode, IAlterable, IScriptable, IServerSettings,  _
    IServerInformation, IDmfFacet, IAlienRoot, ISfcDomainLite, ISfcHasConnection
'Utilizzo
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

Nel tipo Server sono esposti i membri seguenti.

Costruttori

  Nome Descrizione
Metodo pubblico Server() Initializes a new instance of the Server class.
Metodo pubblico Server(String) Initializes a new instance of the Server class with the specified name.
Metodo pubblico Server(ServerConnection) Initializes a new instance of the Server class based on the specified connection.

In alto

Proprietà

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

In alto

Metodi

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

In alto

Eventi

  Nome Descrizione
Evento pubblico PropertyChanged Represents the event that occurs when a property is changed. Ereditato da SqlSmoObject.
Evento pubblico PropertyMetadataChanged Represents the event that occurs when property metadata changes. Ereditato da SqlSmoObject.

In alto

Implementazioni esplicite dell'interfaccia

  Nome Descrizione
Implementazione esplicita dell'interfacciaMetodo privato IAlienObject.Discover Discovers any dependencies. Non fare riferimento direttamente a questo membro nel codice. Supporta l'infrastruttura di SQL Server. Ereditato da SqlSmoObject.
Implementazione esplicita dell'interfacciaMetodo privato IAlienObject.GetDomainRoot Returns the root of the domain. Ereditato da SqlSmoObject.
Implementazione esplicita dell'interfacciaMetodo privato IAlienObject.GetParent Gets the parent of this object. Non fare riferimento direttamente a questo membro nel codice. Supporta l'infrastruttura di SQL Server. Ereditato da SqlSmoObject.
Implementazione esplicita dell'interfacciaMetodo privato IAlienObject.GetPropertyType Gets the type of the specified property. Ereditato da SqlSmoObject.
Implementazione esplicita dell'interfacciaMetodo privato IAlienObject.GetPropertyValue Gets the value of the specified property. Ereditato da SqlSmoObject.
Implementazione esplicita dell'interfacciaMetodo privato IAlienObject.GetUrn Gets the Unified Resource Name (URN) of the object. Non fare riferimento direttamente a questo membro nel codice. Supporta l'infrastruttura di SQL Server. Ereditato da SqlSmoObject.
Implementazione esplicita dell'interfacciaMetodo privato IAlienObject.Resolve Gets the instance that contains the information about the object from the Unified Resource Name (URN) of the object. Ereditato da SqlSmoObject.
Implementazione esplicita dell'interfacciaMetodo privato IAlienObject.SetObjectState Sets the object state to the specified SfcObjectState value. Ereditato da SqlSmoObject.
Implementazione esplicita dell'interfacciaMetodo privato IAlienObject.SetPropertyValue Sets the property value. Ereditato da SqlSmoObject.
Implementazione esplicita dell'interfacciaMetodo privato IAlienRoot.DesignModeInitialize Identificato solo a scopo informativo. Non supportato. Non è garantita la compatibilità con le versioni future. Ensures that the Server object is in design mode, that it is disconnected from the instance of the Database Engine it represents.
Implementazione esplicita dell'interfacciaMetodo privato IAlienRoot.SfcHelper_GetDataTable Identificato solo a scopo informativo. Non supportato. Non è garantita la compatibilità con le versioni future. Gets a DataTable object containing the results from a URN.
Implementazione esplicita dell'interfacciaMetodo privato IAlienRoot.SfcHelper_GetSmoObject Identificato solo a scopo informativo. Non supportato. Non è garantita la compatibilità con le versioni future. Gets the Object that represents the object identified by a specified URN.
Implementazione esplicita dell'interfacciaMetodo privato IAlienRoot.SfcHelper_GetSmoObjectQuery Identificato solo a scopo informativo. Non supportato. Non è garantita la compatibilità con le versioni future. Gets a List of String values.
Implementazione esplicita dell'interfacciaProprietà privata ISfcDomainLite.DomainInstanceName Gets the instance name of the domain.
Implementazione esplicita dell'interfacciaProprietà privata ISfcDomainLite.DomainName Gets the domain name.
Implementazione esplicita dell'interfacciaMetodo privato ISfcDomainLite.GetLogicalVersion Identificato solo a scopo informativo. Non supportato. Non è garantita la compatibilità con le versioni future. Gets an Int32 value that indicates whether changes have been made to the Server object.
Implementazione esplicita dell'interfacciaProprietà privata ISfcHasConnection.ConnectionContext Gets the context for the connection represented by the current Server object.
Implementazione esplicita dell'interfacciaMetodo privato ISfcHasConnection.GetConnection() Identificato solo a scopo informativo. Non supportato. Non è garantita la compatibilità con le versioni future. Gets a connection to an Sfc backing store.
Implementazione esplicita dell'interfacciaMetodo privato ISfcHasConnection.GetConnection(SfcObjectQueryMode) Identificato solo a scopo informativo. Non supportato. Non è garantita la compatibilità con le versioni future. Gets a connection to an Sfc backing store that supports the requested query mode.
Implementazione esplicita dell'interfacciaMetodo privato ISfcHasConnection.SetConnection Identificato solo a scopo informativo. Non supportato. Non è garantita la compatibilità con le versioni future. Sets a connection to an Sfc backing store.
Implementazione esplicita dell'interfacciaMetodo privato ISfcPropertyProvider.GetPropertySet Gets the interface reference to the set of properties of this object. Ereditato da SqlSmoObject.
Implementazione esplicita dell'interfacciaProprietà privata ISfcSupportsDesignMode.IsDesignMode Gets a Boolean value that specifies whether the Server supports design mode.

In alto

Osservazioni

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

Tutti i membri statici pubblici (Shared in Microsoft Visual Basic) di questo tipo sono sicuri per le operazioni a thread multipli. Non è invece garantita la sicurezza dei membri dell'istanza.

Esempi

Connessione a un'istanza di SQL Server

Protezione dei thread

I membri static (Shared in Visual Basic) pubblici di questo tipo sono affidabili. Non è invece garantita la sicurezza dei membri dell'istanza.

Vedere anche

Riferimento

Spazio dei nomi Microsoft.SqlServer.Management.Smo

Altre risorse

Connessione a un'istanza di SQL Server

Disconnessione da un'istanza di SQL Server