Export (0) Print
Expand All
Expand Minimize

Server Methods

The Server type exposes the following members.

  NameDescription
Protected method AddDatabaseContext(StringCollection) (Inherited from SqlSmoObject.)
Public method Alter() Updates any Server object property changes on the instance of SQL Server. 
Public method Alter(Boolean)
Protected method AlterImpl() (Inherited from SqlSmoObject.)
Protected method AlterImplFinish(StringCollection, ScriptingOptions) (Inherited from SqlSmoObject.)
Protected method AlterImplInit(StringCollection, ScriptingOptions) (Inherited from SqlSmoObject.)
Protected method AlterImplWorker() (Inherited from SqlSmoObject.)
Public method 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. 
Public method AttachDatabase(String, StringCollection, AttachOptions)
Public method 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. 
Public method AttachDatabase(String, StringCollection, String, AttachOptions)
Protected method BindDefaultImpl(String, String, Boolean) (Inherited from SqlSmoObject.)
Protected method BindRuleImpl(String, String, Boolean) (Inherited from SqlSmoObject.)
Protected method CheckCollation(String, ScriptingOptions) (Inherited from SqlSmoObject.)
Protected method CheckObjectState() Validates the state of the referenced object. (Inherited from SqlSmoObject.)
Protected method CheckObjectState(Boolean) Validates the state of the referenced object with the option to specify that an exception is thrown if the object is not yet created. (Inherited from SqlSmoObject.)
Protected method CheckObjectStateImpl(Boolean) (Inherited from SqlSmoObject.)
Protected method CheckVersion100() (Inherited from SqlSmoObject.)
Protected method CheckVersion80() Checks the validity of the object on SQL Server 2000. (Inherited from SqlSmoObject.)
Protected method CheckVersion80SP3() Checks the validity of the object on SQL Server 2000 SP3. (Inherited from SqlSmoObject.)
Protected method CheckVersion90() Check the validity of the object on SQL Server 2005. (Inherited from SqlSmoObject.)
Protected method CheckVersionBelow90() (Inherited from SqlSmoObject.)
Protected method CleanObject() (Inherited from SqlSmoObject.)
Public method CompareUrn(Urn, Urn) Compares two URNS.
Protected method CreateImpl() (Inherited from SqlSmoObject.)
Protected method CreateImplFinish(StringCollection, ScriptingOptions) (Inherited from SqlSmoObject.)
Protected method CreateImplInit(StringCollection, ScriptingOptions) (Inherited from SqlSmoObject.)
Public method DeleteBackupHistory(DateTime) Deletes the backup history for this instance of SQL Server up until the specified date and time.
Public method DeleteBackupHistory(Int32) Deletes the backup history for the specified media set.
Public method DeleteBackupHistory(String) Deletes the backup history for the specified database.
Public method Deny(ServerPermissionSet, String) Denies the specified set of permissions for the specified grantee on the instance of SQL Server.
Public method Deny(ServerPermissionSet, String[]) Denies the specified set of permissions for the specified grantees on the instance of SQL Server.
Public method 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.
Public method Deny(ServerPermissionSet, String[], Boolean) Denies the specified set of permissions for the specified grantees and other users that the grantee granted the specified set of permissions on the instance of SQL Server.
Public method DetachDatabase(String, Boolean) Detaches the specified database from the instance of SQL Server with the option to update statistics before the database is detached.
Public method 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.
Public method DetachedDatabaseInfo(String) Returns information about a detached database file.
Public method Discover() (Inherited from SqlSmoObject.)
Protected method DropImpl() (Inherited from SqlSmoObject.)
Protected method DropImplWorker(Urn) (Inherited from SqlSmoObject.)
Public method EnumActiveCurrentSessionTraceFlags() Gets active session flags as a DataTable.
Public method EnumActiveGlobalTraceFlags() Gets a DataTable that contains active global trace flags.
Public method EnumAvailableMedia() Enumerates a list of media that is visible to the instance of SQL Server on the local area network.
Public method 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.
Public method EnumCollations() Enumerates a list of collations supported by the instance of SQL Server.
Public method EnumDatabaseMirrorWitnessRoles() Enumerates a list of database mirror witness roles.
Public method EnumDatabaseMirrorWitnessRoles(String) Enumerates a list of mirror witness roles for the specified database.
Public method EnumDetachedDatabaseFiles(String) Enumerates a list of detached database files.
Public method EnumDetachedLogFiles(String) Enumerates a list of detached log files.
Public method EnumDirectories(String) Enumerates a list of directories relative to the specified path.
Public method EnumErrorLogs() Enumerates a list of SQL Server error log files.
Public method EnumLocks() Enumerates a list of current locks held on the instance of SQL Server.
Public method EnumLocks(Int32) Enumerates a list of current locks held by the specified process on the instance of SQL Server.
Public method EnumMembers(RoleTypes) Enumerates a list of members of server roles and database roles on the instance of SQL Server.
Public method EnumObjectPermissions() Enumerates a list of object permissions for the instance of SQL Server.
Public method EnumObjectPermissions(String) Enumerates a list of object permissions for a specified grantee on the application instance of SQL Server.
Public method EnumObjectPermissions(ObjectPermissionSet) Enumerates a list of object permissions for a specified permission on the instance of SQL Server.
Public method EnumObjectPermissions(String, ObjectPermissionSet) Enumerates a list of object permissions for a specified grantee and a specified permission on the instance of SQL Server.
Public method EnumPerformanceCounters() Enumerates a list of performance counters that are supported by the instance of SQL Server.
Public method EnumPerformanceCounters(String) Enumerates a list of performance counters that are supported by the instance of SQL Server for a specified object.
Public method 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.
Public method 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.
Public method EnumProcesses() Enumerates a list of processes running on the instance of SQL Server.
Public method EnumProcesses(Boolean) Enumerates a list of processes running on the instance of SQL Server with the option to exclude system processes.
Public method EnumProcesses(Int32) Enumerates a list of information about the specified process.
Public method EnumProcesses(String) Enumerates a list of processes running on the instance of SQL Server that are associated with the specified login.
Protected method EnumScriptImpl(ScriptingOptions) (Inherited from SqlSmoObject.)
Protected method EnumScriptImplWorker(ScriptingOptions) (Inherited from SqlSmoObject.)
Public method EnumServerAttributes() Enumerates a list of server attributes for the instance of SQL Server.
Public method EnumServerPermissions() Enumerates a list of server permissions for the instance of SQL Server.
Public method EnumServerPermissions(String) Enumerates a list of server permissions for a specified grantee on the instance of SQL Server.
Public method EnumServerPermissions(ServerPermissionSet) Enumerates a list of server permissions for a specified permission on the instance of SQL Server.
Public method EnumServerPermissions(String, ServerPermissionSet) Enumerates a list of server permissions for a specified grantee and a specified permission on the instance of SQL Server.
Public method EnumStartupProcedures() Enumerates a list of startup procedures.
Public method EnumWindowsDomainGroups() Enumerates a list of Microsoft Windows group accounts defined on a domain.
Public method EnumWindowsDomainGroups(String) Enumerates a list of Microsoft Windows group accounts defined for the specified domain.
Public method EnumWindowsGroupInfo() Enumerates a list of information about all Microsoft Windows groups that have explicitly granted access to the instance of SQL Server.
Public method EnumWindowsGroupInfo(String) Enumerates a list of information about all Microsoft Windows groups that have explicitly granted access to the instance of SQL Server.
Public method 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.
Public method EnumWindowsUserInfo() Enumerates a list of information about all Microsoft Windows users that have explicitly granted access to SQL Server.
Public method EnumWindowsUserInfo(String) Enumerates a list of information about all Microsoft Windows users that have explicitly granted access to the instance of SQL Server.
Public method 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.
Public method Equals(Object) (Inherited from Object.)
Protected method Finalize() (Inherited from Object.)
Protected method FormatSqlVariant(Object) (Inherited from SqlSmoObject.)
Protected method GenerateDataSpaceFileStreamScript(StringBuilder, ScriptingOptions, Boolean) (Inherited from SqlSmoObject.)
Protected method GenerateDataSpaceScript(StringBuilder, ScriptingOptions) (Inherited from SqlSmoObject.)
Public method GetActiveDBConnectionCount(String) Returns the number of active connections for the specified database.
Protected method GetBindDefaultScript(ScriptingOptions, String, String, Boolean) (Inherited from SqlSmoObject.)
Protected method GetBindRuleScript(ScriptingOptions, String, String, Boolean) (Inherited from SqlSmoObject.)
Protected method GetBoolParameter(StringBuilder, ScriptingOptions, String, String, Int32) (Inherited from SqlSmoObject.)
Protected method GetBoolParameter(StringBuilder, ScriptingOptions, String, String, Int32, Boolean) (Inherited from SqlSmoObject.)
Protected method GetDateTimeParameter(StringBuilder, ScriptingOptions, String, String, Int32) (Inherited from SqlSmoObject.)
Protected method GetDateTimeParameterAsInt(StringBuilder, ScriptingOptions, String, String, Int32) (Inherited from SqlSmoObject.)
Protected method GetDBName() Gets the database name that is associated with the object. (Inherited from SqlSmoObject.)
Public method GetDefaultInitFields(Type) Returns the property types that are initialized by default when the specified object is initialized.
Protected method GetEnumParameter(StringBuilder, ScriptingOptions, String, String, Type, Int32) (Inherited from SqlSmoObject.)
Protected method GetFragOptionString(FragmentationOption) (Inherited from SqlSmoObject.)
Protected method GetGuidParameter(StringBuilder, ScriptingOptions, String, String, Int32) (Inherited from SqlSmoObject.)
Public method GetHashCode() (Inherited from Object.)
Protected method GetParameter(StringBuilder, ScriptingOptions, String, String, Int32) (Inherited from SqlSmoObject.)
Protected method GetParameter(StringBuilder, ScriptingOptions, String, String, Int32, Boolean) (Inherited from SqlSmoObject.)
Public method GetPropertyNames(Type) Returns the names of the initialized properties for the specified object type
Protected method GetPropValue(String) (Inherited from SqlSmoObject.)
Protected method GetPropValueOptional(String) (Inherited from SqlSmoObject.)
Protected method GetPropValueOptionalAllowNull(String) (Inherited from SqlSmoObject.)
Protected method GetRealValue(Property, Object) (Inherited from SqlSmoObject.)
Protected method GetScriptingOptionsForCreate() (Inherited from SqlSmoObject.)
Protected method GetServerName() Gets the name of the instance of SQL Server with which the object is associated. (Inherited from SqlSmoObject.)
Protected method GetServerObject() (Inherited from SqlSmoObject.)
Public method GetSmoObject(Urn) Gets a SqlSmoObject that is specified by a URN.
Protected method GetSqlServerVersionName() Gets the version name of the instance of SQL Server with which the object is associated. (Inherited from SqlSmoObject.)
Public method GetStringComparer(String) Gets an IComparer interface.
Protected method GetStringParameter(StringBuilder, ScriptingOptions, String, String, Int32) (Inherited from SqlSmoObject.)
Protected method GetStringParameter(StringBuilder, ScriptingOptions, String, String, Int32, Boolean) (Inherited from SqlSmoObject.)
Protected method GetTimeSpanParameterAsInt(StringBuilder, ScriptingOptions, String, String, Int32) (Inherited from SqlSmoObject.)
Public method GetType() (Inherited from Object.)
Protected method GetUrnRecursive(StringBuilder) (Inherited from SqlSmoObject.)
Protected method GetUrnRecursive(StringBuilder, UrnIdOption) (Inherited from SqlSmoObject.)
Public method Grant(ServerPermissionSet, String) Grants the specified set of permissions to the specified grantee on the instance of SQL Server.
Public method Grant(ServerPermissionSet, String[]) Grants the specified set of permissions to the specified grantees on the instance of SQL Server.
Public method 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.
Public method Grant(ServerPermissionSet, String[], Boolean) Grants access to the specified permission to the grantees and the ability to grant access to other users on the instance of SQL Server.
Public method 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.
Public method Grant(ServerPermissionSet, String[], Boolean, String) Grants the specified set of permissions to the grantees and the ability to grant the set of permissions to other users on the instance of SQL Server under an assumed role.
Protected method ImplInitialize(String[], OrderBy[]) (Inherited from SqlSmoObject.)
Public method Initialize() Initializes the object and forces the properties be loaded. (Inherited from SqlSmoObject.)
Public method Initialize(Boolean) Initializes the object and forces the properties be loaded. (Inherited from SqlSmoObject.)
Public method IsDetachedPrimaryFile(String) Verifies whether the specified file is a primary (.mdf) database file.
Protected method IsObjectDirty() Verifies whether the object properties have been modified and the changes have not yet been persisted on the instance of SQL Server. (Inherited from SqlSmoObject.)
Protected method IsObjectInitialized() Verifies whether the object has been initialized. (Inherited from SqlSmoObject.)
Protected method IsObjectInSpace() Verifies whether the object is isolated or connected to the instance of SQL Server. (Inherited from SqlSmoObject.)
Protected method IsVersion80SP3() (Inherited from SqlSmoObject.)
Public method IsWindowsGroupMember(String, String) Verifies whether the specified Microsoft Windows user account is a member of the specified Windows group.
Public method KillAllProcesses(String) Stops the all processes on the specified database.
Public method KillDatabase(String) Deletes the specified database and drops any active connection.
Public method KillProcess(Int32) Stops the specified process.
Protected method MarkDropped() (Inherited from SqlSmoObject.)
Protected method MarkForDropImpl(Boolean) (Inherited from SqlSmoObject.)
Protected method MemberwiseClone() (Inherited from Object.)
Public method PingSqlServerVersion(String) Gets the version number of the instance of SQL Server.
Public method PingSqlServerVersion(String, String, String) Get the version number of the specified instance of SQL Server using the specified login and password to gain access.
Protected method PostAlter() (Inherited from SqlSmoObject.)
Protected method PostCreate() (Inherited from SqlSmoObject.)
Protected method PostDrop() (Inherited from SqlSmoObject.)
Public method ReadErrorLog() Enumerates the SQL Server error log.
Public method ReadErrorLog(Int32) Enumerates the specified SQL Server error log.
Public method Refresh() Refreshes the objects and properties on the Server object. (Overrides SqlSmoObject.Refresh().)
Public method Revoke(ServerPermissionSet, String) Revokes a previously granted set of permissions from a list of grantees on the instance of SQL Server.
Public method Revoke(ServerPermissionSet, String[]) Revokes a previously granted set of permissions from a list of grantees on the instance of SQL Server.
Public method 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.
Public method Revoke(ServerPermissionSet, String[], Boolean, Boolean) Revokes previously granted permissions from grantees on the instance of SQL Server and any other users to whom the grantees have granted the specified set of permissions. The grantees are also given the ability to revoke the specified set of permissions from other users under an assumed role.
Public method 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.
Public method Revoke(ServerPermissionSet, String[], Boolean, Boolean, String) Revokes previously granted permissions from grantees on the instance of SQL Server and any other users to whom the grantees have granted the specified set of permissions. The grantees are also given the ability to revoke the specified set of permissions from other users under an assumed role.
Public method Script()
Public method Script(ScriptingOptions)
Protected method ScriptAlter(StringCollection, ScriptingOptions) (Inherited from SqlSmoObject.)
Protected method ScriptCreate(StringCollection, ScriptingOptions) (Inherited from SqlSmoObject.)
Protected method ScriptDdl(StringCollection, ScriptingOptions) (Inherited from SqlSmoObject.)
Protected method ScriptDrop(StringCollection, ScriptingOptions) (Inherited from SqlSmoObject.)
Protected method ScriptImpl() (Inherited from SqlSmoObject.)
Protected method ScriptImpl(ScriptingOptions) (Inherited from SqlSmoObject.)
Protected method ScriptImplWorker(ScriptingOptions) (Inherited from SqlSmoObject.)
Public method SetDefaultInitFields(Boolean) Specifies that all properties are fetched when objects are instantiated.
Public method SetDefaultInitFields(Type, Boolean) Specifies all the properties are fetched when objects of the specified type are instantiated.
Public method SetDefaultInitFields(Type, StringCollection) Specifies the properties that are fetched when objects of the specified type are instantiated.
Public method SetDefaultInitFields(Type, String[]) Specifies the properties that are fetched when objects of the specified type are instantiated.
Protected method SetParentImpl(SqlSmoObject) (Inherited from SqlSmoObject.)
Public method SetTraceFlag(Int32, Boolean) Sets a trace flag.
Public method ToString() Returns a String that represents the referenced object. (Inherited from SqlSmoObject.)
Protected method TouchImpl() (Inherited from SqlSmoObject.)
Protected method UnbindDefaultImpl(Boolean) (Inherited from SqlSmoObject.)
Protected method UnbindRuleImpl(Boolean) (Inherited from SqlSmoObject.)
Public method Validate(String, Object[]) (Inherited from SmoObjectBase.)
Top

Community Additions

ADD
Show:
© 2014 Microsoft