共用方式為


AgentProfile.MakeDefault 方法

Sets the profile as the default profile for all replication agents of the same type.

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

語法

'宣告
Public Sub MakeDefault
'用途
Dim instance As AgentProfile

instance.MakeDefault()
public void MakeDefault()
public:
void MakeDefault()
member MakeDefault : unit -> unit
public function MakeDefault()

例外狀況

例外狀況 條件
ApplicationException

When the profile represented by the object does not exist on the server.

備註

The profile must be created on the server before performing this operation.

The MakeDefault method can be called only by members of the sysadmin fixed server role at the Distributor.

請參閱

參考

AgentProfile 類別

Microsoft.SqlServer.Replication 命名空間