Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

ServiceQueue Class

The ServiceQueue object represents a queue that stores Service Broker messages.

Namespace:  Microsoft.SqlServer.Management.Smo.Broker
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)
[LocalizedPropertyResourcesAttribute("Microsoft.SqlServer.Management.Smo.Broker.BrokerLocalizableResources", 
	true)]
[TypeConverterAttribute(typeof(LocalizableTypeConverter))]
[EvaluationModeAttribute(AutomatedPolicyEvaluationMode.CheckOnSchedule)]
[PhysicalFacetAttribute]
public sealed class ServiceQueue : ScriptSchemaObjectBase, 
	ISfcSupportsDesignMode, IObjectPermission, IExtendedProperties, ICreatable, IAlterable, 
	IDroppable, IScriptable

The ServiceQueue type exposes the following members.

  NameDescription
Public methodServiceQueue()Initializes a new instance of the ServiceQueue class.
Public methodServiceQueue(ServiceBroker, String)Initializes a new instance of the ServiceQueue class on the specified instance of Service Broker and with the specified name.
Public methodServiceQueue(ServiceBroker, String, String)Initializes a new instance of the ServiceQueue class on the specified instance of Service Broker and with the specified name and schema.
Top
  NameDescription
Public propertyActivationExecutionContextGets or sets the execution context for the activated procedure.
Public propertyCreateDateGets the date and time when the service queue was created.
Public propertyDateLastModifiedGets the date and time when the service queue was last modified.
Public propertyEventsGets the events associated with the service queue.
Public propertyExecutionContextPrincipalGets or sets the server principal for the activated procedure.
Public propertyExtendedPropertiesGets the extended properties of the ServiceQueue object.
Public propertyFileGroupGets or sets the filegroup on which the service queue is located.
Public propertyIDGets the ID value that uniquely identifies the service queue.
Public propertyIsActivationEnabledGets or sets the Boolean property that specifies whether activation is enabled for the service queue.
Public propertyIsEnqueueEnabledGets or sets the Boolean property that specifies whether the queue is enabled.
Public propertyIsPoisonMessageHandlingEnabledGets or sets a Boolean property that specifies whether automatic poison message handling is active for the Service Broker queue.
Public propertyIsRetentionEnabledGets or sets the Boolean property that specifies whether the retention is enabled for the service queue.
Public propertyIsSystemObjectGets a value that indicates whether the ServiceQueue is a system object.
Public propertyMaxReadersGets or sets the maximum number of concurrent queue readers.
Public propertyNameGets or sets the String containing the name of the ServiceQueue (Overrides ScriptSchemaObjectBase.Name.)
Public propertyParentGets or sets the ServiceBroker object that is the parent of the ServiceQueue object.
Public propertyProcedureDatabaseGets or sets the database that contains the executing procedure.
Public propertyProcedureNameGets or sets the name of the executing procedure.
Public propertyProcedureSchemaGets or sets the schema of the executing procedure.
Public propertyPropertiesGets a collection of Property objects that represent the object properties. (Inherited from SqlSmoObject.)
Public propertyRowCountGets the number of rows in the service queue.
Public propertyRowCountAsDoubleGets the number of rows in the service queue as a double floating point value.
Public propertySchemaGets or sets the String containing the name of the Schema associated with the ServiceQueue (Overrides ScriptSchemaObjectBase.Schema.)
Public propertyStateGets the state of the referenced object. (Inherited from SmoObjectBase.)
Public propertyUrnGets the Uniform Resource Name (URN) address value that uniquely identifies the object. (Inherited from SqlSmoObject.)
Public propertyUserDataGets or sets user-defined data associated with the referenced object. (Inherited from SmoObjectBase.)
Top
  NameDescription
Public methodAlterUpdates any ServiceQueue object property changes on the instance of SQL Server. 
Public methodCreateCreates a service queue on the instance of SQL Server as defined by the ServiceQueue object.
Public methodDeny(ObjectPermissionSet, String)Denies access to the specified permission for the specified grantee on the service queue.
Public methodDeny(ObjectPermissionSet, String[])Denies access to the specified permission for the specified grantees on the service queue.
Public methodDeny(ObjectPermissionSet, String, Boolean)Denies access to the specified permission for the specified grantee and other users who the grantee granted access to on the service queue.
Public methodDeny(ObjectPermissionSet, String[], Boolean)Denies access to the specified permission for the specified grantees on the service queue.
Public methodDiscoverDiscovers a list of type Object. (Inherited from SqlSmoObject.)
Public methodDropRemoves the service queue.
Public methodEnumObjectPermissions()Enumerates a list of object permissions for the service queue.
Public methodEnumObjectPermissions(String)Enumerates a list of object permissions for a specified grantee on the service queue.
Public methodEnumObjectPermissions(ObjectPermissionSet)Enumerates a list of object permissions for a specified permission on the service queue.
Public methodEnumObjectPermissions(String, ObjectPermissionSet)Enumerates a list of object permissions for a specified grantee and a specified permission on the service queue.
Public methodEquals (Inherited from Object.)
Protected methodFormatSqlVariantFormats an object as SqlVariant type. (Inherited from SqlSmoObject.)
Protected methodGetContextDBGets the context database that is associated with this object. (Inherited from SqlSmoObject.)
Protected methodGetDBNameGets the database name that is associated with the object. (Inherited from SqlSmoObject.)
Public methodGetHashCode (Inherited from Object.)
Protected methodGetPropValueGets a property value of the SqlSmoObject object. (Inherited from SqlSmoObject.)
Protected methodGetPropValueOptionalGets a property value of the SqlSmoObject object. (Inherited from SqlSmoObject.)
Protected methodGetPropValueOptionalAllowNullGets a property value of the SqlSmoObject object. (Inherited from SqlSmoObject.)
Protected methodGetServerObjectGets the server of the SqlSmoObject object. (Inherited from SqlSmoObject.)
Public methodGetType (Inherited from Object.)
Public methodGrant(ObjectPermissionSet, String)Grants access to the specified permission for the specified grantee on the service queue.
Public methodGrant(ObjectPermissionSet, String[])Grants access to the specified permission for the specified grantees on the service queue.
Public methodGrant(ObjectPermissionSet, String, Boolean)Grants access to the specified permission and the ability to grant access to other users for the specified grantee on the service queue.
Public methodGrant(ObjectPermissionSet, String[], Boolean)Grants access to the specified permission and the ability to grant access to other users for the specified grantees on the service queue.
Public methodGrant(ObjectPermissionSet, String, Boolean, String)Grants access to the specified permission and the ability to grant access to other users for the specified grantee on the service queue.
Public methodGrant(ObjectPermissionSet, String[], Boolean, String)Grants access to the specified permission and the ability to grant access to other users for the specified grantee on the service queue under an assumed role.
Public methodInitialize()Initializes the object and forces the properties be loaded. (Inherited from SqlSmoObject.)
Public methodInitialize(Boolean)Initializes the object and forces the properties be loaded. (Inherited from SqlSmoObject.)
Protected methodIsObjectInitializedVerifies whether the object has been initialized. (Inherited from SqlSmoObject.)
Protected methodIsObjectInSpaceVerifies whether the object is isolated or connected to the instance of SQL Server. (Inherited from SqlSmoObject.)
Public methodRefreshRefreshes the script name. (Inherited from ScriptNameObjectBase.)
Public methodRevoke(ObjectPermissionSet, String)Revokes previously granted permissions from a grantee on the service queue.
Public methodRevoke(ObjectPermissionSet, String[])Revokes previously granted permissions from a list of grantees on the service queue.
Public methodRevoke(ObjectPermissionSet, String, Boolean, Boolean)Revokes previously granted permissions from a grantee on the service queue and any other users to whom the grantee has granted access. The grantee is also given the ability to revoke other users' access.
Public methodRevoke(ObjectPermissionSet, String[], Boolean, Boolean)Revokes previously granted permissions from grantees on the service queue and any other users to whom the grantees have granted access. The grantees are also given the ability to revoke other users' access.
Public methodRevoke(ObjectPermissionSet, String, Boolean, Boolean, String)Revokes previously granted permissions from a grantee on the service queue and any other users to whom the grantee has granted access. The grantee is also given the ability to revoke other users' access under an assumed role.
Public methodRevoke(ObjectPermissionSet, String[], Boolean, Boolean, String)Revokes previously granted permissions from grantees on the service queue and any other users to whom the grantees have granted access. The grantees are also given the ability to revoke other users' access under an assumed role.
Public methodScript()Generates a Transact-SQL script that can be used to re-create the Service Broker service queue.
Public methodScript(ScriptingOptions)Generates a Transact-SQL script that can be used to create the Service Broker service queue as specified by the scripting options.
Protected methodSetParentImplSets the parent of the SqlSmoObject to the newParent parameter. (Inherited from SqlSmoObject.)
Public methodToStringReturns a String that represents the referenced object. (Inherited from SqlSmoObject.)
Public methodValidateValidates the state of an object. (Inherited from SmoObjectBase.)
Top
  NameDescription
Public eventPropertyChangedRepresents the event that occurs when a property is changed. (Inherited from SqlSmoObject.)
Public eventPropertyMetadataChangedRepresents the event that occurs when property metadata changes. (Inherited from SqlSmoObject.)
Top
  NameDescription
Explicit interface implemetationPrivate methodIAlienObject.DiscoverDiscovers any dependencies. Do not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SqlSmoObject.)
Explicit interface implemetationPrivate methodIAlienObject.GetDomainRootReturns the root of the domain. (Inherited from SqlSmoObject.)
Explicit interface implemetationPrivate methodIAlienObject.GetParentGets the parent of this object. Do not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SqlSmoObject.)
Explicit interface implemetationPrivate methodIAlienObject.GetPropertyTypeGets the type of the specified property. (Inherited from SqlSmoObject.)
Explicit interface implemetationPrivate methodIAlienObject.GetPropertyValueGets the value of the specified property. (Inherited from SqlSmoObject.)
Explicit interface implemetationPrivate methodIAlienObject.GetUrnGets the Unified Resource Name (URN) of the object. Do not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SqlSmoObject.)
Explicit interface implemetationPrivate methodIAlienObject.ResolveGets the instance that contains the information about the object from the Unified Resource Name (URN) of the object. (Inherited from SqlSmoObject.)
Explicit interface implemetationPrivate methodIAlienObject.SetObjectStateSets the object state to the specified SfcObjectState value. (Inherited from SqlSmoObject.)
Explicit interface implemetationPrivate methodIAlienObject.SetPropertyValueSets the property value. (Inherited from SqlSmoObject.)
Explicit interface implemetationPrivate methodISfcPropertyProvider.GetPropertySetGets the interface reference to the set of properties of this object. (Inherited from SqlSmoObject.)
Explicit interface implemetationPrivate propertyISfcSupportsDesignMode.IsDesignModeGets or sets a property that specifies whether the object is open in design mode. Identified for informational purposes only. Not supported. Future compatibility is not guaranteed..
Top

The ServiceQueue object provides asynchronous communication between services. It also provides other benefits, such as automatically locking messages in the same conversation group.

To get ServiceQueue object properties, users can be a member of the public fixed server role.

To set ServiceQueue object properties, users must be a member of the db_ddladmin or db_owner fixed database roles, or be a member of the sysadmin fixed server role. The user also requires REFERENCES permission on the specified schema.

To create a service queue, users must be a member of the db_ddladmin or db_owner fixed database roles, or be a member of the sysadmin fixed server role. The user also requires REFERENCES permission on the specified schema.

To drop a service queue, users must be a member of the db_ddladmin or db_owner fixed database roles, or be a member of the sysadmin fixed server role. The user also requires REFERENCES permission on the specified schema.

To receive a message, users must have RECEIVE permission on the service queue.

To grant, deny, or revoke permissions on the message type to other users, users must have CONTROL permission on the service queue.

Thread Safety

Any public static (Shared in Microsoft Visual Basic) members of this type are safe for multithreaded operations. Any instance members are not guaranteed to be thread safe.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.