共用方式為


ServiceBroker 屬性

Gets the ServiceBroker object that represents the Service Broker.

命名空間:  Microsoft.SqlServer.Management.Smo
組件:  Microsoft.SqlServer.Smo (在 Microsoft.SqlServer.Smo.dll 中)

語法

'宣告
<SfcObjectAttribute(SfcObjectRelationship.Object, SfcObjectCardinality.One)> _
Public ReadOnly Property ServiceBroker As ServiceBroker
    Get
'用途
Dim instance As Database
Dim value As ServiceBroker

value = instance.ServiceBroker
[SfcObjectAttribute(SfcObjectRelationship.Object, SfcObjectCardinality.One)]
public ServiceBroker ServiceBroker { get; }
[SfcObjectAttribute(SfcObjectRelationship::Object, SfcObjectCardinality::One)]
public:
property ServiceBroker^ ServiceBroker {
    ServiceBroker^ get ();
}
[<SfcObjectAttribute(SfcObjectRelationship.Object, SfcObjectCardinality.One)>]
member ServiceBroker : ServiceBroker
function get ServiceBroker () : ServiceBroker

屬性值

型別:Microsoft.SqlServer.Management.Smo.Broker. . :: . .ServiceBroker
A ServiceBroker object that represents the Service Broker.

備註

All the objects associated with the Service Broker are found in the ServiceBroker object hierarchy. All Service Broker objects can be accessed by using the ServiceBroker property.

範例

'Connect to the local, default instance of SQL Server.
Dim srv As Server
srv = New Server

'Reference the AdventureWorks database.
Dim db As Database
db = srv.Databases("AdventureWorks")

'Display  information about the database.
Console.WriteLine("Is Database snapshot : " + _
db.IsDatabaseSnapshot.ToString)
Console.WriteLine("Is Database snapshot base : " + _
db.IsDatabaseSnapshotBase.ToString)
Console.WriteLine("User is Aministrator : " + _
db.IsDbAccessAdmin.ToString)
Console.WriteLine("User is backup operator : " + _
db.IsDbBackupOperator.ToString)
Console.WriteLine("User is data reader : " + _
db.IsDbDatareader.ToString)
Console.WriteLine("User is data writer : " + _
db.IsDbDatawriter.ToString)
Console.WriteLine("User is DDL administrator : " + _
db.IsDbDdlAdmin.ToString)
Console.WriteLine("User denied data reader : " + _
db.IsDbDenyDatareader.ToString)
Console.WriteLine("User denied data writer : " + _
db.IsDbDenyDatawriter.ToString)
Console.WriteLine("User is database owner : " + _
db.IsDbOwner.ToString)
Console.WriteLine("User security administrator : " + _
db.IsDbSecurityAdmin.ToString)
Console.WriteLine("Full text is enabled : " + _
db.IsFullTextEnabled.ToString)
Console.WriteLine("Database is a mail host : " + _
db.IsMailHost.ToString)
Console.WriteLine("Mirroring is enabled : " + _
db.IsMirroringEnabled.ToString)
Console.WriteLine("Database is a system object : " + _
db.IsSystemObject.ToString)
Console.WriteLine("Database is updateable : " + _
db.IsUpdateable.ToString)