Język

Service Members

The Service class represents an instance of the SQL Server service.

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

Public Properties

  Name Description
ms220784.pubproperty(pl-pl,SQL.100).gif AcceptsPause Gets the Boolean property value that specifies whether the SQL Server service can be paused.
ms220784.pubproperty(pl-pl,SQL.100).gif AcceptsStop Gets the Boolean property value that specifies whether the SQL Server service can be stopped.
ms220784.pubproperty(pl-pl,SQL.100).gif AdvancedProperties Represents a collection of Property objects. Each Property object represents an advanced property defined on the SQL Server service.
ms220784.pubproperty(pl-pl,SQL.100).gif Dependencies Returns a list of services that are dependent on the referenced SQL Server service.
ms220784.pubproperty(pl-pl,SQL.100).gif Description Gets a textual description of the SQL Server service.
ms220784.pubproperty(pl-pl,SQL.100).gif DisplayName Gets the display name of the SQL Server service.
ms220784.pubproperty(pl-pl,SQL.100).gif ErrorControl Gets the severity of the error if the SQL Server service fails to start during startup.
ms220784.pubproperty(pl-pl,SQL.100).gif ExitCode Gets the Win32 error code that defines problems encountered when starting and stopping the SQL Server service.
ms220784.pubproperty(pl-pl,SQL.100).gif Name  Gets or sets the name of the referenced Windows Management Instrumentation (WMI) object. (inherited from WmiSmoObject)
ms220784.pubproperty(pl-pl,SQL.100).gif Parent Gets the ManagedComputer object that is the parent of the Service object.
ms220784.pubproperty(pl-pl,SQL.100).gif PathName Gets the path and file name of the binary file that implements the SQL Server service.
ms220784.pubproperty(pl-pl,SQL.100).gif ProcessId Gets the process ID that uniquely identifies the SQL Server service.
ms220784.pubproperty(pl-pl,SQL.100).gif Properties  Represents a collection of Property objects. Each Property object represents a property defined on the Windows Management Instrumentation (WMI) object. (inherited from WmiSmoObject)
ms220784.pubproperty(pl-pl,SQL.100).gif ServiceAccount Gets the system account under which the SQL Server service is running.
ms220784.pubproperty(pl-pl,SQL.100).gif ServiceState Gets the state of the SQL Server service, such as running, stopped, or paused.
ms220784.pubproperty(pl-pl,SQL.100).gif StartMode Gets or sets the method by which the SQL Server service is started.
ms220784.pubproperty(pl-pl,SQL.100).gif StartupParameters Gets or sets any startup parameters for the SQL Server service.
ms220784.pubproperty(pl-pl,SQL.100).gif State  Gets the state of the referenced object. (inherited from SmoObjectBase)
ms220784.pubproperty(pl-pl,SQL.100).gif Type Gets the type of service, such as Microsoft Search service, SQL Server Agent service, or SQL Server service.
ms220784.pubproperty(pl-pl,SQL.100).gif Urn  Gets the Uniform Resource Name (URN) address that represents the Windows Management Instrumentation (WMI) object. (inherited from WmiSmoObject)
ms220784.pubproperty(pl-pl,SQL.100).gif UserData  Gets or sets user-defined data associated with the referenced object. (inherited from SmoObjectBase)

Top

Public Methods

(see also Protected Methods )

  Name Description
ms220784.pubmethod(pl-pl,SQL.100).gif Alter Updates any Service object property changes on an instance of SQL Server.
ms220784.pubmethod(pl-pl,SQL.100).gif ChangePassword Changes the password for the system account under which the SQL Server service is running.
ms220784.pubmethod(pl-pl,SQL.100).gif Equals  Overloaded. (inherited from Object )
ms220784.pubmethod(pl-pl,SQL.100).gif GetHashCode  (inherited from Object )
ms220784.pubmethod(pl-pl,SQL.100).gif GetType  (inherited from Object )
ms220784.pubmethod(pl-pl,SQL.100).gif Initialize  Initializes the referenced object. (inherited from WmiSmoObject)
ms220784.pubmethod(pl-pl,SQL.100).gif Pause Pauses the SQL Server service.
ms220784.pubmethod(pl-pl,SQL.100).gifms220784.static(pl-pl,SQL.100).gif ReferenceEquals  (inherited from Object )
ms220784.pubmethod(pl-pl,SQL.100).gif Refresh Overridden. Refreshes the SQL Server service.
ms220784.pubmethod(pl-pl,SQL.100).gif Resume Resumes the SQL Server service.
ms220784.pubmethod(pl-pl,SQL.100).gif SetServiceAccount Sets the account under which the SQL Server service runs.
ms220784.pubmethod(pl-pl,SQL.100).gif Start Starts the SQL Server service.
ms220784.pubmethod(pl-pl,SQL.100).gif Stop Stops the SQL Server service.
ms220784.pubmethod(pl-pl,SQL.100).gif ToString  (inherited from Object )
ms220784.pubmethod(pl-pl,SQL.100).gif Validate  (inherited from SmoObjectBase )

Top

Protected Methods

  Name Description
ms220784.protmethod(pl-pl,SQL.100).gif AlterProtocolProperties  (inherited from WmiSmoObject )
ms220784.protmethod(pl-pl,SQL.100).gif CheckObjectState  Checks the state of the referenced object. (inherited from WmiSmoObject)
ms220784.protmethod(pl-pl,SQL.100).gif CreateProtocolPropertyCollection  Creates a set of protocol attributes for the referenced object. (inherited from WmiSmoObject)
ms220784.protmethod(pl-pl,SQL.100).gif Finalize  (inherited from Object )
ms220784.protmethod(pl-pl,SQL.100).gif GetPropertyManagementObject  (inherited from WmiSmoObject )
ms220784.protmethod(pl-pl,SQL.100).gif GetPropertyObject  (inherited from WmiSmoObject )
ms220784.protmethod(pl-pl,SQL.100).gif GetProtocolPropertyCollection  Returns the protocol property collection for the referenced object. (inherited from WmiSmoObject)
ms220784.protmethod(pl-pl,SQL.100).gif ImplInitialize  (inherited from WmiSmoObject )
ms220784.protmethod(pl-pl,SQL.100).gif InvokeMgmtMethod  Overloaded. (inherited from WmiSmoObject )
ms220784.protmethod(pl-pl,SQL.100).gif IsObjectInitialized  Specifies whether the referenced object is initialized. (inherited from WmiSmoObject)
ms220784.protmethod(pl-pl,SQL.100).gif MemberwiseClone  (inherited from Object )
ms220784.protmethod(pl-pl,SQL.100).gif SetName  (inherited from WmiSmoObject )
ms220784.protmethod(pl-pl,SQL.100).gif SetParentImpl  (inherited from WmiSmoObject )
ms220784.protmethod(pl-pl,SQL.100).gifms220784.static(pl-pl,SQL.100).gif Trace  (inherited from WmiSmoObject )
ms220784.protmethod(pl-pl,SQL.100).gif UpdateObjectState  Updates the object state. (inherited from WmiSmoObject)

Top

Public Events

  Name Description
ms220784.pubevent(pl-pl,SQL.100).gif ManagementStateChange An event that occurs when the management state changes.

Top