Home » Server Options » Streams & AQ » Stream script
Stream script [message #135057] Mon, 29 August 2005 12:27 Go to next message
hofline
Messages: 2
Registered: August 2005
Junior Member
I try to implement a Stream heterogeneous replication.

I want replicate data from dbs1.net(ORACLE) to dbs2.net(NON-ORACLE...MSSQL SERVER)....

I follow the instruction in

http://dbis.informatik.uni-freiburg.de/oracle-docs/doc1001/server.101/b10728/repsingd.htm#1114627

and I extract this script of the content but doesn't work

Any body can help me.

This is the script.....

-----------------Create user-----------------------
GRANT CONNECT, RESOURCE, DBA, SELECT_CATALOG_ROLE
TO strmadmin IDENTIFIED BY strmadminpass;

ALTER USER strmadmin DEFAULT TABLESPACE TS_ADMIN
QUOTA UNLIMITED ON TS_ADMIN;


---------Create heterogeneous database link-----------------------

CREATE DATABASE LINK dbs2.net CONNECT TO "hr" IDENTIFIED BY "hrpass"
USING 'dbs2.net';


-----------------Create a Queue--------------------
CONNECT strmadmin/strmadminpass@dbs1.net
EXEC DBMS_STREAMS_ADM.SET_UP_QUEUE();

----Create "Supplemental Logging for Streams Replication"-------

CONNECT SYS/syspass@dbs1.net AS SYSDBA

ALTER TABLE hr.table1 ADD SUPPLEMENTAL LOG DATA (PRIMARY KEY) COLUMNS;

------- Configure the Capture Process at dbs1.net---------

BEGIN
DBMS_STREAMS_ADM.ADD_SCHEMA_RULES(
schema_name => 'hr',
streams_type => 'capture',
streams_name => 'capture',
queue_name => 'strmadmin.streams_queue',
include_dml => true,
include_ddl => false,
inclusion_rule => true);
END;
/

-----------Configure the Apply Process at dbs1.net for Apply at dbs2.net--------

CONNECT strmadmin/strmadminpass@dbs1.net

BEGIN
DBMS_APPLY_ADM.CREATE_APPLY(
queue_name => 'strmadmin.streams_queue',
apply_name => 'apply_dbs2',
apply_database_link => 'dbs2.net',
apply_captured => true);
END;
/


BEGIN
DBMS_STREAMS_ADM.ADD_TABLE_RULES(
table_name => 'hr.table1',
streams_type => 'apply',
streams_name => 'apply_dbs2',
queue_name => 'strmadmin.streams_queue',
include_dml => true,
include_ddl => false,
source_database => 'dbs1.net',
inclusion_rule => true);
END;
/

------Start the Apply Process at dbs1.net for Apply at dbs2.net-------
BEGIN
DBMS_APPLY_ADM.SET_PARAMETER(
apply_name => 'apply_dbs2',
parameter => 'disable_on_error',
value => 'n');
END;
/

BEGIN
DBMS_APPLY_ADM.START_APPLY(
apply_name => 'apply_dbs2');
END;
/

-------- Start the Capture Process at dbs1.net---------

CONNECT strmadmin/strmadminpass@dbs1.net

BEGIN
DBMS_CAPTURE_ADM.START_CAPTURE(
capture_name => 'capture');
END;
/



Re: Stream script [message #319184 is a reply to message #135057] Fri, 09 May 2008 05:02 Go to previous messageGo to next message
rsethy
Messages: 11
Registered: February 2008
Junior Member
Hi,

Can you tell details what error you are getting after configuring the Oracle streams.

Thanks

Raghu
Re: Stream script [message #337688 is a reply to message #319184] Thu, 31 July 2008 12:18 Go to previous message
varunvir
Messages: 330
Registered: November 2007
Senior Member
most of errors you will get after configuring streaming are due to conflicts.You can write procedure to print all the errors or you can get this procedure from stream documentation.You you have to remove these errors either manually or with the help of conflict handler.
Regards,
Varun Punj,
Previous Topic: archive log full! Using streams
Next Topic: Propogation process in Stream
Goto Forum:
  


Current Time: Sat Dec 20 18:27:48 CST 2014

Total time taken to generate the page: 0.07326 seconds