Create applied function replication definitions on the primary Replication Server for ins_pub_title, del_pub_title, and upd_pub_title. Note that for inserts and deletes, only state is a searchable column; for updates, old_state is also searchable.
-- Execute this script at NY data servers -- Creates replication definition ins_pub_title create applied function replication definition ins_pub_title with primary at MIAMI_DS.pubs2 (@pub_id char(4), @pub_name varchar(40), @city varchar(20), @state char(2), @title_id varchar(6), @title varchar(80), @type char(12), @price money, @advance money, @total_sales int, @notes varchar(200), @pubdate datetime,@contract bit) searchable parameters (@state) go /* end of script */
-- Execute this script at NY data servers -- Creates replication definition upd_pub_title create applied function replication definition upd_pub_title with primary at MIAMI_DS.pubs2 (@pub_id char(4), @pub_name varchar(40), @city varchar(20), @state char(2), @title_id varchar(6), @title varchar(80), @type char(12), @price money, @advance money, @total_sales int, @notes varchar(200), @pubdate datetime, @contract bit, @old_state char(2)) searchable parameters (@state, @old_state) go /* end of script */