Show TOC

drop function stringLocate this document in the navigation structure

Drops a function string for a function-string class.

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

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

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

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

function_string

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

function_class

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

data_server.database
Specifies the standby or replicate database where you want to drop the target-scope function string.
Examples
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
 publishers_rep.rs_insert
 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
 publishers_rep.upd_publishers
 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
Usage
  • To replace an existing function string with a new one, use either alter function string or create function with overwrite.

    Caution

    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.

Permissions

drop function string requires “create object” permission.