sp_add_targetsvrgrp_member (T-SQL)

Adds the specified target server to the specified target server group.

Syntax

sp_add_targetsvrgrp_member [@group_name =] 'group_name',
    
[@server_name =] 'server_name'

Arguments
[@group_name =] 'group_name'
Is the name of the group. group_name is sysname, with no default.
[@server_name =] 'server_name'
Is the name of the server that should be added to the specified group. server_name is nvarchar(30), with no default.
Return Code Values

0 (success) or 1 (failure)

Result Sets

None

Remarks

A target server can be a member of more than one target server group.

Permissions

Only members of the sysadmin fixed server role can execute this procedure.

Examples

This example adds the group Servers Maintaining Customer Information and adds the LONDON1 server to that group.

USE msdb

EXEC sp_add_targetsvrgrp_member 'Servers Maintaining Customer Information', 'LONDON1'

  

See Also
sp_delete_targetsvrgrp_member System Stored Procedures

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.