Server Members

The Server object represents an instance of Microsoft SQL Server.

The following tables list the members exposed by the Server type.

Public Constructors

  名称 Description
Server Overloaded. Initializes a new instance of the Server class.

顶部

Protected Fields

  名称 Description
ms220252.protfield(zh-cn,SQL.90).gif m_ExtendedProperties  (inherited from SqlSmoObject )

顶部

Public Properties

(see also Protected Properties )

  名称 Description
ms220252.pubproperty(zh-cn,SQL.90).gif ActiveDirectory Gets information about the Active Directory settings for the instance of Microsoft SQL Server.
ms220252.pubproperty(zh-cn,SQL.90).gif BackupDevices Represents a collection of BackupDevice objects. Each BackupDevice object represents a backup device defined on the instance of Microsoft SQL Server.
ms220252.pubproperty(zh-cn,SQL.90).gif Configuration Gets the configuration options for the instance of Microsoft SQL Server.
ms220252.pubproperty(zh-cn,SQL.90).gif ConnectionContext Gets the current server connection details for the instance of Microsoft SQL Server.
ms220252.pubproperty(zh-cn,SQL.90).gif Credentials Represents a collection of Credential objects. Each Credential object represents a credential defined on the instance of Microsoft SQL Server.
ms220252.pubproperty(zh-cn,SQL.90).gif Databases Represents a collection of Database objects. Each Database object represents a database defined on the instance of Microsoft SQL Server.
ms220252.pubproperty(zh-cn,SQL.90).gif DefaultTextMode Gets or sets the Boolean property value that specifies whether the default text mode is set for the instance of SQL Server.
ms220252.pubproperty(zh-cn,SQL.90).gif Endpoints Represents a collection of Endpoint objects. Each Endpoint object represents an endpoint defined on the instance of Microsoft SQL Server.
ms220252.pubproperty(zh-cn,SQL.90).gif Events Gets the server events associated with the instance of Microsoft SQL Server.
ms220252.pubproperty(zh-cn,SQL.90).gif FullTextService Gets the Microsoft Search full-text service implementation for the instance of Microsoft SQL Server.
ms220252.pubproperty(zh-cn,SQL.90).gif Information Gets information about the instance of Microsoft SQL Server.
ms220252.pubproperty(zh-cn,SQL.90).gif InstanceName Gets the instance name of the instance of Microsoft SQL Server.
ms220252.pubproperty(zh-cn,SQL.90).gif JobServer Gets the SQL Server Agent associated with the instance of Microsoft SQL Server.
ms220252.pubproperty(zh-cn,SQL.90).gif Languages Represents a collection of Language objects. Each Language object represents an languages supported by the instance of Microsoft SQL Server.
ms220252.pubproperty(zh-cn,SQL.90).gif LinkedServers Represents a collection of LinkedServer objects. Each LinkedServer object represents a linked server registered on the instance of Microsoft SQL Server.
ms220252.pubproperty(zh-cn,SQL.90).gif Logins Represents a collection of Login objects. Each Login object represents a login defined on the instance of Microsoft SQL Server.
ms220252.pubproperty(zh-cn,SQL.90).gif Mail Gets the Microsoft SQL Mail service associated with the instance of Microsoft SQL Server.
ms220252.pubproperty(zh-cn,SQL.90).gif Name Gets the name of the instance of Microsoft SQL Server.
ms220252.pubproperty(zh-cn,SQL.90).gif NotificationServices Gets the Notification Services associated with the instance of Microsoft SQL Server.
ms220252.pubproperty(zh-cn,SQL.90).gif Properties  Gets a collection of Property objects that represent the object properties. (inherited from SqlSmoObject)
ms220252.pubproperty(zh-cn,SQL.90).gif ProxyAccount Gets the proxy account associated with the instance of Microsoft SQL Server.
ms220252.pubproperty(zh-cn,SQL.90).gif ReplicationServer Gets the Microsoft replication service associated with the instance of Microsoft SQL Server.
ms220252.pubproperty(zh-cn,SQL.90).gif Roles Represents a collection of ServerRole objects. Each ServerRole object represents a role defined on the instance of Microsoft SQL Server.
ms220252.pubproperty(zh-cn,SQL.90).gif ServiceMasterKey Gets the service master key associated with the instance of SQL Server.
ms220252.pubproperty(zh-cn,SQL.90).gif Settings Gets modifiable settings for the instance of Microsoft SQL Server.
ms220252.pubproperty(zh-cn,SQL.90).gif State  Gets the state of the referenced object. (inherited from SmoObjectBase)
ms220252.pubproperty(zh-cn,SQL.90).gif SystemDataTypes Represents a collection of SystemDataType objects. Each SystemDataType object represents a system data type defined on the instance of Microsoft SQL Server.
ms220252.pubproperty(zh-cn,SQL.90).gif SystemMessages Represents a collection of SystemMessage objects. Each SystemMessage object represents a system message defined on the instance of Microsoft SQL Server.
ms220252.pubproperty(zh-cn,SQL.90).gif 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.
ms220252.pubproperty(zh-cn,SQL.90).gif Urn  Gets the Uniform Resource Name (URN) address value that uniquely identifies the object. (inherited from SqlSmoObject)
ms220252.pubproperty(zh-cn,SQL.90).gif UserData  Gets or sets user-defined data associated with the referenced object. (inherited from SmoObjectBase)
ms220252.pubproperty(zh-cn,SQL.90).gif UserDefinedMessages Represents a collection of UserDefinedMessage objects. Each UserDefinedMessage object represents a user-defined message defined on the instance of Microsoft SQL Server.
ms220252.pubproperty(zh-cn,SQL.90).gif UserOptions Gets the user options for the current connection to the instance of Microsoft SQL Server.

顶部

Protected Properties

  名称 Description
ms220252.protproperty(zh-cn,SQL.90).gif ExecuteForScalar  Gets or sets the Boolean property value that specifies whether the object is set to the execute for scalar option. (inherited from SqlSmoObject)
ms220252.protproperty(zh-cn,SQL.90).gif ObjectInSpace  Gets the Boolean property value that specifies whether the object exists in isolation or whether it is connected to the instance of Microsoft SQL Server directly or indirectly. (inherited from SqlSmoObject)
ms220252.protproperty(zh-cn,SQL.90).gif PresetProperties  Gets or sets the preset properties of the referenced object. (inherited from SqlSmoObject)
ms220252.protproperty(zh-cn,SQL.90).gif ScalarResult  Gets the scalar result for the referenced object. (inherited from SqlSmoObject)

顶部

Public Methods

(see also Protected Methods )

  名称 Description
ms220252.pubmethod(zh-cn,SQL.90).gif Alter Updates any Server object property changes on the instance of Microsoft SQL Server.
ms220252.pubmethod(zh-cn,SQL.90).gif AttachDatabase Overloaded. Attaches an existing database that is made up of one or more files to the instance of Microsoft SQL Server.
ms220252.pubmethod(zh-cn,SQL.90).gif CompareUrn Compares two Uniform Resource Name (URN) addresses.
ms220252.pubmethod(zh-cn,SQL.90).gif DeleteBackupHistory Overloaded. Deletes the backup history for this instance of Microsoft SQL Server up until the specified date and time.
ms220252.pubmethod(zh-cn,SQL.90).gif Deny Overloaded. Denies the specified set of permissions for the specified grantees on the instance of Microsoft SQL Server.
ms220252.pubmethod(zh-cn,SQL.90).gif DetachDatabase Overloaded. Detaches a database from the instance of Microsoft SQL Server.
ms220252.pubmethod(zh-cn,SQL.90).gif DetachedDatabaseInfo Returns information about a detached database file.
ms220252.pubmethod(zh-cn,SQL.90).gif EnumAvailableMedia Overloaded. Enumerates a list of media that are visible to the instance of Microsoft SQL Server on the local area network.
ms220252.pubmethod(zh-cn,SQL.90).gif EnumCollations Enumerates a list of collations supported by the instance of Microsoft SQL Server.
ms220252.pubmethod(zh-cn,SQL.90).gif EnumDatabaseMirrorWitnessRoles Overloaded. Enumerates a list of database mirror witness roles.
ms220252.pubmethod(zh-cn,SQL.90).gif EnumDetachedDatabaseFiles Enumerates a list of detached database files.
ms220252.pubmethod(zh-cn,SQL.90).gif EnumDetachedLogFiles Enumerates a list of detached log files.
ms220252.pubmethod(zh-cn,SQL.90).gif EnumDirectories Enumerates a list of directories relative to the specified path.
ms220252.pubmethod(zh-cn,SQL.90).gif EnumErrorLogs Enumerates a list of Microsoft SQL Server error log files.
ms220252.pubmethod(zh-cn,SQL.90).gif EnumLocks Overloaded. Enumerates a list of current locks held on the instance of Microsoft SQL Server.
ms220252.pubmethod(zh-cn,SQL.90).gif EnumMembers Enumerates a list of members of server roles and database roles on the instance of Microsoft SQL Server.
ms220252.pubmethod(zh-cn,SQL.90).gif EnumObjectPermissions Overloaded. Enumerates a list of permissions for objects on the instance of Microsoft SQL Server.
ms220252.pubmethod(zh-cn,SQL.90).gif EnumPerformanceCounters Overloaded. Enumerates a list of performance counters that are supported by the instance of Microsoft SQL Server.
ms220252.pubmethod(zh-cn,SQL.90).gif EnumProcesses Overloaded. Enumerates a list of processes running on the instance of Microsoft SQL Server.
ms220252.pubmethod(zh-cn,SQL.90).gif EnumServerAttributes Enumerates a list of server attributes for the instance of SQL Server.
ms220252.pubmethod(zh-cn,SQL.90).gif EnumServerPermissions Overloaded. Enumerates a list of server permissions for the instance of Microsoft SQL Server.
ms220252.pubmethod(zh-cn,SQL.90).gif EnumStartupProcedures Enumerates a list of startup procedures.
ms220252.pubmethod(zh-cn,SQL.90).gif EnumWindowsDomainGroups Overloaded. Enumerates a list of Microsoft Windows group accounts defined on a domain.
ms220252.pubmethod(zh-cn,SQL.90).gif EnumWindowsGroupInfo Overloaded. Enumerates a list of information about all Microsoft Windows groups that have explicitly granted access to the instance of Microsoft SQL Server.
ms220252.pubmethod(zh-cn,SQL.90).gif EnumWindowsUserInfo Overloaded. Enumerates a list of information about all Windows users that have explicitly granted access to Microsoft SQL Server.
ms220252.pubmethod(zh-cn,SQL.90).gif Equals  Overloaded. (inherited from Object )
ms220252.pubmethod(zh-cn,SQL.90).gif GetActiveDBConnectionCount Returns the number of active connections for the specified database.
ms220252.pubmethod(zh-cn,SQL.90).gif GetDefaultInitFields Returns the property types that are initialized by default when the specified object is initialized.
ms220252.pubmethod(zh-cn,SQL.90).gif GetHashCode  (inherited from Object )
ms220252.pubmethod(zh-cn,SQL.90).gif GetPropertyNames Returns the names of the initialized properties for the specified object type
ms220252.pubmethod(zh-cn,SQL.90).gif GetSmoObject Returns the object that is specified by a Universal Resource Name (URN) address.
ms220252.pubmethod(zh-cn,SQL.90).gif GetType  (inherited from Object )
ms220252.pubmethod(zh-cn,SQL.90).gif Grant Overloaded. Grants the specified set of permissions to the specified grantees on the instance of Microsoft SQL Server.
ms220252.pubmethod(zh-cn,SQL.90).gif Initialize  Overloaded. Initializes the object and forces the properties be loaded. (inherited from SqlSmoObject)
ms220252.pubmethod(zh-cn,SQL.90).gif IsDetachedPrimaryFile Verifies whether the specified file is a primary (.mdf) database file.
ms220252.pubmethod(zh-cn,SQL.90).gif IsWindowsGroupMember Verifies whether the specified Microsoft Windows user account is a member of the specified Windows group.
ms220252.pubmethod(zh-cn,SQL.90).gif KillAllProcesses Stops the all processes on the specified database.
ms220252.pubmethod(zh-cn,SQL.90).gif KillDatabase Deletes the specified database and drops any active connection.
ms220252.pubmethod(zh-cn,SQL.90).gif KillProcess Stops the specified process.
ms220252.pubmethod(zh-cn,SQL.90).gif PingSqlServerVersion Overloaded. Gets the version number of the instance of Microsoft SQL Server.
ms220252.pubmethod(zh-cn,SQL.90).gif ReadErrorLog Overloaded. Enumerates the Microsoft SQL Server error log.
ms220252.pubmethod(zh-cn,SQL.90).gifms220252.static(zh-cn,SQL.90).gif ReferenceEquals  (inherited from Object )
ms220252.pubmethod(zh-cn,SQL.90).gif Refresh Overridden. Refreshes the objects and properties on the Server object.
ms220252.pubmethod(zh-cn,SQL.90).gif Revoke Overloaded. Revokes a previously granted set of permissions from a grantee or grantees on the instance of Microsoft SQL Server.
ms220252.pubmethod(zh-cn,SQL.90).gif SetDefaultInitFields Overloaded. Specifies whether all the properties are fetched when objects are instantiated.
ms220252.pubmethod(zh-cn,SQL.90).gif ToString  Returns a String that represents the referenced object. (inherited from SqlSmoObject)

顶部

Protected Methods

  名称 Description
ms220252.protmethod(zh-cn,SQL.90).gif AlterImpl  (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif AlterImplFinish  (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif AlterImplInit  (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif AlterImplWorker  (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif BindDefaultImpl  (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif BindRuleImpl  (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif CheckCollation  (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif CheckObjectState  Overloaded. Validates the state of the referenced object. (inherited from SqlSmoObject)
ms220252.protmethod(zh-cn,SQL.90).gif CheckObjectStateImpl  (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif CheckVersion80  Checks the validity of the object on Microsoft SQL Server 2000. (inherited from SqlSmoObject)
ms220252.protmethod(zh-cn,SQL.90).gif CheckVersion80SP3  Checks the validity of the object on Microsoft SQL Server 2000 SP3. (inherited from SqlSmoObject)
ms220252.protmethod(zh-cn,SQL.90).gif CheckVersion90  Check the validity of the object on Microsoft SQL Server 2005. (inherited from SqlSmoObject)
ms220252.protmethod(zh-cn,SQL.90).gif CheckVersionBelow90  (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif CleanObject  (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif CreateImpl  (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif CreateImplFinish  (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif CreateImplInit  (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif DropImpl  (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif DropImplWorker  (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif Finalize  (inherited from Object )
ms220252.protmethod(zh-cn,SQL.90).gif FormatSqlVariant  (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif GenerateDataSpaceScript  (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif GetBindDefaultScript  (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif GetBindRuleScript  (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif GetBoolParameter  Overloaded. (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif GetDateTimeParameter  (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif GetDateTimeParameterAsInt  (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif GetDBName  Gets the database name associated with the object. (inherited from SqlSmoObject)
ms220252.protmethod(zh-cn,SQL.90).gif GetEnumParameter  (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif GetFragOptionString  (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif GetGuidParameter  (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif GetParameter  Overloaded. (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif GetPropValue  (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif GetPropValueOptional  (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif GetPropValueOptionalAllowNull  (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif GetRealValue  (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif GetScriptingOptionsForCreate  (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif GetServerName  Gets the name of the instance of Microsoft SQL Server with which the object is associated. (inherited from SqlSmoObject)
ms220252.protmethod(zh-cn,SQL.90).gif GetSqlServerVersionName  Gets the version name of the instance of Microsoft SQL Server with which the object is associated. (inherited from SqlSmoObject)
ms220252.protmethod(zh-cn,SQL.90).gif GetStringParameter  Overloaded. (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif GetTimeSpanParameterAsInt  (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif GetUrnRecursive  Overloaded. (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif ImplInitialize  (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gifms220252.static(zh-cn,SQL.90).gif IsCollectionDirty  (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif IsObjectDirty  Verifies whether the object properties have been modified and the changes have not yet been persisted on the instance of Microsoft SQL Server. (inherited from SqlSmoObject)
ms220252.protmethod(zh-cn,SQL.90).gif IsObjectInitialized  Verifies whether the object has been initialized. (inherited from SqlSmoObject)
ms220252.protmethod(zh-cn,SQL.90).gif IsObjectInSpace  Verifies whether the object is isolated or connected to the instance of Microsoft SQL Server. (inherited from SqlSmoObject)
ms220252.protmethod(zh-cn,SQL.90).gif IsVersion80SP3  (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif MarkDropped  (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif MarkForDropImpl  (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif MemberwiseClone  (inherited from Object )
ms220252.protmethod(zh-cn,SQL.90).gif PostAlter  (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif PostCreate  (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif PostDrop  (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif ScriptAlter  (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif ScriptCreate  (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif ScriptDdl  (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif ScriptDrop  (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif ScriptImpl  Overloaded. (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif ScriptImplWorker  (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif SetParentImpl  (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gifms220252.static(zh-cn,SQL.90).gif Trace  (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif UnbindDefaultImpl  (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gif UnbindRuleImpl  (inherited from SqlSmoObject )
ms220252.protmethod(zh-cn,SQL.90).gifms220252.static(zh-cn,SQL.90).gif UpdateCollectionState2  (inherited from SqlSmoObject )

顶部

请参阅

参考

Server Class
Microsoft.SqlServer.Management.Smo Namespace

其他资源

Connecting to an Instance of SQL Server
Disconnecting from an Instance of SQL Server
管理服务器