共用方式為


GetCurrentPrincipal 方法

Returns the current database mirroring principal for the specified publication database.

命名空間:  Microsoft.SqlServer.Replication
組件:  Microsoft.SqlServer.Rmo (在 Microsoft.SqlServer.Rmo.dll 中)

語法

'宣告
Public Function GetCurrentPrincipal ( _
    dbName As String _
) As String
'用途
Dim instance As ReplicationServer
Dim dbName As String
Dim returnValue As String

returnValue = instance.GetCurrentPrincipal(dbName)
public string GetCurrentPrincipal(
    string dbName
)
public:
String^ GetCurrentPrincipal(
    String^ dbName
)
member GetCurrentPrincipal : 
        dbName:string -> string 
public function GetCurrentPrincipal(
    dbName : String
) : String

參數

  • dbName
    型別:System. . :: . .String
    Name of a published database that participates in database mirroring.

傳回值

型別:System. . :: . .String
A String value.

備註

This method is used to support replication with database mirroring. For more information, see 複寫和資料庫鏡像.

If the database specified for dbName does not participate in database mirroring, an empty string is returned.