1. Create a new table in the source database. On the source server (dbv01) , using SQL*Plus, logon as the OE REPOE schema and create a new table.
No Format |
---|
sqlplus oerepoe/oe@ttorclrepoe@ttorcl_src |
No Format |
---|
SQL>CREATE createTABLE table sales (
prod_id number primary key,
cust_id number not null,
NUMBER PRIMARY KEY,
cust_id NUMBER NOT NULL,
quantity_sold number NUMBER(10,2) notNOT nullNULL,
amount_sold number NUMBER(10,2) notNOT nullNULL,
amount_received numberNUMBER(10,2),
sales_status varchar2 VARCHAR2(10) notNOT nullNULL
); |
2. Insert data into this table and commit the data.
No Format |
---|
SQL>INSERT insertINTO into sales valuesVALUES ( 101, 201, 233, 1299, null, 'OVERDUE');
insertINSERT intoINTO sales valuesVALUES ( 102, 301, 30, 1099, 1099, 'PAID');
insertINSERT intoINTO sales valuesVALUES ( 103, 401, 30, 120, 120, 'PAID');
insertINSERT intoINTO sales valuesVALUES ( 104, 401, 40, 160, null, 'OVERDUE');
commitCOMMIT; |
3. The replication console will show the new table. The By default, DDL and the DML will be replicated so the table will be in sync on the target database.
No Format |
---|
OEREPOE.SALES: 100% Mine:4/4 Unrecov:0/0 Applied:4/4 |
4. Synchronization may take some time, depending on your virtualized environment. Go to the target database and verify that the data is in sync.
No Format |
---|
sqlplus oe./oe@ttorclrecord_trgcount.bash |
No Format |
---|
SQL> select * from sales;
PROD_ID CUST_ID QUANTITY_SOLD AMOUNT_SOLD AMOUNT_RECEIVED SALES_STAT
---------- ---------- ------------- ----------- --------------- ----------
101 201 233 1299 OVERDUE
102 301 30 1099 1099 PAID
103 401 30 120 120 PAID
104 401 40 160 OVERDUE |