Applying a Classic Replication Scheme to a Database
When you define the classic replication scheme, save the CREATE
REPLICATION statement in a SQL file. After
you have described the classic replication scheme in a SQL file, you
can run the SQL on the database using the -f option
to the ttIsql utility.
The syntax is:
ttIsql -f schemefile.sql -connstr "dsn=DSN"
If your classic replication scheme is described in a file called repscheme.sql, you can run the file on a DSN, called masterDSN, by entering:
ttIsql -f repscheme.sql -connstr "dsn=masterDSN"
Under most circumstances, you should apply the same scheme to all of the replicated databases. You must invoke a separate ttIsql command on each host to apply the classic replication scheme.
For example, if your classic replication scheme includes the databases masterDSN on host S1, subscriber1DSN on host S2, and subscriber2DSN on host S3, do the following:
On host S1, enter:
ttIsql -f repscheme.sql -connstr "dsn=masterDSN"
On host S2, enter:
ttIsql -f repscheme.sql -connstr "dsn=subscriber1DSN"
On host S3, enter:
ttIsql -f repscheme.sql -connstr "dsn=subscriber2DSN"
You can also run the SQL file containing your classic replication scheme from the ttIsql command line after connecting to a database. For example:
run repscheme.sql;