The alter function string command replaces an existing function string. alter function string acts essentially the same as create function string except that it executes the drop function string command first. The function string is dropped and re-created in a single transaction to prevent any errors from occurring as a result of missing function strings.
You can alter a function string using either the alter function string command or the create function string command. To alter a function string using the create function string command, you must include the optional clause with overwrite after the name of the function-string class. This command drops and re-creates an existing function string, the same as the alter function string command.
To alter a function string using the alter function string command, you must first create a function string.
In a derived class, first use the create function string command to override the function string that is inherited from the parent class. You cannot alter a function string in a derived class unless the function string has been explicitly created for the derived class.
You alter function strings at the Replication Server that is the primary site for the existing function string:
For functions of replication-definition scope, alter the function string at the primary Replication Server where the replication definition was defined.
For functions of class scope, alter the function string at the primary site for the function-string class. The primary site for a derived class is the same as for its parent class, unless the parent class is one of the system-provided classes. See “Primary site for a function-string class” for more information.
For system functions that allow multiple function-string mappings, such as rs_select and rs_select_with_lock, provide the complete function string name in the alter function string syntax. Replication Server uses the name to determine which function string to alter.
See “Creating function strings” for example function strings.
Refer to Chapter 3, “Replication Server Commands,” in the Replication Server Reference Manual for the complete syntax for the alter function string command.