Partilhar via


Método TargetServerGroup.AddMemberServer

Assigns target server group membership to the specified target server.

Namespace:  Microsoft.SqlServer.Management.Smo.Agent
Assembly:  Microsoft.SqlServer.Smo (em Microsoft.SqlServer.Smo.dll)

Sintaxe

'Declaração
Public Sub AddMemberServer ( _
    srvname As String _
)
'Uso
Dim instance As TargetServerGroup 
Dim srvname As String

instance.AddMemberServer(srvname)
public void AddMemberServer(
    string srvname
)
public:
void AddMemberServer(
    String^ srvname
)
member AddMemberServer : 
        srvname:string -> unit
public function AddMemberServer(
    srvname : String
)

Parâmetros

  • srvname
    Tipo: System.String
    A String value that specifies the target server to be removed from the target server group.

Comentários

Use the AddMemberServer and RemoveMemberServer methods to configure multi-server administration target server groups. A target server can be a member of no group or a member of multiple groups.

Exemplos

Agendando tarefas administrativas automáticas no SQL Server Agent

Consulte também

Referência

TargetServerGroup Classe

Namespace Microsoft.SqlServer.Management.Smo.Agent

Outros recursos

Tarefas de administração automatizadas (SQL Server Agent)

sp_add_targetsvrgrp_member (Transact-SQL)