Use the drop function command to drop a user-defined function. This command drops a function name and any function strings that have been created for it. You cannot drop system functions.
Before you drop the user-defined function, be sure to:
Drop the stored procedure at the primary database using the drop procedure Adaptive Server command, or use the sp_setreplicate or sp_setrepproc system procedure and specify 'false' to disable replication for the stored procedure.
See “Specifying stored procedures and tables for replication” for details on using sp_setreplicate. See “Marking stored procedures for replication” on page 374 in the Replication Server Administration Guide Volume 1 for details on using sp_setrepproc.
As a precaution, quiesce the system before executing the drop function command. Dropping functions while updates are in process can have unpredictable results.
See “Quiescing a replication system” on page 108 in the Replication Server Administration Guide Volume 1 for details on quiescing the system.
The syntax for the drop function command is:
drop function replication_definition.function
Execute the command on the Replication Server where the replication definition was created.
The following command drops the Stock_receipt user-defined function created in the previous section:
drop function Items_rd.Stock_receipt