Server Server Server Class

Definition

Instance class encapsulating : Server[@Name='']

[Microsoft.SqlServer.Management.Facets.EvaluationMode(Microsoft.SqlServer.Management.Dmf.AutomatedPolicyEvaluationMode.CheckOnSchedule)]
[Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcElement(Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcElementFlags.Standalone | Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcElementFlags.SqlAzureDatabase)]
[Microsoft.SqlServer.Management.Sdk.Sfc.PhysicalFacet]
[Microsoft.SqlServer.Management.Sdk.Sfc.RootFacet(typeof(Microsoft.SqlServer.Management.Smo.Server))]
public sealed class Server : Microsoft.SqlServer.Management.Smo.SqlSmoObject, Microsoft.SqlServer.Management.Common.IAlterable, Microsoft.SqlServer.Management.Sdk.Sfc.IAlienRoot, Microsoft.SqlServer.Management.Sdk.Sfc.IDmfFacet, Microsoft.SqlServer.Management.Sdk.Sfc.ISfcDomainLite, Microsoft.SqlServer.Management.Sdk.Sfc.ISfcSupportsDesignMode, Microsoft.SqlServer.Management.Smo.IScriptable, Microsoft.SqlServer.Management.Smo.IServerInformation, Microsoft.SqlServer.Management.Smo.IServerSettings
type Server = class
    inherit SqlSmoObject
    interface ISfcSupportsDesignMode
    interface IAlterable
    interface IScriptable
    interface IServerSettings
    interface IServerInformation
    interface IDmfFacet
    interface IAlienRoot
    interface ISfcDomainLite
    interface ISfcHasConnection
Public NotInheritable Class Server
Inherits SqlSmoObject
Implements IAlienRoot, IAlterable, IDmfFacet, IScriptable, IServerInformation, IServerSettings, ISfcDomainLite, ISfcSupportsDesignMode
Inheritance
Attributes
EvaluationModeAttribute Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcElementAttribute PhysicalFacetAttribute RootFacetAttribute
Implements

Constructors

Server() Server() Server()
Server(ServerConnection) Server(ServerConnection) Server(ServerConnection)
Server(String) Server(String) Server(String)

Properties

ActiveDirectory ActiveDirectory ActiveDirectory
AffinityInfo AffinityInfo AffinityInfo
AuditLevel AuditLevel AuditLevel
Audits Audits Audits
AvailabilityGroups AvailabilityGroups AvailabilityGroups
BackupDevices BackupDevices BackupDevices
BackupDirectory BackupDirectory BackupDirectory
BrowserServiceAccount BrowserServiceAccount BrowserServiceAccount
BrowserStartMode BrowserStartMode BrowserStartMode
BuildClrVersion BuildClrVersion BuildClrVersion
BuildClrVersionString BuildClrVersionString BuildClrVersionString
BuildNumber BuildNumber BuildNumber
ClusterName ClusterName ClusterName
ClusterQuorumState ClusterQuorumState ClusterQuorumState
ClusterQuorumType ClusterQuorumType ClusterQuorumType
Collation Collation Collation
CollationID CollationID CollationID
ComparisonStyle ComparisonStyle ComparisonStyle
ComputerNamePhysicalNetBIOS ComputerNamePhysicalNetBIOS ComputerNamePhysicalNetBIOS
Configuration Configuration Configuration
ConnectionContext ConnectionContext ConnectionContext

connection context

Credentials Credentials Credentials
CryptographicProviders CryptographicProviders CryptographicProviders
DatabaseEngineEdition DatabaseEngineEdition DatabaseEngineEdition

Returns the DatabaseEngineEdition of the SMO object

(Inherited from SqlSmoObject)
DatabaseEngineType DatabaseEngineType DatabaseEngineType

Returns the DatabaseEngineType of the SMO object

(Inherited from SqlSmoObject)
Databases Databases Databases
DefaultAvailabilityGroupClusterType DefaultAvailabilityGroupClusterType DefaultAvailabilityGroupClusterType

Default availability group cluster type for the server

DefaultFile DefaultFile DefaultFile
DefaultLog DefaultLog DefaultLog
DefaultTextMode DefaultTextMode DefaultTextMode
Edition Edition Edition
Endpoints Endpoints Endpoints
EngineEdition EngineEdition EngineEdition
ErrorLogPath ErrorLogPath ErrorLogPath
ErrorLogSizeKb ErrorLogSizeKb ErrorLogSizeKb
Events Events Events
ExecuteForScalar ExecuteForScalar ExecuteForScalar Inherited from SqlSmoObject
ExecutionManager ExecutionManager ExecutionManager
FilestreamLevel FilestreamLevel FilestreamLevel
FilestreamShareName FilestreamShareName FilestreamShareName
FullTextService FullTextService FullTextService
HadrManagerStatus HadrManagerStatus HadrManagerStatus
HostDistribution HostDistribution HostDistribution
HostPlatform HostPlatform HostPlatform
HostRelease HostRelease HostRelease
HostServicePackLevel HostServicePackLevel HostServicePackLevel
HostSku HostSku HostSku
Information Information Information
InstallDataDirectory InstallDataDirectory InstallDataDirectory
InstallSharedDirectory InstallSharedDirectory InstallSharedDirectory
InstanceName InstanceName InstanceName
IsAvailabilityReplicaSeedingModeSupported IsAvailabilityReplicaSeedingModeSupported IsAvailabilityReplicaSeedingModeSupported
IsCaseSensitive IsCaseSensitive IsCaseSensitive
IsClustered IsClustered IsClustered
IsConfigurationOnlyAvailabilityReplicaSupported IsConfigurationOnlyAvailabilityReplicaSupported IsConfigurationOnlyAvailabilityReplicaSupported
IsCrossPlatformAvailabilityGroupSupported IsCrossPlatformAvailabilityGroupSupported IsCrossPlatformAvailabilityGroupSupported
IsFullTextInstalled IsFullTextInstalled IsFullTextInstalled
IsHadrEnabled IsHadrEnabled IsHadrEnabled
IsMemberOfWsfcCluster IsMemberOfWsfcCluster IsMemberOfWsfcCluster

Checks whether the server is a member of WSFC cluster

IsPolyBaseInstalled IsPolyBaseInstalled IsPolyBaseInstalled
IsReadOnlyListWithLoadBalancingSupported IsReadOnlyListWithLoadBalancingSupported IsReadOnlyListWithLoadBalancingSupported
IsSingleUser IsSingleUser IsSingleUser
IsTouched IsTouched IsTouched

Whether the object has been touched for unconditional scripting of Alter

(Inherited from SqlSmoObject)
IsXTPSupported IsXTPSupported IsXTPSupported
JobServer JobServer JobServer
Language Language Language
Languages Languages Languages
LinkedServers LinkedServers LinkedServers
LoginMode LoginMode LoginMode
Logins Logins Logins
Mail Mail Mail
MailProfile MailProfile MailProfile
MasterDBLogPath MasterDBLogPath MasterDBLogPath
MasterDBPath MasterDBPath MasterDBPath
MaxPrecision MaxPrecision MaxPrecision
Name Name Name
NamedPipesEnabled NamedPipesEnabled NamedPipesEnabled
NetName NetName NetName
NumberOfLogFiles NumberOfLogFiles NumberOfLogFiles
ObjectInSpace ObjectInSpace ObjectInSpace Inherited from SqlSmoObject
OleDbProviderSettings OleDbProviderSettings OleDbProviderSettings
OSVersion OSVersion OSVersion
PathSeparator PathSeparator PathSeparator
PerfMonMode PerfMonMode PerfMonMode
PhysicalMemory PhysicalMemory PhysicalMemory
PhysicalMemoryUsageInKB PhysicalMemoryUsageInKB PhysicalMemoryUsageInKB
Platform Platform Platform
Processors Processors Processors
ProcessorUsage ProcessorUsage ProcessorUsage
Product Product Product
ProductLevel ProductLevel ProductLevel
Properties Properties Properties Inherited from SqlSmoObject
ProxyAccount ProxyAccount ProxyAccount
ResourceGovernor ResourceGovernor ResourceGovernor
ResourceLastUpdateDateTime ResourceLastUpdateDateTime ResourceLastUpdateDateTime
ResourceVersion ResourceVersion ResourceVersion
ResourceVersionString ResourceVersionString ResourceVersionString
Roles Roles Roles
RootDirectory RootDirectory RootDirectory
ScalarResult ScalarResult ScalarResult Inherited from SqlSmoObject
ServerAuditSpecifications ServerAuditSpecifications ServerAuditSpecifications
ServerType ServerType ServerType
ServiceAccount ServiceAccount ServiceAccount
ServiceInstanceId ServiceInstanceId ServiceInstanceId
ServiceMasterKey ServiceMasterKey ServiceMasterKey
ServiceName ServiceName ServiceName
ServiceStartMode ServiceStartMode ServiceStartMode
Settings Settings Settings
SmartAdmin SmartAdmin SmartAdmin
SqlCharSet SqlCharSet SqlCharSet
SqlCharSetName SqlCharSetName SqlCharSetName
SqlDomainGroup SqlDomainGroup SqlDomainGroup
SqlSortOrder SqlSortOrder SqlSortOrder
SqlSortOrderName SqlSortOrderName SqlSortOrderName
State State State

Returns the state of the object

(Inherited from SmoObjectBase)
Status Status Status
SupportedAvailabilityGroupClusterTypes SupportedAvailabilityGroupClusterTypes SupportedAvailabilityGroupClusterTypes

Gets the supported availability group cluster types for the server

SystemDataTypes SystemDataTypes SystemDataTypes
SystemMessages SystemMessages SystemMessages
TapeLoadWaitTime TapeLoadWaitTime TapeLoadWaitTime
TcpEnabled TcpEnabled TcpEnabled
Triggers Triggers Triggers
Urn Urn Urn

Returns the Urn of the object, computed on the fly

(Inherited from SqlSmoObject)
UserData UserData UserData Inherited from SmoObjectBase
UserDefinedMessages UserDefinedMessages UserDefinedMessages
UserOptions UserOptions UserOptions
Version Version Version
VersionMajor VersionMajor VersionMajor
VersionMinor VersionMinor VersionMinor
VersionString VersionString VersionString

Methods

AddDatabaseContext(StringCollection) AddDatabaseContext(StringCollection) AddDatabaseContext(StringCollection)

method get called from the create script related method (from derived classes like Table, Index etc..)

(Inherited from SqlSmoObject)
Alter() Alter() Alter()

Alter the metadata for the server, including dependent child objects such as Configuration, Information, and Settings. The Configuration class will not override value checking with this call.

Alter(Boolean) Alter(Boolean) Alter(Boolean)

Alter the metadata for the server, including dependent child objects such as Configuration, Information, and Settings.

AlterImpl() AlterImpl() AlterImpl() Inherited from SqlSmoObject
AlterImplWorker() AlterImplWorker() AlterImplWorker() Inherited from SqlSmoObject
AttachDatabase(String, StringCollection) AttachDatabase(String, StringCollection) AttachDatabase(String, StringCollection)

Attach Database

AttachDatabase(String, StringCollection, AttachOptions) AttachDatabase(String, StringCollection, AttachOptions) AttachDatabase(String, StringCollection, AttachOptions)

Attach Database

AttachDatabase(String, StringCollection, String) AttachDatabase(String, StringCollection, String) AttachDatabase(String, StringCollection, String)

Attach Database

AttachDatabase(String, StringCollection, String, AttachOptions) AttachDatabase(String, StringCollection, String, AttachOptions) AttachDatabase(String, StringCollection, String, AttachOptions)

Attach Database

BindDefaultImpl(String, String, Boolean) BindDefaultImpl(String, String, Boolean) BindDefaultImpl(String, String, Boolean) Inherited from SqlSmoObject
BindRuleImpl(String, String, Boolean) BindRuleImpl(String, String, Boolean) BindRuleImpl(String, String, Boolean) Inherited from SqlSmoObject
CheckObjectState() CheckObjectState() CheckObjectState() Inherited from SqlSmoObject
CheckObjectState(Boolean) CheckObjectState(Boolean) CheckObjectState(Boolean)

This is a virtual function, so that derived classes can override it if they want to do additional checks on the state of the object

(Inherited from SqlSmoObject)
CheckObjectStateImpl(Boolean) CheckObjectStateImpl(Boolean) CheckObjectStateImpl(Boolean)

Checks object state Because it is not recusrive, this function can be called directly and which means derived classes can't supply their own validation

(Inherited from SqlSmoObject)
CleanObject() CleanObject() CleanObject() Inherited from SqlSmoObject
CompareUrn(Urn, Urn) CompareUrn(Urn, Urn) CompareUrn(Urn, Urn)

Compares two Urn's, taking into account the collations on the server

CreateImpl() CreateImpl() CreateImpl() Inherited from SqlSmoObject
CreateOrAlterImpl() CreateOrAlterImpl() CreateOrAlterImpl() Inherited from SqlSmoObject
DeleteBackupHistory(DateTime) DeleteBackupHistory(DateTime) DeleteBackupHistory(DateTime)

Deletes the entries in the backup and restore history tables for backup sets older than oldestDate

DeleteBackupHistory(Int32) DeleteBackupHistory(Int32) DeleteBackupHistory(Int32)

Deletes the entries in the backup and restore history tables for backup sets on mediaSetID

DeleteBackupHistory(String) DeleteBackupHistory(String) DeleteBackupHistory(String)

Deletes the entries in the backup and restore history tables for database

Deny(ServerPermissionSet, String) Deny(ServerPermissionSet, String) Deny(ServerPermissionSet, String)
Deny(ServerPermissionSet, String, Boolean) Deny(ServerPermissionSet, String, Boolean) Deny(ServerPermissionSet, String, Boolean)
Deny(ServerPermissionSet, String[]) Deny(ServerPermissionSet, String[]) Deny(ServerPermissionSet, String[])
Deny(ServerPermissionSet, String[], Boolean) Deny(ServerPermissionSet, String[], Boolean) Deny(ServerPermissionSet, String[], Boolean)
DetachDatabase(String, Boolean) DetachDatabase(String, Boolean) DetachDatabase(String, Boolean)

Detach a database

DetachDatabase(String, Boolean, Boolean) DetachDatabase(String, Boolean, Boolean) DetachDatabase(String, Boolean, Boolean)

Detach a database

DetachedDatabaseInfo(String) DetachedDatabaseInfo(String) DetachedDatabaseInfo(String)

The DetachedDBInfo method returns information about a detached database.

Discover() Discover() Discover()

Best Effort Discovery mechanism : This method reflects upon metadata and gets all available objects

(Inherited from SqlSmoObject)
DropImpl(Boolean) DropImpl(Boolean) DropImpl(Boolean)

drops the object

(Inherited from SqlSmoObject)
DropImplWorker(Urn, Boolean) DropImplWorker(Urn, Boolean) DropImplWorker(Urn, Boolean)

drops the object

(Inherited from SqlSmoObject)
EnumActiveCurrentSessionTraceFlags() EnumActiveCurrentSessionTraceFlags() EnumActiveCurrentSessionTraceFlags()
EnumActiveGlobalTraceFlags() EnumActiveGlobalTraceFlags() EnumActiveGlobalTraceFlags()

Enumerate all active global trace flags set for SQL Instance and return them as DataTable

EnumAvailableMedia() EnumAvailableMedia() EnumAvailableMedia()
EnumAvailableMedia(MediaTypes) EnumAvailableMedia(MediaTypes) EnumAvailableMedia(MediaTypes)
EnumClusterMembersState() EnumClusterMembersState() EnumClusterMembersState()

Enumerate the current state of the Windows cluster members of which the instance is a part of.

EnumClusterSubnets() EnumClusterSubnets() EnumClusterSubnets()

Enumerate the current state of the Windows cluster members of which the instance is a part of.

EnumCollations() EnumCollations() EnumCollations()
EnumDatabaseMirrorWitnessRoles() EnumDatabaseMirrorWitnessRoles() EnumDatabaseMirrorWitnessRoles()

Enumerates the witness roles the server plays in a database mirroring partnership

EnumDatabaseMirrorWitnessRoles(String) EnumDatabaseMirrorWitnessRoles(String) EnumDatabaseMirrorWitnessRoles(String)
EnumDetachedDatabaseFiles(String) EnumDetachedDatabaseFiles(String) EnumDetachedDatabaseFiles(String)

The ListDetachedDBFiles method lists all database files referenced by a primary database file.

EnumDetachedLogFiles(String) EnumDetachedLogFiles(String) EnumDetachedLogFiles(String)

The ListDetachedLogFiles method lists all log files referenced by primary log file.

EnumDirectories(String) EnumDirectories(String) EnumDirectories(String)
EnumErrorLogs() EnumErrorLogs() EnumErrorLogs()
EnumLocks() EnumLocks() EnumLocks()
EnumLocks(Int32) EnumLocks(Int32) EnumLocks(Int32)
EnumMembers(RoleTypes) EnumMembers(RoleTypes) EnumMembers(RoleTypes)

The ListMembers method returns a NameList object that enumerates the Microsoft� SQL Server� 2000 server or database roles in which the SQLServer object login has membership. For SDS, there is no concept of server roles. Depending on the connection to the databases, we will get information about membership in the database roles. There are two special database roles in master database in SDS, sds_securityadmin and sds_dbcreator, membership of whose can only be got while connected to master database.

EnumObjectPermissions() EnumObjectPermissions() EnumObjectPermissions()
EnumObjectPermissions(ObjectPermissionSet) EnumObjectPermissions(ObjectPermissionSet) EnumObjectPermissions(ObjectPermissionSet)
EnumObjectPermissions(String) EnumObjectPermissions(String) EnumObjectPermissions(String)
EnumObjectPermissions(String, ObjectPermissionSet) EnumObjectPermissions(String, ObjectPermissionSet) EnumObjectPermissions(String, ObjectPermissionSet)
EnumPerformanceCounters() EnumPerformanceCounters() EnumPerformanceCounters()
EnumPerformanceCounters(String) EnumPerformanceCounters(String) EnumPerformanceCounters(String)
EnumPerformanceCounters(String, String) EnumPerformanceCounters(String, String) EnumPerformanceCounters(String, String)
EnumPerformanceCounters(String, String, String) EnumPerformanceCounters(String, String, String) EnumPerformanceCounters(String, String, String)
EnumProcesses() EnumProcesses() EnumProcesses()
EnumProcesses(Boolean) EnumProcesses(Boolean) EnumProcesses(Boolean)

enumerate processes optionaly excluting the system processes

EnumProcesses(Int32) EnumProcesses(Int32) EnumProcesses(Int32)
EnumProcesses(String) EnumProcesses(String) EnumProcesses(String)
EnumServerAttributes() EnumServerAttributes() EnumServerAttributes()
EnumServerPermissions() EnumServerPermissions() EnumServerPermissions()
EnumServerPermissions(ServerPermissionSet) EnumServerPermissions(ServerPermissionSet) EnumServerPermissions(ServerPermissionSet)
EnumServerPermissions(String) EnumServerPermissions(String) EnumServerPermissions(String)
EnumServerPermissions(String, ServerPermissionSet) EnumServerPermissions(String, ServerPermissionSet) EnumServerPermissions(String, ServerPermissionSet)
EnumStartupProcedures() EnumStartupProcedures() EnumStartupProcedures()
EnumWindowsDomainGroups() EnumWindowsDomainGroups() EnumWindowsDomainGroups()
EnumWindowsDomainGroups(String) EnumWindowsDomainGroups(String) EnumWindowsDomainGroups(String)
EnumWindowsGroupInfo() EnumWindowsGroupInfo() EnumWindowsGroupInfo()
EnumWindowsGroupInfo(String) EnumWindowsGroupInfo(String) EnumWindowsGroupInfo(String)
EnumWindowsGroupInfo(String, Boolean) EnumWindowsGroupInfo(String, Boolean) EnumWindowsGroupInfo(String, Boolean)
EnumWindowsUserInfo() EnumWindowsUserInfo() EnumWindowsUserInfo()
EnumWindowsUserInfo(String) EnumWindowsUserInfo(String) EnumWindowsUserInfo(String)
EnumWindowsUserInfo(String, Boolean) EnumWindowsUserInfo(String, Boolean) EnumWindowsUserInfo(String, Boolean)
ExecuteNonQuery(StringCollection, Boolean, Boolean) ExecuteNonQuery(StringCollection, Boolean, Boolean) ExecuteNonQuery(StringCollection, Boolean, Boolean)

Executes sql statements

(Inherited from SqlSmoObject)
ExecuteWithModes(SqlExecutionModes, Action) ExecuteWithModes(SqlExecutionModes, Action) ExecuteWithModes(SqlExecutionModes, Action)

Executes the given action under the given execution modes.

Resets the original modes after the action completes or fails.

(Inherited from SqlSmoObject)
FileExists(String) FileExists(String) FileExists(String)

Checks whether the specified file exists

FormatSqlVariant(Object) FormatSqlVariant(Object) FormatSqlVariant(Object) Inherited from SqlSmoObject
GenerateAlterEvent() GenerateAlterEvent() GenerateAlterEvent() Inherited from SqlSmoObject
GenerateAlterEvent(Urn, Object) GenerateAlterEvent(Urn, Object) GenerateAlterEvent(Urn, Object) Inherited from SqlSmoObject
GetActiveDBConnectionCount(String) GetActiveDBConnectionCount(String) GetActiveDBConnectionCount(String)
GetContextDB() GetContextDB() GetContextDB() Inherited from SqlSmoObject
GetDBName() GetDBName() GetDBName() Inherited from SqlSmoObject
GetDefaultInitFields(Type) GetDefaultInitFields(Type) GetDefaultInitFields(Type)

returns a clone of the default init fields. This function will be deprecated. Please use the overload function.

GetDefaultInitFields(Type, DatabaseEngineEdition) GetDefaultInitFields(Type, DatabaseEngineEdition) GetDefaultInitFields(Type, DatabaseEngineEdition)

returns a clone of the default init fields

GetFragOptionString(FragmentationOption) GetFragOptionString(FragmentationOption) GetFragOptionString(FragmentationOption) Inherited from SqlSmoObject
GetPropertyNames(Type, DatabaseEngineEdition) GetPropertyNames(Type, DatabaseEngineEdition) GetPropertyNames(Type, DatabaseEngineEdition)

Get the Property field supported by given object type

GetPropValue(String) GetPropValue(String) GetPropValue(String)

Retrieve the property value from : - The property bag directly if property is available (dirty or retrieved) - A call to our OnPropertyMissing method otherwise

Will throw an exception if the property value is NULL in either case.

(Inherited from SqlSmoObject)
GetPropValueOptional(String) GetPropValueOptional(String) GetPropValueOptional(String)

Retrieve the property value from : - The property bag if the state is creating or we're in Design Mode (possible NULL value) - A call to our OnPropertyMissing method otherwise (will throw exception if value is NULL)

(Inherited from SqlSmoObject)
GetPropValueOptionalAllowNull(String) GetPropValueOptionalAllowNull(String) GetPropValueOptionalAllowNull(String)

Retrieve the property value from : - The property bag if the state is creating or we're in Design Mode (possible NULL) - A call to our OnPropertyMissing method otherwise (possible NULL)

(Inherited from SqlSmoObject)
GetRealValue(Property, Object) GetRealValue(Property, Object) GetRealValue(Property, Object)

Returns the real value for the property.

(Inherited from SqlSmoObject)
GetServerName() GetServerName() GetServerName() Inherited from SqlSmoObject
GetServerObject() GetServerObject() GetServerObject() Inherited from SqlSmoObject
GetSmoObject(Urn) GetSmoObject(Urn) GetSmoObject(Urn)

Returns the object with the corresponding Urn

GetSqlServerVersionName() GetSqlServerVersionName() GetSqlServerVersionName()

Gets the sqlserver public name for the current connection, e.g: will transfer "SQLTOOLS2008-2" to "SQL Server 2008".

(Inherited from SqlSmoObject)
GetStringComparer(String) GetStringComparer(String) GetStringComparer(String)

Returns the comparer object corresponding to the collation string passed.

GetUrnRecursive(StringBuilder) GetUrnRecursive(StringBuilder) GetUrnRecursive(StringBuilder)

Computes the Urn for the object.

(Inherited from SqlSmoObject)
GetUrnRecursive(StringBuilder, UrnIdOption) GetUrnRecursive(StringBuilder, UrnIdOption) GetUrnRecursive(StringBuilder, UrnIdOption)

Computes the Urn for the object, potentially including other fields in the definition besides the key fields.

(Inherited from SqlSmoObject)
Grant(ServerPermissionSet, String) Grant(ServerPermissionSet, String) Grant(ServerPermissionSet, String)
Grant(ServerPermissionSet, String, Boolean) Grant(ServerPermissionSet, String, Boolean) Grant(ServerPermissionSet, String, Boolean)
Grant(ServerPermissionSet, String, Boolean, String) Grant(ServerPermissionSet, String, Boolean, String) Grant(ServerPermissionSet, String, Boolean, String)
Grant(ServerPermissionSet, String[]) Grant(ServerPermissionSet, String[]) Grant(ServerPermissionSet, String[])
Grant(ServerPermissionSet, String[], Boolean) Grant(ServerPermissionSet, String[], Boolean) Grant(ServerPermissionSet, String[], Boolean)
Grant(ServerPermissionSet, String[], Boolean, String) Grant(ServerPermissionSet, String[], Boolean, String) Grant(ServerPermissionSet, String[], Boolean, String)
GrantAvailabilityGroupCreateDatabasePrivilege(String) GrantAvailabilityGroupCreateDatabasePrivilege(String) GrantAvailabilityGroupCreateDatabasePrivilege(String)

This method is called on a secondary replica that has joined the availability group to grant availability group create database privilege for automatic seeding to work

ImplInitialize(String[], OrderBy[]) ImplInitialize(String[], OrderBy[]) ImplInitialize(String[], OrderBy[]) Inherited from SqlSmoObject
Initialize() Initialize() Initialize() Inherited from SqlSmoObject
Initialize(Boolean) Initialize(Boolean) Initialize(Boolean)

Initializes the object, by reading its properties from the enumerator

(Inherited from SqlSmoObject)
IsDetachedPrimaryFile(String) IsDetachedPrimaryFile(String) IsDetachedPrimaryFile(String)

The IsDetachedPrimaryFile method specifies whether a file is a detached primary database file.

IsExpressSku() IsExpressSku() IsExpressSku()

Returns whether the server containing this object is an Express SKU

(Inherited from SqlSmoObject)
IsObjectDirty() IsObjectDirty() IsObjectDirty() Inherited from SqlSmoObject
IsObjectInitialized() IsObjectInitialized() IsObjectInitialized() Inherited from SqlSmoObject
IsObjectInSpace() IsObjectInSpace() IsObjectInSpace() Inherited from SqlSmoObject
IsSupportedProperty(String) IsSupportedProperty(String) IsSupportedProperty(String)

Validate whether the specified property is supported in current server environment

(Inherited from SqlSmoObject)
IsTraceFlagOn(Int32, Boolean) IsTraceFlagOn(Int32, Boolean) IsTraceFlagOn(Int32, Boolean)

Checks whether a trace flag is enabled on the server

IsVersion80SP3() IsVersion80SP3() IsVersion80SP3() Inherited from SqlSmoObject
IsVersion90AndAbove() IsVersion90AndAbove() IsVersion90AndAbove() Inherited from SqlSmoObject
IsWindowsGroupMember(String, String) IsWindowsGroupMember(String, String) IsWindowsGroupMember(String, String)

The IsNTGroupMember method exposes an instance of Microsoft� SQL Server� 2000 access rights for Windows NT� 4.0 or Microsoft Windows 2000 user accounts. Cloud for now doesn't support windows logins. And Sql logins can't be member of any windows group. Hence this method is not supported for Cloud.

JoinAvailabilityGroup(String) JoinAvailabilityGroup(String) JoinAvailabilityGroup(String)

This method is called on a secondary replica that has been added to an Availability Group from a primary to complete the handshake. Upon successful execution the instance will become a functioning replica in the availability group.

JoinAvailabilityGroup(String, AvailabilityGroupClusterType) JoinAvailabilityGroup(String, AvailabilityGroupClusterType) JoinAvailabilityGroup(String, AvailabilityGroupClusterType)

This method is called on a secondary replica that has been added to an Availability Group from a primary to complete the handshake. Upon successful execution the instance will become a functioning replica in the availability group.

KillAllProcesses(String) KillAllProcesses(String) KillAllProcesses(String)

Kills all user processes that are using the given database.

KillDatabase(String) KillDatabase(String) KillDatabase(String)

Drops a database. If users are connected to it their connections will be dropped.

KillProcess(Int32) KillProcess(Int32) KillProcess(Int32)
MarkDropped() MarkDropped() MarkDropped() Inherited from SqlSmoObject
MarkForDropImpl(Boolean) MarkForDropImpl(Boolean) MarkForDropImpl(Boolean) Inherited from SqlSmoObject
ParentDirectoryExists(String) ParentDirectoryExists(String) ParentDirectoryExists(String)

Checks whether the parent directory of the specified file exists

PingSqlServerVersion(String) PingSqlServerVersion(String) PingSqlServerVersion(String)

will connect to the specified serve, retrieve the version string, and disconnect before return to the caller This allows caller to ping the SQLServer version Expensive because we need to make a connection to get the info, call only when necessary

PingSqlServerVersion(String, String, String) PingSqlServerVersion(String, String, String) PingSqlServerVersion(String, String, String)

will connect to the specified serve, retrieve the version string, and disconnect before return to the caller This allows caller to ping the SQLServer version Expensive because we need to make a connection to get the info, call only when necessary

PostAlter() PostAlter() PostAlter()

this function is meant to be overriden by derived classes, if they have to do supplimentary actions after altering the object

(Inherited from SqlSmoObject)
PostCreate() PostCreate() PostCreate()

this function is meant to be overriden by derived classes, if they have to do supplimentary actions after object creation

(Inherited from SqlSmoObject)
PostDrop() PostDrop() PostDrop()

this function is meant to be overriden by derived classes, if they have to do supplimentary actions after dropping the object

(Inherited from SqlSmoObject)
ReadErrorLog() ReadErrorLog() ReadErrorLog()
ReadErrorLog(Int32) ReadErrorLog(Int32) ReadErrorLog(Int32)
Refresh() Refresh() Refresh()
Revoke(ServerPermissionSet, String) Revoke(ServerPermissionSet, String) Revoke(ServerPermissionSet, String)
Revoke(ServerPermissionSet, String, Boolean, Boolean) Revoke(ServerPermissionSet, String, Boolean, Boolean) Revoke(ServerPermissionSet, String, Boolean, Boolean)
Revoke(ServerPermissionSet, String, Boolean, Boolean, String) Revoke(ServerPermissionSet, String, Boolean, Boolean, String) Revoke(ServerPermissionSet, String, Boolean, Boolean, String)
Revoke(ServerPermissionSet, String[]) Revoke(ServerPermissionSet, String[]) Revoke(ServerPermissionSet, String[])
Revoke(ServerPermissionSet, String[], Boolean, Boolean) Revoke(ServerPermissionSet, String[], Boolean, Boolean) Revoke(ServerPermissionSet, String[], Boolean, Boolean)
Revoke(ServerPermissionSet, String[], Boolean, Boolean, String) Revoke(ServerPermissionSet, String[], Boolean, Boolean, String) Revoke(ServerPermissionSet, String[], Boolean, Boolean, String)
RevokeAvailabilityGroupCreateDatabasePrivilege(String) RevokeAvailabilityGroupCreateDatabasePrivilege(String) RevokeAvailabilityGroupCreateDatabasePrivilege(String)

Revoke the create database privilege of the specified availability group

Script() Script() Script()
Script(ScriptingOptions) Script(ScriptingOptions) Script(ScriptingOptions)
ScriptImpl() ScriptImpl() ScriptImpl() Inherited from SqlSmoObject
ScriptImpl(ScriptingOptions) ScriptImpl(ScriptingOptions) ScriptImpl(ScriptingOptions)

Returns a StringCollection object with the script for the object. This method throws an error if ScriptData is true

(Inherited from SqlSmoObject)
SetAccessToken(IRenewableToken) SetAccessToken(IRenewableToken) SetAccessToken(IRenewableToken)

Set the accessToken for connection.

(Inherited from SqlSmoObject)
SetDefaultInitFields(Boolean) SetDefaultInitFields(Boolean) SetDefaultInitFields(Boolean)
SetDefaultInitFields(Type, Boolean) SetDefaultInitFields(Type, Boolean) SetDefaultInitFields(Type, Boolean)

Set the default fields of the given object type. This function will be deprecated. Please use the overload function.

SetDefaultInitFields(Type, Boolean, DatabaseEngineEdition) SetDefaultInitFields(Type, Boolean, DatabaseEngineEdition) SetDefaultInitFields(Type, Boolean, DatabaseEngineEdition)

Set the default fields of the given object type

SetDefaultInitFields(Type, DatabaseEngineEdition, String[]) SetDefaultInitFields(Type, DatabaseEngineEdition, String[]) SetDefaultInitFields(Type, DatabaseEngineEdition, String[])

Set the default fields of the given object type

SetDefaultInitFields(Type, StringCollection) SetDefaultInitFields(Type, StringCollection) SetDefaultInitFields(Type, StringCollection)

Set the default for the fields of the given object type. This function will be deprecated. Please use the overload function.

SetDefaultInitFields(Type, StringCollection, DatabaseEngineEdition) SetDefaultInitFields(Type, StringCollection, DatabaseEngineEdition) SetDefaultInitFields(Type, StringCollection, DatabaseEngineEdition)

Set the default fields of the given object type

SetDefaultInitFields(Type, String[]) SetDefaultInitFields(Type, String[]) SetDefaultInitFields(Type, String[])

Set the default fields of the given object type. This function will be deprecated. Please use the overload function.

SetParentImpl(SqlSmoObject) SetParentImpl(SqlSmoObject) SetParentImpl(SqlSmoObject) Inherited from SqlSmoObject
SetTraceFlag(Int32, Boolean) SetTraceFlag(Int32, Boolean) SetTraceFlag(Int32, Boolean)
ThrowIfAboveVersion100(String) ThrowIfAboveVersion100(String) ThrowIfAboveVersion100(String)

Throws an exception if the ServerVersion major version for this object is above 10.0 (SQL 2008)

(Inherited from SqlSmoObject)
ThrowIfAboveVersion80(String) ThrowIfAboveVersion80(String) ThrowIfAboveVersion80(String)

Throws an exception if the ServerVersion major version for this object is above 8.0 (SQL 2000)

(Inherited from SqlSmoObject)
ThrowIfBelowVersion100(String) ThrowIfBelowVersion100(String) ThrowIfBelowVersion100(String)

Throws an exception if the ServerVersion major version for this object is below 10.0 (SQL 2008)

(Inherited from SqlSmoObject)
ThrowIfBelowVersion110(String) ThrowIfBelowVersion110(String) ThrowIfBelowVersion110(String)

Throws an UnsupportedVersionException if either the source or destination server is below 11.0 (SQL 2012)

(Inherited from SqlSmoObject)
ThrowIfBelowVersion110Prop(String) ThrowIfBelowVersion110Prop(String) ThrowIfBelowVersion110Prop(String)

Throws an exception with text saying the specified property is not supported if the ServerVersion major version for this object is below 11.0 (SQL 2012)

(Inherited from SqlSmoObject)
ThrowIfBelowVersion120(String) ThrowIfBelowVersion120(String) ThrowIfBelowVersion120(String)

Throws an exception if the ServerVersion major version for this object is below 12.0 (SQL 2014)

(Inherited from SqlSmoObject)
ThrowIfBelowVersion120Prop(String) ThrowIfBelowVersion120Prop(String) ThrowIfBelowVersion120Prop(String)

Throws an exception with text saying the specified property is not supported if the ServerVersion major version for this object is below 12.0 (SQL 2014)

(Inherited from SqlSmoObject)
ThrowIfBelowVersion130(String) ThrowIfBelowVersion130(String) ThrowIfBelowVersion130(String)

Throws an exception if the ServerVersion major version for this object is below 13.0 (SQL 2016)

(Inherited from SqlSmoObject)
ThrowIfBelowVersion130Prop(String) ThrowIfBelowVersion130Prop(String) ThrowIfBelowVersion130Prop(String)

Throws an exception with text saying the specified property is not supported if the ServerVersion major version for this object is below 13.0 (SQL 2016)

(Inherited from SqlSmoObject)
ThrowIfBelowVersion140(String) ThrowIfBelowVersion140(String) ThrowIfBelowVersion140(String)

Throws an exception if the ServerVersion major version for this object is below 14.0 (SQL 2017)

(Inherited from SqlSmoObject)
ThrowIfBelowVersion140Prop(String) ThrowIfBelowVersion140Prop(String) ThrowIfBelowVersion140Prop(String)

Throws an exception with text saying the specified property is not supported if the ServerVersion major version for this object is below 14.0 (SQL 2017)

(Inherited from SqlSmoObject)
ThrowIfBelowVersion80(String) ThrowIfBelowVersion80(String) ThrowIfBelowVersion80(String)

Throws an exception if the ServerVersion major version for this object is below 8.0 (SQL 2000)

(Inherited from SqlSmoObject)
ThrowIfBelowVersion80SP3() ThrowIfBelowVersion80SP3() ThrowIfBelowVersion80SP3()

Throws an exception if the ServerVersion for this object is below 8.760 (8.0 SP3)

(Inherited from SqlSmoObject)
ThrowIfBelowVersion90(String) ThrowIfBelowVersion90(String) ThrowIfBelowVersion90(String)

Throws an exception if the ServerVersion major version for this object is below 9.0 (SQL 2005)

(Inherited from SqlSmoObject)
ToString() ToString() ToString() Inherited from SqlSmoObject
Touch() Touch() Touch()

Mark the object "touched" for unconditional scripting of Alter.

(Inherited from SqlSmoObject)
TouchImpl() TouchImpl() TouchImpl()

Virtual method to allow derived classes to do additional work when touched.

(Inherited from SqlSmoObject)
UnbindDefaultImpl(Boolean) UnbindDefaultImpl(Boolean) UnbindDefaultImpl(Boolean) Inherited from SqlSmoObject
UnbindRuleImpl(Boolean) UnbindRuleImpl(Boolean) UnbindRuleImpl(Boolean) Inherited from SqlSmoObject
Validate(String, Object[]) Validate(String, Object[]) Validate(String, Object[]) Inherited from SmoObjectBase

Explicit Interface Implementations

IAlienObject.Discover() IAlienObject.Discover() IAlienObject.Discover() Inherited from SqlSmoObject
IAlienObject.GetDomainRoot() IAlienObject.GetDomainRoot() IAlienObject.GetDomainRoot() Inherited from SqlSmoObject
IAlienObject.GetParent() IAlienObject.GetParent() IAlienObject.GetParent() Inherited from SqlSmoObject
IAlienObject.GetPropertyType(String) IAlienObject.GetPropertyType(String) IAlienObject.GetPropertyType(String)

Discovers type of property.

(Inherited from SqlSmoObject)
IAlienObject.GetPropertyValue(String, Type) IAlienObject.GetPropertyValue(String, Type) IAlienObject.GetPropertyValue(String, Type)

Retrieves value for a given property. Throws if property is not found.

(Inherited from SqlSmoObject)
IAlienObject.GetUrn() IAlienObject.GetUrn() IAlienObject.GetUrn() Inherited from SqlSmoObject
IAlienObject.Resolve(String) IAlienObject.Resolve(String) IAlienObject.Resolve(String) Inherited from SqlSmoObject
IAlienObject.SetObjectState(SfcObjectState) IAlienObject.SetObjectState(SfcObjectState) IAlienObject.SetObjectState(SfcObjectState)

Sets state of this object based on provided SfcObjectState.

(Inherited from SqlSmoObject)
IAlienObject.SetPropertyValue(String, Type, Object) IAlienObject.SetPropertyValue(String, Type, Object) IAlienObject.SetPropertyValue(String, Type, Object)

Sets the value of given property, if it is writable. If property is not in property bag, reflection is used. Throws exception if the property is not found.

(Inherited from SqlSmoObject)
IAlienRoot.DesignModeInitialize() IAlienRoot.DesignModeInitialize() IAlienRoot.DesignModeInitialize()
IAlienRoot.SfcHelper_GetDataTable(Object, String, String[], OrderBy[]) IAlienRoot.SfcHelper_GetDataTable(Object, String, String[], OrderBy[]) IAlienRoot.SfcHelper_GetDataTable(Object, String, String[], OrderBy[])

Helper for SFC. Ask Enumerator for a DataTable of results given a Urn.

IAlienRoot.SfcHelper_GetSmoObject(String) IAlienRoot.SfcHelper_GetSmoObject(String) IAlienRoot.SfcHelper_GetSmoObject(String)

Returns the object with the corresponding Urn in string form

IAlienRoot.SfcHelper_GetSmoObjectQuery(String, String[], OrderBy[]) IAlienRoot.SfcHelper_GetSmoObjectQuery(String, String[], OrderBy[]) IAlienRoot.SfcHelper_GetSmoObjectQuery(String, String[], OrderBy[])

Helper for SFC. Query and iterator/enumerator interfaces should be the level we abstract at, but for now we make sure caching via InitChildLevel is done while we still give back the list of Urns.

ISfcDomainLite.DomainInstanceName ISfcDomainLite.DomainInstanceName ISfcDomainLite.DomainInstanceName

Returns the instance name of this domain

ISfcDomainLite.DomainName ISfcDomainLite.DomainName ISfcDomainLite.DomainName

Returns the SMO domain name

ISfcDomainLite.GetLogicalVersion() ISfcDomainLite.GetLogicalVersion() ISfcDomainLite.GetLogicalVersion()

Returns logical version of SMO object model schema

ISfcHasConnection.ConnectionContext ISfcHasConnection.ConnectionContext ISfcHasConnection.ConnectionContext
ISfcHasConnection.GetConnection() ISfcHasConnection.GetConnection() ISfcHasConnection.GetConnection()
ISfcHasConnection.GetConnection(SfcObjectQueryMode) ISfcHasConnection.GetConnection(SfcObjectQueryMode) ISfcHasConnection.GetConnection(SfcObjectQueryMode)
ISfcHasConnection.SetConnection(ISfcConnection) ISfcHasConnection.SetConnection(ISfcConnection) ISfcHasConnection.SetConnection(ISfcConnection)
ISfcPropertyProvider.GetPropertySet() ISfcPropertyProvider.GetPropertySet() ISfcPropertyProvider.GetPropertySet() Inherited from SqlSmoObject
ISfcSupportsDesignMode.IsDesignMode ISfcSupportsDesignMode.IsDesignMode ISfcSupportsDesignMode.IsDesignMode

This object extend ISfcSupportsDesignMode.

Fields

m_ExtendedProperties m_ExtendedProperties m_ExtendedProperties Inherited from SqlSmoObject
singletonParent singletonParent singletonParent

Regular SMO objects access the parent class reference through parentColl (corresponding collection in parent class). Singleton class has no collection in parent.

(Inherited from SqlSmoObject)

Events

PropertyChanged PropertyChanged PropertyChanged Inherited from SqlSmoObject
PropertyMetadataChanged PropertyMetadataChanged PropertyMetadataChanged Inherited from SqlSmoObject

Applies to