Changes the function replication definition created by the create applied function replication definition command.
alter applied function replication definition repdef_name {with replicate function named ‘func_name’ | add @param_name datatype[, @param_name datatype]… | add searchable parameters @param_name[, @param_name]… | send standby {all | replication definition} parameters} [with DSI_suspended]
After Replication Server suspends a DSI thread, you can make changes to the target stored procedures, and to any customized function strings. When you resume the DSI thread, Replication Server replicates the primary updates using the altered replication definition.
You do not need to use with DSI_suspended if:
alter applied function replication definition titles_frep add @notes varchar(200), @pubdate datetime, @contract bit
alter applied function replication definition titles_frep add searchable parameters @type, @pubdate
alter applied function replication definition titles_frep with replicate function named ‘newtitles’ with DSI suspended
Use alter applied function replication definition to change an existing applied function replication definition. You can add replicated parameters and searchable parameters, select which parameters to send to the warm standby, and specify a different name for the stored procedure to execute in the replicate database.
alter applied function replication definition can alter only the replication definition created with the create applied function replication definition command.
When you alter a function replication definition, the name, parameters, and datatypes that you specify for the function replication definition must match the stored procedure that you are replicating. Only the parameters specified in the function replication definitions are replicated.
Multiple function replication definitions for the same stored procedure must have the same parameter list. If you add a new parameter, the new parameter is automatically added to all the function replication definitions created for that stored procedure.
You must execute alter applied function replication definition at the primary Replication Server.
A parameter name cannot appear more than once in any clause.
When adding parameters, you must instruct Replication Server to coordinate alter applied function replication definition with distributions for the function replication definition. In addition, you must instruct Replication Server to coordinate changes to stored procedures and replication definitions.
See Replication Server Administration Guide Volume 1 > Managing Replicated Tables > Replication Definition Changes Request Process to alter replication definitions.
Use the with replicate function named clause to specify the stored procedure name you want to execute at the replicate database. See create applied function replication definition.
See the Replication Server Administration Guide Volume 1 for more information about alter applied function replication definition.