Replikasi Data dengan Oracle Updatable materialized views [4]

24 Sep

Replikasi Data dengan Oracle Updatable materialized views [4]

Tahapan ini melakukan test Replikasi Data dengan Oracle Updatable materialized views

———————————————–
— 1. memasukkan data dari MV MASTER SITE
———————————————–
INSERT INTO T_BELI ( NO_FAKTUR,KODE_SUPLIER,KODE_TJEN,TGL_FAKTUR,TOTAL_BRUTO,TOTAL_DISKON,TOTAL_JUMLAH)
VALUES (‘001′,’XXX1′,’T’,SYSDATE,0,0,0);
INSERT INTO T_DBELI ( NO_FAKTUR,KODE_BARANG,HARGA,QTY,DISKON,BRUTO,JUMLAH)
VALUES (‘001′,’AAAAAAAAA8’,50000,1,0,50000,50000);
UPDATE T_BELI SET TOTAL_BRUTO = TOTAL_BRUTO + 50000, TOTAL_DISKON = TOTAL_DISKON + 0,
TOTAL_JUMLAH = TOTAL_JUMLAH + 50000 WHERE NO_FAKTUR = ‘001’;
COMMIT;

———————————————–
— 2. PERIKSA DATA di MV MASTER SITE
———————————————–
SELECT * FROM T_BELI WHERE NO_FAKTUR = ‘001’;
SELECT * FROM T_DBELI WHERE NO_FAKTUR = ‘001’;

———————————————–
— 3. PERIKSA DATA di MV MASTER VIEW SITE
———————————————–
SELECT * FROM T_BELI WHERE NO_FAKTUR = ‘001’;
SELECT * FROM T_DBELI WHERE NO_FAKTUR = ‘001’;

ulangi dengan menambahkan data tetapi lewat master view site

———————————————–
— 4. memasukkan data dari MV MASTER VIEW SITE
———————————————–
INSERT INTO T_DBELI ( NO_FAKTUR,KODE_BARANG,HARGA,QTY,DISKON,BRUTO,JUMLAH)
VALUES (‘001′,’AAAAAAAAA7’,75000,1,0,75000,75000);
UPDATE T_BELI SET TOTAL_BRUTO = TOTAL_BRUTO + 75000, TOTAL_DISKON = TOTAL_DISKON + 0,
TOTAL_JUMLAH = TOTAL_JUMLAH + 75000 WHERE NO_FAKTUR = ‘001’;
COMMIT;

———————————————–
— 5. PERIKSA DATA di MV MASTER SITE
———————————————–
SELECT * FROM T_BELI WHERE NO_FAKTUR = ‘001’;
SELECT * FROM T_DBELI WHERE NO_FAKTUR = ‘001’;

JIKA SUKSES MAKA Replikasi Data dengan Oracle Updatable materialized views, TELAH BERJALAN DENGANsempurna

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: