Re: HELP with replication for Oracle Lite to Oracle server

From: Christian Walter <christian.walter_at_littlesister.de>
Date: 27 Feb 2002 03:30:49 -0800
Message-ID: <2ce5a729.0202270330.7939234f_at_posting.google.com>


Hi,

I spent more than a year building a complete application (VC++) for a quite big replication environment with Oracle Lite on one end. The real problem is, Oracle doesn't seem to be willing to integrate Oracle and Oracle Lite. So consider these two as two completely different things. This will save you a lot of trouble.

Oracle divides into real replication (between two or more servers) and snapshots (in Oracle 9 they are called 'materialized view'). If you're using OLite as Client you have to choose snapshots.

Snapshots can be divided into updatable and readonly snapshots, only the first ones are able to manipulate data on the server. So I assume you want to create updatable snapshots.

For this you MUST have DBA access to your server for one time! The reason is that you have to create a replication group on the server and the replication environment. I've added a script for that.

  • snip snip master.sql

connect sys/sys_at_ts2;

  • you need some special rights grant connect, resource, dba to user identified by user; execute dbms_repcat_admin.grant_admin_repgroup(userid=>'user'); execute dbms_repcat_admin.grant_admin_any_repgroup(userid=>'user'); grant execute on dbms_defer to user; grant execute on sys.dbms_snap_repapi to user; execute dbms_repcat_auth.grant_surrogate_repcat('user');
  • this will create the replication group execute dbms_repcat.create_master_repgroup('GROUP1');
  • for updatable snapshots you must create snapshot logs create snapshot log on user.table1; create snapshot log on user.table2;
  • now add your tables to the replication group execute dbms_repcat.create_master_repobject('user','table2','TABLE',gname=>'GROUP1'); execute dbms_repcat.create_master_repobject('user','table2','TABLE',gname=>'GROUP1');
  • now generate replication support for every table execute dbms_repcat.generate_replication_support('user','table1','TABLE'); execute dbms_repcat.generate_replication_support('user','table2','TABLE');
  • turn the replication on! execute dbms_repcat.resume_master_activity('GROUP1', FALSE);
  • snip snip end of master.sql

Now your server is ready for updatable snapshots. Now you can take your app and make them. If you don't want to use VB, take any other language. You just have to integrate the 'repsvr8' control (it's in \...\OraLite\Bin\Repsvr8.ocx).
By the way, 'long raw'-Fields of a table cannot be replicated.

Try to lookup the oracle documentation concerning these functions. It's better to understand what you're doing. Oracle is the most powerful database system, including replication which is very(!) stable. But wherever possible one should avoid to use Oracle Lite. Received on Wed Feb 27 2002 - 12:30:49 CET

Original text of this message