If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Oracle > Oracle8i Snapshot Replication

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-19-04, 05:53
gszalach gszalach is offline
Registered User
 
Join Date: Jul 2003
Posts: 46
Oracle8i Snapshot Replication

Hi,
I have set up replication enviroment in the following way:
One master site
Two snapshot sites with refresh groups
When I add records to tables in master site they are replicated properly to snapshot sites.
if I break connections to snapshot sites from master site then master site is not able to propagate changes from master tables.
How can I find out which records in master tables are not synchronized with snapshot sites tables ?
Thanks in advance
Szalas
Reply With Quote
  #2 (permalink)  
Old 05-19-04, 08:40
gbrabham gbrabham is offline
Registered User
 
Join Date: Apr 2003
Location: Greenville, SC (USA)
Posts: 1,155
There are multiple ways ... Look at the defcall and defcalldest ...

--------------------------------------------------------------------------------
-- Filename: defcall.sql
-- Purpose: Reports on all queued calls in defcall
--------------------------------------------------------------------------------

col callno heading "Call|No" format 9999
col deferred_tran_id heading "Deferred|Tran|ID" format a12
col schemaname heading "Schema|Name" format a8
col packagename heading "Package|Name" format a25
col procname heading "Procedure|Name" format a10
col argcount heading "Arg|Count" format 999
col dblink heading "Destination" format a17

SELECT c.callno,
c.deferred_tran_id,
c.packagename,
c.procname,
c.argcount,
d.dblink
FROM defcall c, defcalldest d
WHERE c.callno = d.callno
AND c.deferred_tran_id = d.deferred_tran_id
/

This should give you some ideas ...

HTH
Gregg
Reply With Quote
  #3 (permalink)  
Old 05-19-04, 18:43
clio_usa clio_usa is offline
Registered User
 
Join Date: Apr 2002
Location: California, USA
Posts: 482
You have the list of replicated tables already. Use query like this to find the not replicated delta:

SQL> select * from local-table MINUS select * from remote-table@dblink;


HTH,

clio_usa - OCP 8/8i/9i DBA
Reply With Quote
  #4 (permalink)  
Old 05-20-04, 04:32
gszalach gszalach is offline
Registered User
 
Join Date: Jul 2003
Posts: 46
Connection to snapshot sites is broken so your query is useless
Reply With Quote
  #5 (permalink)  
Old 05-20-04, 06:13
gszalach gszalach is offline
Registered User
 
Join Date: Jul 2003
Posts: 46
with querying views i could only get deffered transaction id but not id of not replicated records so it is not solution
I'm looking for other ideas
Szalas
Reply With Quote
  #6 (permalink)  
Old 05-20-04, 08:41
gbrabham gbrabham is offline
Registered User
 
Join Date: Apr 2003
Location: Greenville, SC (USA)
Posts: 1,155
Using the prior posting .... Once you look at defcall and defcalldest you can
find the deferred trx that have NOT been replicated ... then you can look at the dbms_defer_query.get_call_args procedure to get the actual row and the columns that have changed (what the were and what they are changed to ...)
Read up on the procedure .....

EX: Run script and fill in the information ...

set serveroutput on size 100000
set verify off
undef callno
undef argcnt
undef tran_db
undef tran_id

DECLARE
vTypes dbms_defer_query.type_ary;
vVals dbms_defer_query.val_ary;
indx NUMBER;
BEGIN
dbms_defer_query.get_call_args(
callno => '&&callno',
startarg => 1,
argcnt => &&argcnt,
argsize => 128,
tran_db => '&&tran_db',
tran_id => '&&tran_id',
date_fmt => 'DD-Mon-YYYY HH24:MIS',
types => vTypes,
vals => vVals );

FOR indx IN 1..&&argcnt LOOP
dbms_output.put_line('Arg '|| indx || ' Value '|| vVals(indx));
END LOOP;
END;
/

HTH
Gregg
Reply With Quote
  #7 (permalink)  
Old 05-21-04, 04:12
gszalach gszalach is offline
Registered User
 
Join Date: Jul 2003
Posts: 46
Thank you very much. It works, but I have another problem. These information are only available from snapshot sites (when I modify rows in snapshots tables). Master site does not contain any rows in table defcall (when I modify rows in master tables). It looks like whole replication is made by snapshot sites.
What is going on ???
Thanks in advance
Szalas
Reply With Quote
  #8 (permalink)  
Old 05-21-04, 08:25
gbrabham gbrabham is offline
Registered User
 
Join Date: Apr 2003
Location: Greenville, SC (USA)
Posts: 1,155
On the MASTER site, you have "tables" called MLOG$_*xxx where xxx is
the actual table. These are the snapshot logs. They are purged thru the
"purge" routine (supposedly...have seen some problems....). The script below shows time and number of rows for them ...

SELECT TRUNC(SNAPTIME$$),COUNT(*)
FROM MLOG$_yourtablename
GROUP BY TRUNC(SNAPTIME$$);

HTH
Gregg
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On