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 | |
---|---|---|
m_ExtendedProperties | (inherited from SqlSmoObject ) |
顶部
Public Properties
(see also Protected Properties )
名称 | Description | |
---|---|---|
ActiveDirectory | Gets information about the Active Directory settings for the instance of Microsoft SQL Server. | |
BackupDevices | Represents a collection of BackupDevice objects. Each BackupDevice object represents a backup device defined on the instance of Microsoft SQL Server. | |
Configuration | Gets the configuration options for the instance of Microsoft SQL Server. | |
ConnectionContext | Gets the current server connection details for the instance of Microsoft SQL Server. | |
Credentials | Represents a collection of Credential objects. Each Credential object represents a credential defined on the instance of Microsoft SQL Server. | |
Databases | Represents a collection of Database objects. Each Database object represents a database defined on the instance of Microsoft SQL Server. | |
DefaultTextMode | Gets or sets the Boolean property value that specifies whether the default text mode is set for the instance of SQL Server. | |
Endpoints | Represents a collection of Endpoint objects. Each Endpoint object represents an endpoint defined on the instance of Microsoft SQL Server. | |
Events | Gets the server events associated with the instance of Microsoft SQL Server. | |
FullTextService | Gets the Microsoft Search full-text service implementation for the instance of Microsoft SQL Server. | |
Information | Gets information about the instance of Microsoft SQL Server. | |
InstanceName | Gets the instance name of the instance of Microsoft SQL Server. | |
JobServer | Gets the SQL Server Agent associated with the instance of Microsoft SQL Server. | |
Languages | Represents a collection of Language objects. Each Language object represents an languages supported by the instance of Microsoft SQL Server. | |
LinkedServers | Represents a collection of LinkedServer objects. Each LinkedServer object represents a linked server registered on the instance of Microsoft SQL Server. | |
Logins | Represents a collection of Login objects. Each Login object represents a login defined on the instance of Microsoft SQL Server. | |
Gets the Microsoft SQL Mail service associated with the instance of Microsoft SQL Server. | ||
Name | Gets the name of the instance of Microsoft SQL Server. | |
NotificationServices | Gets the Notification Services associated with the instance of Microsoft SQL Server. | |
Properties | Gets a collection of Property objects that represent the object properties. (inherited from SqlSmoObject) | |
ProxyAccount | Gets the proxy account associated with the instance of Microsoft SQL Server. | |
ReplicationServer | Gets the Microsoft replication service associated with the instance of Microsoft SQL Server. | |
Roles | Represents a collection of ServerRole objects. Each ServerRole object represents a role defined on the instance of Microsoft SQL Server. | |
ServiceMasterKey | Gets the service master key associated with the instance of SQL Server. | |
Settings | Gets modifiable settings for the instance of Microsoft SQL Server. | |
State | Gets the state of the referenced object. (inherited from SmoObjectBase) | |
SystemDataTypes | Represents a collection of SystemDataType objects. Each SystemDataType object represents a system data type defined on the instance of Microsoft SQL Server. | |
SystemMessages | Represents a collection of SystemMessage objects. Each SystemMessage object represents a system message defined on the instance of Microsoft SQL Server. | |
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. | |
Urn | Gets the Uniform Resource Name (URN) address value that uniquely identifies the object. (inherited from SqlSmoObject) | |
UserData | Gets or sets user-defined data associated with the referenced object. (inherited from SmoObjectBase) | |
UserDefinedMessages | Represents a collection of UserDefinedMessage objects. Each UserDefinedMessage object represents a user-defined message defined on the instance of Microsoft SQL Server. | |
UserOptions | Gets the user options for the current connection to the instance of Microsoft SQL Server. |
顶部
Protected Properties
名称 | Description | |
---|---|---|
ExecuteForScalar | Gets or sets the Boolean property value that specifies whether the object is set to the execute for scalar option. (inherited from SqlSmoObject) | |
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) | |
PresetProperties | Gets or sets the preset properties of the referenced object. (inherited from SqlSmoObject) | |
ScalarResult | Gets the scalar result for the referenced object. (inherited from SqlSmoObject) |
顶部
Public Methods
(see also Protected Methods )
名称 | Description | |
---|---|---|
Alter | Updates any Server object property changes on the instance of Microsoft SQL Server. | |
AttachDatabase | Overloaded. Attaches an existing database that is made up of one or more files to the instance of Microsoft SQL Server. | |
CompareUrn | Compares two Uniform Resource Name (URN) addresses. | |
DeleteBackupHistory | Overloaded. Deletes the backup history for this instance of Microsoft SQL Server up until the specified date and time. | |
Deny | Overloaded. Denies the specified set of permissions for the specified grantees on the instance of Microsoft SQL Server. | |
DetachDatabase | Overloaded. Detaches a database from the instance of Microsoft SQL Server. | |
DetachedDatabaseInfo | Returns information about a detached database file. | |
EnumAvailableMedia | Overloaded. Enumerates a list of media that are visible to the instance of Microsoft SQL Server on the local area network. | |
EnumCollations | Enumerates a list of collations supported by the instance of Microsoft SQL Server. | |
EnumDatabaseMirrorWitnessRoles | Overloaded. Enumerates a list of database mirror witness roles. | |
EnumDetachedDatabaseFiles | Enumerates a list of detached database files. | |
EnumDetachedLogFiles | Enumerates a list of detached log files. | |
EnumDirectories | Enumerates a list of directories relative to the specified path. | |
EnumErrorLogs | Enumerates a list of Microsoft SQL Server error log files. | |
EnumLocks | Overloaded. Enumerates a list of current locks held on the instance of Microsoft SQL Server. | |
EnumMembers | Enumerates a list of members of server roles and database roles on the instance of Microsoft SQL Server. | |
EnumObjectPermissions | Overloaded. Enumerates a list of permissions for objects on the instance of Microsoft SQL Server. | |
EnumPerformanceCounters | Overloaded. Enumerates a list of performance counters that are supported by the instance of Microsoft SQL Server. | |
EnumProcesses | Overloaded. Enumerates a list of processes running on the instance of Microsoft SQL Server. | |
EnumServerAttributes | Enumerates a list of server attributes for the instance of SQL Server. | |
EnumServerPermissions | Overloaded. Enumerates a list of server permissions for the instance of Microsoft SQL Server. | |
EnumStartupProcedures | Enumerates a list of startup procedures. | |
EnumWindowsDomainGroups | Overloaded. Enumerates a list of Microsoft Windows group accounts defined on a domain. | |
EnumWindowsGroupInfo | Overloaded. Enumerates a list of information about all Microsoft Windows groups that have explicitly granted access to the instance of Microsoft SQL Server. | |
EnumWindowsUserInfo | Overloaded. Enumerates a list of information about all Windows users that have explicitly granted access to Microsoft SQL Server. | |
Equals | Overloaded. (inherited from Object ) | |
GetActiveDBConnectionCount | Returns the number of active connections for the specified database. | |
GetDefaultInitFields | Returns the property types that are initialized by default when the specified object is initialized. | |
GetHashCode | (inherited from Object ) | |
GetPropertyNames | Returns the names of the initialized properties for the specified object type | |
GetSmoObject | Returns the object that is specified by a Universal Resource Name (URN) address. | |
GetType | (inherited from Object ) | |
Grant | Overloaded. Grants the specified set of permissions to the specified grantees on the instance of Microsoft SQL Server. | |
Initialize | Overloaded. Initializes the object and forces the properties be loaded. (inherited from SqlSmoObject) | |
IsDetachedPrimaryFile | Verifies whether the specified file is a primary (.mdf) database file. | |
IsWindowsGroupMember | Verifies whether the specified Microsoft Windows user account is a member of the specified Windows group. | |
KillAllProcesses | Stops the all processes on the specified database. | |
KillDatabase | Deletes the specified database and drops any active connection. | |
KillProcess | Stops the specified process. | |
PingSqlServerVersion | Overloaded. Gets the version number of the instance of Microsoft SQL Server. | |
ReadErrorLog | Overloaded. Enumerates the Microsoft SQL Server error log. | |
ReferenceEquals | (inherited from Object ) | |
Refresh | Overridden. Refreshes the objects and properties on the Server object. | |
Revoke | Overloaded. Revokes a previously granted set of permissions from a grantee or grantees on the instance of Microsoft SQL Server. | |
SetDefaultInitFields | Overloaded. Specifies whether all the properties are fetched when objects are instantiated. | |
ToString | Returns a String that represents the referenced object. (inherited from SqlSmoObject) |
顶部
Protected Methods
名称 | Description | |
---|---|---|
AlterImpl | (inherited from SqlSmoObject ) | |
AlterImplFinish | (inherited from SqlSmoObject ) | |
AlterImplInit | (inherited from SqlSmoObject ) | |
AlterImplWorker | (inherited from SqlSmoObject ) | |
BindDefaultImpl | (inherited from SqlSmoObject ) | |
BindRuleImpl | (inherited from SqlSmoObject ) | |
CheckCollation | (inherited from SqlSmoObject ) | |
CheckObjectState | Overloaded. Validates the state of the referenced object. (inherited from SqlSmoObject) | |
CheckObjectStateImpl | (inherited from SqlSmoObject ) | |
CheckVersion80 | Checks the validity of the object on Microsoft SQL Server 2000. (inherited from SqlSmoObject) | |
CheckVersion80SP3 | Checks the validity of the object on Microsoft SQL Server 2000 SP3. (inherited from SqlSmoObject) | |
CheckVersion90 | Check the validity of the object on Microsoft SQL Server 2005. (inherited from SqlSmoObject) | |
CheckVersionBelow90 | (inherited from SqlSmoObject ) | |
CleanObject | (inherited from SqlSmoObject ) | |
CreateImpl | (inherited from SqlSmoObject ) | |
CreateImplFinish | (inherited from SqlSmoObject ) | |
CreateImplInit | (inherited from SqlSmoObject ) | |
DropImpl | (inherited from SqlSmoObject ) | |
DropImplWorker | (inherited from SqlSmoObject ) | |
Finalize | (inherited from Object ) | |
FormatSqlVariant | (inherited from SqlSmoObject ) | |
GenerateDataSpaceScript | (inherited from SqlSmoObject ) | |
GetBindDefaultScript | (inherited from SqlSmoObject ) | |
GetBindRuleScript | (inherited from SqlSmoObject ) | |
GetBoolParameter | Overloaded. (inherited from SqlSmoObject ) | |
GetDateTimeParameter | (inherited from SqlSmoObject ) | |
GetDateTimeParameterAsInt | (inherited from SqlSmoObject ) | |
GetDBName | Gets the database name associated with the object. (inherited from SqlSmoObject) | |
GetEnumParameter | (inherited from SqlSmoObject ) | |
GetFragOptionString | (inherited from SqlSmoObject ) | |
GetGuidParameter | (inherited from SqlSmoObject ) | |
GetParameter | Overloaded. (inherited from SqlSmoObject ) | |
GetPropValue | (inherited from SqlSmoObject ) | |
GetPropValueOptional | (inherited from SqlSmoObject ) | |
GetPropValueOptionalAllowNull | (inherited from SqlSmoObject ) | |
GetRealValue | (inherited from SqlSmoObject ) | |
GetScriptingOptionsForCreate | (inherited from SqlSmoObject ) | |
GetServerName | Gets the name of the instance of Microsoft SQL Server with which the object is associated. (inherited from SqlSmoObject) | |
GetSqlServerVersionName | Gets the version name of the instance of Microsoft SQL Server with which the object is associated. (inherited from SqlSmoObject) | |
GetStringParameter | Overloaded. (inherited from SqlSmoObject ) | |
GetTimeSpanParameterAsInt | (inherited from SqlSmoObject ) | |
GetUrnRecursive | Overloaded. (inherited from SqlSmoObject ) | |
ImplInitialize | (inherited from SqlSmoObject ) | |
IsCollectionDirty | (inherited from SqlSmoObject ) | |
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) | |
IsObjectInitialized | Verifies whether the object has been initialized. (inherited from SqlSmoObject) | |
IsObjectInSpace | Verifies whether the object is isolated or connected to the instance of Microsoft SQL Server. (inherited from SqlSmoObject) | |
IsVersion80SP3 | (inherited from SqlSmoObject ) | |
MarkDropped | (inherited from SqlSmoObject ) | |
MarkForDropImpl | (inherited from SqlSmoObject ) | |
MemberwiseClone | (inherited from Object ) | |
PostAlter | (inherited from SqlSmoObject ) | |
PostCreate | (inherited from SqlSmoObject ) | |
PostDrop | (inherited from SqlSmoObject ) | |
ScriptAlter | (inherited from SqlSmoObject ) | |
ScriptCreate | (inherited from SqlSmoObject ) | |
ScriptDdl | (inherited from SqlSmoObject ) | |
ScriptDrop | (inherited from SqlSmoObject ) | |
ScriptImpl | Overloaded. (inherited from SqlSmoObject ) | |
ScriptImplWorker | (inherited from SqlSmoObject ) | |
SetParentImpl | (inherited from SqlSmoObject ) | |
Trace | (inherited from SqlSmoObject ) | |
UnbindDefaultImpl | (inherited from SqlSmoObject ) | |
UnbindRuleImpl | (inherited from SqlSmoObject ) | |
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
管理服务器