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}
The name of the applied function replication definition to change.
Specifies the name of the stored procedure to execute at the replicate database. func_name is a character string with a maximum length of 255 characters.
Adds parameters and their datatypes to the applied function replication definition.
The name of a parameter you are adding to the list of replicated or searchable parameters. Each parameter name must begin with the @ character.
The datatype of the parameter you are adding to the parameter list. See “Datatypes” for a list of the datatypes and their syntax. Adaptive Server stored procedures and function replication definitions cannot contain parameters with the text, unitext, rawobject, and image datatypes.
Specifies additional parameters that you can use in the where clause of the create subscription or define subscription command.
In a warm standby application, specifies whether to send all parameters in the function (send standby all parameters) or only those specified in the replication definition (send standby replication definition parameters), to a standby database. The default is send standby all parameters.
Adds the @notes, @pubdate, and @contract parameters to the titles_frep function replication definition:
alter applied function replication definition titles_frep add @notes varchar(200), @pubdate datetime, @contract bit
Adds the @type and @pubdate parameters to the list of searchable parameters in the titles_frep function replication definition:
alter applied function replication definition titles_frep add searchable parameters @type, @pubdate
Changes the titles_frep function replication definition to be replicated as the newtitles stored procedure at the replicate database:
alter applied function replication definition titles_frep with replicate function named 'newtitles'
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 coordinate alter applied function replication definition with distributions for the function replication definition. Follow the steps for altering replication definitions found in the Replication Server Administration Guide Volume 1.
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.
alter applied function replication definition requires “create object” permission.
alter function string, alter request function replication definition, create applied function replication definition, create request function replication definition,