共用方式為


DatabaseReplicaState.DatabaseId 屬性

Gets the identifier of the database, unique within an instance of SQL Server.

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

語法

'宣告
<SfcPropertyAttribute(SfcPropertyFlags.Standalone)> _
Public ReadOnly Property DatabaseId As Integer 
    Get
'用途
Dim instance As DatabaseReplicaState 
Dim value As Integer 

value = instance.DatabaseId
[SfcPropertyAttribute(SfcPropertyFlags.Standalone)]
public int DatabaseId { get; }
[SfcPropertyAttribute(SfcPropertyFlags::Standalone)]
public:
property int DatabaseId {
    int get ();
}
[<SfcPropertyAttribute(SfcPropertyFlags.Standalone)>]
member DatabaseId : int
function get DatabaseId () : int

屬性值

型別:System.Int32
The identifier of the database, unique within an instance of SQL Server.

請參閱

參考

DatabaseReplicaState 類別

Microsoft.SqlServer.Management.Smo 命名空間