A Sample Schema Script

Following is a sample synchronization schema script. For this example, we present the AUTHORS.SCH script referred to in Setting Up Replication Manually.

EXEC sp_addtype id, 'varchar (11) '
GO
CREATE TABLE authors (
   au_id id NOT NULL PRIMARY KEY,
   au_lname varchar (  40 ) NOT NULL,
   au_fname varchar (  20 ) NOT NULL,
   phone char (  12 ) NOT NULL,
   address varchar (  40 )  NULL,
   city varchar (  20 )  NULL,
   state char (  2 )  NULL,
   zip char (  5 )  NULL,
   contract bit
 )
GO

/* Mark table as a replica */
EXEC sp_replica authors, true

GO