Home » RDBMS Server » Server Administration » querying out replication error details.
querying out replication error details. [message #163361] Thu, 16 March 2006 07:17
justsomeguy123
Messages: 1
Registered: March 2006
Junior Member
Im working in a multimaster replicated environment (9i and 10g dbs) and occasionally an application at 2 sites will update the same data and ill get replicaiton errors

Its easy enough to fix, i just do the following from each db:
select * from tablename where recnum = unique_num;
make my decision as to which dbs record to keep and then
connect db_im_going_to_overwrite_record_on as sysdba
execute dbms_reputil.replication_off;
delete from tablename where recnum = unique_num;
insert into tablename select * from tablename@db_with_good_rec where recnum = unique_num;
commit;

so whats my question? well when i get replicaion errors I have to first go dig thru enterprise manager to go find what table and unique recnum i have the error on... I do that by opening up each db in oem then navigating down to

dbname > distributed > advanced replication > administration > errors tab, open the error details for call 0 > then look for the table name that the error occured on as well as click error call 0 to find the data that each db's record contains (in particular the recnum field which is a unique key that i use to select the record)

long story short doing all that digging around is a pain that id like to script so i can just run some script and get some kind of output like

db1 has replication errors on:
tablename1 : recnum6 : defer_tran_id_123 : call_num_0
tablename2 : recnum2 : defer_tran_id_983 : call_num_0
tablename2 : recnum3 : defer_tran_id_456 : call_num_0

Ive done some digging and come up with hints and gotten somewhere in the general area i need to be in but cant seem to piece it together, i think all the data i want is stored in a blob in sys.deflob but im not 100% certain of that and since im not familar with blobs im not sure how to query and extract what i want. trying to just select * from sysdeflob in sqlplus just gets me complaints about not being able to display blob data. Ultimately it would be nice to extract that data with perl:dbi but at this point im open to whatever works


heres some of the stuff ive bumbled around with so far.

desc sys.deflob;
select deferred_tran_id from sys.deflob;
select clob_col from sys.deflob where deferred_tran_id = '4.21.2305363';
select * from deferror;
select callno, packagename, destination, deferred_tran_id, argcount from defcall where DEFERRED_TRAN_ID = '51.31.236';

I know theres a DBMS_DEFER_QUERY.GET_CALL_ARGS procedure which seems like really what i may want too but I cant seem to get that to do anything but complain that im not using it properly

http://coding.derkeiler.com/Archive/Perl/perl.dbi.users/2004-02/0278.html
http://www.orafaq.com/scripts/perl/blob.txt
http://web1.dbaclick.com/modules.php?op=modload&name=News&file=article&sid=305

any help someone could provide would be greatly appreciated.
Previous Topic: NEXT EXTENT size
Next Topic: GRANT TO ALLOW A USER ISSUE A DESCRIBE ON ANY TABLE
Goto Forum:
  


Current Time: Fri Sep 20 13:50:04 CDT 2024