alter function

Adds parameters to a user-defined function.

Syntax

alter function table_rep_def.function_name
	add parameters @param_name datatype
	[, @param_name datatype]...

Parameters

Examples

Usage

  • Before executing alter function, quiesce the replication system. You can use Replication Server Manager or the procedure described in the Replication Server Troubleshooting Guide to quiesce the system.

  • A user-defined function can have up to 255 parameters.

  • Altering functions during updates can cause unpredictable results. The affected data should be quiescent before you alter the function.

  • After altering a user-defined function, you may also have to alter function strings that use the new parameters.

  • When you alter a user-defined function for a replication definition, it is altered for all replication definitions of the primary table.

  • Do not use alter function for replicated functions. Use alter function rep def instead. alter function is used only for the asynchronous stored procedures described in RSSD Stored Procedures.

Permissions

alter function requires “create object” permission.

Related reference
admin quiesce_check
alter function string
create function
create function string
drop function
drop function string