How to store heterogeneous transactions in the Distributor

To write a C/C++ application that uses the Replication Distributor Interface to store heterogeneous replication transactions or snapshots in the Distributor

  1. Include the Repldist.h header file.
  2. Declare global structures and variables.
  3. Start the main executable code.
  4. Initialize OLE.
  5. Create an instance of a DataSource object for the SQL publishing provider.
  6. Initialize the variants and options in the DataSource object.
  7. Create the initialization structure.
  8. Set the initialization properties.
  9. Initialize the SQL-DMO Distributor object.
  10. Request the IDBCreateSession interface.
  11. Optionally, log a history message that allows the program to be monitored by Replication Monitor in SQL Server Enterprise Manager.
  12. Get the last transaction ID and sequence number from the Microsoft® SQL Server™ Distributor.
  13. Initialize commands.
  14. Insert the commands.
  15. Handle errors.
  16. Clean up.

Note Microsoft® SQL Server™ Data Transformation Services (DTS) provides a means to implement snapshot replication using heterogeneous data. The DTS Import Wizard allows you to import data from a variety of heterogeneous data sources, including Microsoft Access, Oracle, and DB2. During the import process, you can even perform transformations on the data (for example, concatenating two columns, or decomposing the data in one column into two or more columns).

The DTS Import Wizard provides a one-to-one connection, not the store-and-forward solution associated with replication. However, if you have a need to forward converted data to numerous sites, consider creating a snapshot publication from the converted table.


See Also
Replication Distributor Interface Using SQL-DMO and the Replication Distributor Interface
Creating a Destination Table for Replication  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.