Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Using InterConnect to push data from one Oracle DB to another

Re: Using InterConnect to push data from one Oracle DB to another

From: Frank <fbortel_at_home.nl>
Date: Sat, 21 Dec 2002 12:52:59 +0100
Message-ID: <3E04561B.7070108@home.nl>


<snip>
Could become a long one, so bear with me. Have had some delays as could install it all on Linux; had to revert to W2K/8.1.7. Anyway, works (kind of - read on).

First off, I;m not sure whether you have one, or two adpaters installed - it looks like only one to me. You really need two; one to push from one spoke to the hub, the other to read from the hub to the other spoke.
 From as far as you managed to come, I guess you can do that without getting into trouble...

Assuming you have the two spoke adapters running (your repository service would be the third, running against the hub), you're almost there.

When you edit your scott application, subscribed event employee.new_employee, make sure on the summary tab you have an entry. copyFields will do.
Create it by selecting New. On the three pane window, select new_employee (left, Common View), ObjectCopy (or CopyFields) for Transformation (middle panel) and new_employee on the right hand side (application specific view, would be called scott in your case).

Then OK, and proceed. Check the SQL code for sub_new_employee_ICF_V1. Insert some code like
insert into employee values (

   EMPLOYEE_ID ,LAST_NAME,FIRST_NAME ,MIDDLE_INITIAL ,JOB_ID ,    MANAGER_ID ,HIRE_DATE ,SALARY ,COMMISSION,DEPARTMENT_ID); Make sure you have the Transformation on the Publishing side, too.

After these changes, your data_publisher app should be exported, as well as your scott application. The result will be four files, two of which are probably empty - the TYPES files. The other two contain PL/SQL code to allow the adapters to communicate to/from the applications, plus the hand made code above.

Run the scott against your data_receiver, and your data_publisher against your data_publisher instance.

I had some trouble here; got PLS-328 (I think; wrong types anyway). I've been using this code on several occasions, and has always worked for me... Only thing new is I now have 8.1.7.4.1; previous installs would be 8.1.7.2 or something like that...

Anyway - it's time to push your metadata, fire up the adapters, and test! Best start the adapters using the start.cmd file; it will open a DOS box, which will show you what's going on - a better feedback in test situations that opening log files, and M$ doesn't know tail -f.

In your publishing app, you should be able to do something like: declare

  msgId	number;
  aoId	number;

begin
-- create the message

  Employee.crMsg_new_employee_ICF_V1 (

        msgId, aoId, 1234, 'Dummy', 'Frank','v',null,null,sysdate,2500,0,20 );
-- send it

  Employee.pub_new_employee_ICF_V1(

        msgId, 'SEND_EMP');
end;
/

Check for typo's; I don't have your code here! You should be able to see the sending adapter waking up, and doing something, after you commit, that is.
You will probably run into java exceptions regarding conversions;haven't figured that out yet, so I usually go for strings. Solves problems with not so standard charactersets, too; oracle's java supports a very limited set of charactersets: US7ASCII, WE8ISO8859P1 and UTF8 is about it (I know, there is one other multibyte set, but not common in Europe).

If you want to get rid of previous messages (they are retained until received and processed!), stop the adapaters, and delete the log, as well as the persistance directories). Start the adapaters again.

Hth, grtz, Frank Received on Sat Dec 21 2002 - 05:52:59 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US