Show TOC

drop function stringLocate this document in the navigation structure

Drops a function string for a function-string class.

drop function string
 {<replication_definition> |
 [<owner>.] table |
 <stored_procedure>} .<function>[;<function_string>]
 for { [<function class>] function_class |
[<database>] <data_server.database>}

The name of the table or function replication definition the function operates on.

Specifies the target table and the table owner of the function string.
Specifies the target store procedure of the function string

The name of the function the function string was created for.


The name of the function string to drop. The default function string name is the same as the function name.


The name of the function-string class from which the function string will be dropped.

Specifies the standby or replicate database where you want to drop the target-scope function string.
Example 1

Drops the function strings for the rs_insert function for the <publishers_rep> replication definition in the derived class <sqlserver_derived_class>. The rs_insert function string will now be inherited from the parent class:

drop function string
 for sqlserver_derived_class
Example 2

Drops the function string for the upd_publishers user-defined function for the <publishers_rep> replication definition in the <sqlserver2_function_class> function-string class:

drop function string
 for sqlserver2_function_class
Example 3
Drops the function string for the dbo.authors table at target database NY_DS.rdb1:
drop function string dbo.authors.rs_insert
for database NY_DS.rdb1
  • To replace an existing function string with a new one, use either alter function string or create function with overwrite.


    If a transaction occurs between the time a function string is dropped and the time it is re-created, Replication Server detects the function string as missing and fails the transaction.

  • Dropping a function drops corresponding function strings from all function-string classes.

  • Dropping a customized function string from a derived function-string class causes that class to inherit the function-string from its parent class.

  • Dropping a customized function string from <rs_sqlserver_function_class> causes Replication Server to delete the customized and default function string. To revert the customized function string to the default function string for a function in the <rs_sqlserver_function_class>, use alter function string and omit the output clause.

  • Replication Server distributes information about the dropped function string to qualifying sites through the replication system. The changes do not appear immediately at all such sites because of normal replication system lag time.

  • Execute drop function string for target-scope function strings at the Replication Server that controls the target database, which is either the standby or replicate database.


drop function string requires “create object” permission.