A. Prepare software migration
1. Download SQLines Data & extract
http://www.sqlines.com/download
SQLines Data is a tool for data transfer, schema conversion and data migration validation/testing.
Note:
SQLines Data tool does not convert views, stored procedures, functions, and triggers, use SQLines SQL Converter to convert them.
1. Download SQLines Data & extract
http://www.sqlines.com/download
SQLines Data is a tool for data transfer, schema conversion and data migration validation/testing.
Note:
SQLines Data tool does not convert views, stored procedures, functions, and triggers, use SQLines SQL Converter to convert them.
2. Download SQLines SQL Converter (Optional)
SQLines SQL Converter
SQLines SQL Converter helps you convert database schema (DDL), queries and DML statements, views, stored procedures, packages, functions and triggers.
3. Extract SQLlines Data
4. download libmysql.dll and extract to directory SQLLine
https://www.dll-files.com/libmysql.dll.html
https://www.dll-files.com/libmariadb.dll.html
5. if need. you can buu license
http://www.sqlines.com/purchase
B. Capture before migration
1. Capture source Database (MariaDB/MySQL)
use tgh;
select * from barang;
select * from customer;
select * from suplier;
select * from pasok;
select * from pembelian;
MariaDB [tka]> show tables;
+---------------+
| Tables_in_tka |
+---------------+
| barang |
| customer |
| pasok |
| pembelian |
| suplier |
+---------------+
5 rows in set (0.00 sec)
MariaDB [tka]> select * from barang;
+-------------+-------------+---------------+-------------+
| KODE_BARANG | NAMA_BARANG | SATUAN_BARANG | STOK_BARANG |
+-------------+-------------+---------------+-------------+
| ELK-02 | LEMARI ES | UNIT | 8 |
| ELK-03 | TELEVISI | UNIT | 30 |
| ELK-04 | RADIO/TAPE | BUAH | 35 |
| ELK-05 | KOMPUTER | UNIT | 28 |
| ELK-06 | KIPAS ANGIN | BUAH | 38 |
+-------------+-------------+---------------+-------------+
5 rows in set (0.03 sec)
MariaDB [tka]> select * from suplier;
+--------------+---------------------+----------------------+--------------+-----------------+
| KODE_SUPLIER | NAMA_SUPLIER | ALAMAT_SUPLIER | KOTA_SUPLIER | TELEPON_SUPLIER |
+--------------+---------------------+----------------------+--------------+-----------------+
| EB-01 | PT ULTRASOUND | JL SUKARNO HATTA 103 | BANDUNG | (021) 522-3305 |
| EB-02 | PT SUPERTRON | JL INDUSTRI 37 | BANDUNG | (021) 660-4091 |
| EB-03 | PT OCHANG | JL KOSAMBI 44 | BANDUNG | (022) 850-4444 |
| EB-04 | PT TUNGGAL JAYA | JL KIARA CONDONG 77 | BANDUNG | (022)740-7777 |
| EJ-01 | PT ACTRON | JL THAMRIN 12 | JAKARTA | (021) 850-2301 |
| EJ-02 | PT MULYA ELEKTRONIK | JL SUDIRMAN 45 | JAKARTA | (021) 855-4262 |
+--------------+---------------------+----------------------+--------------+-----------------+
6 rows in set (0.01 sec)
MariaDB [tka]> exit
Bye
2. Capture destination Target (Oracle)
use tgh;
select * from barang;
select * from customer;
select * from suplier;
select * from pasok;
select * from pembelian;
C:\windows\System32>sqlplus
SQL*Plus: Release 11.2.0.1.0 Production on Mon Mar 8 14:54:02 2021
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Enter user-name: aisyah
Enter password:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select * from tab;
no rows selected
SQL>
C. Migration MariaDB/MySQL to Oracle
1. open sqldataw SQLLine Data
2. Tab Connection. complete form (as example)
Source MariaDB/MySQL
SID/Service Name = tka
User = root
password = xxx
press button Test Connection
Destination Oracle
SID/Service Name = tka
User = aisyah
password = xxx
press button Test Connection
2. Tab Setting
Transfer option = Table recreate (Default)
Table list = *barang*,*customer*,*suplier*,*pasok*,*pembelian* (sample)
3. Press button Transfer & see tab Transfer log
5. Migration success
SQLines Data 3.3.107 x64 - Database Migration Tool.
Copyright (c) 2020 SQLines. All Rights Reserved.
FOR EVALUATION USE ONLY, MAY SKIP 1 ROW FROM A TABLE
Connecting to databases (2.0 sec)
MySQL 10.1.14-MariaDB mariadb.org binary distribution x64 Win64 system YaSSL 2.3.9b (Ok, 2.0 sec)
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production (Ok, 47 ms)
Reading the database schema (5 tables, 328 ms)
Dropping foreign keys on selected tables in target (0 keys, 0 ms)
Transferring database (4 concurrent sessions):
tka.barang - Started (1 of 5, session 1)
tka.barang - Open cursor (5 rows read, 0 ms, session 1)
tka.barang - Drop target table (not exists, 78 ms, session 1)
tka.barang - Create target table (453 ms, session 1)
tka.barang - Data transfer complete (session 1)
Rows read: 5 (0 rows/sec)
Rows written: 5 (27 rows/sec, 105 bytes, 561 bytes/sec)
Transfer time: 734 ms (0 ms read, 187 ms write)
tka.customer - Started (2 of 5, session 1)
tka.customer - Open cursor (5 rows read, 15 ms, session 1)
tka.customer - Drop target table (not exists, 0 ms, session 1)
tka.customer - Create target table (16 ms, session 1)
tka.customer - Data transfer complete (session 1)
Rows read: 5 (333 rows/sec)
Rows written: 5 (313 rows/sec, 252 bytes, 15.4 KB/sec)
Transfer time: 125 ms (15 ms read, 16 ms write)
tka.pasok - Started (3 of 5, session 1)
tka.pasok - Open cursor (11 rows read, 0 ms, session 1)
tka.pasok - Drop target table (not exists, 0 ms, session 1)
tka.pasok - Create target table (62 ms, session 1)
tka.pasok - Data transfer complete (session 1)
Rows read: 11 (0 rows/sec)
Rows written: 11 (0 rows/sec, 331 bytes, 0 bytes/sec)
Transfer time: 109 ms (0 ms read, 0 ms write)
tka.pembelian - Started (4 of 5, session 1)
tka.pembelian - Open cursor (14 rows read, 0 ms, session 1)
tka.pembelian - Drop target table (not exists, 0 ms, session 1)
tka.pembelian - Create target table (0 ms, session 1)
tka.pembelian - Data transfer complete (session 1)
Rows read: 14 (0 rows/sec)
Rows written: 14 (875 rows/sec, 436 bytes, 26.6 KB/sec)
Transfer time: 31 ms (0 ms read, 16 ms write)
tka.suplier - Started (5 of 5, session 1)
tka.suplier - Open cursor (6 rows read, 0 ms, session 1)
tka.suplier - Drop target table (not exists, 16 ms, session 1)
tka.suplier - Create target table (0 ms, session 1)
tka.suplier - Data transfer complete (session 1)
Rows read: 6 (0 rows/sec)
Rows written: 6 (400 rows/sec, 325 bytes, 21.2 KB/sec)
Transfer time: 78 ms (0 ms read, 15 ms write)
Summary:
Tables: 5 (5 Ok, 0 failed)
Target DDL: 10 (10 Ok, 0 failed)
Rows read: 41
Rows written: 41
Transfer time: 6.0 sec (7 rows/sec, 1.4 KB, 240 bytes/sec)
Logs:
Execution log: sqldata.log
DDL SQL statements: sqldata_ddl.sql
D. Capture table
1. MariaDB/MySQL
MariaDB [tka]> desc barang;
+---------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------------+--------------+------+-----+---------+-------+
| KODE_BARANG | char(6) | NO | | NULL | |
| NAMA_BARANG | varchar(25) | YES | | NULL | |
| SATUAN_BARANG | varchar(20) | YES | | NULL | |
| STOK_BARANG | decimal(4,0) | YES | | NULL | |
+---------------+--------------+------+-----+---------+-------+
4 rows in set (0.20 sec)
MariaDB [tka]> desc suplier;
+-----------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------------+-------------+------+-----+---------+-------+
| KODE_SUPLIER | char(5) | NO | | NULL | |
| NAMA_SUPLIER | varchar(30) | YES | | NULL | |
| ALAMAT_SUPLIER | varchar(30) | YES | | NULL | |
| KOTA_SUPLIER | varchar(15) | YES | | NULL | |
| TELEPON_SUPLIER | varchar(15) | YES | | NULL | |
+-----------------+-------------+------+-----+---------+-------+
5 rows in set (0.01 sec)
MariaDB [tka]> desc customer;
+------------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------------+-------------+------+-----+---------+-------+
| KODE_CUSTOMER | char(6) | NO | | NULL | |
| NAMA_CUSTOMER | varchar(30) | YES | | NULL | |
| ALAMAT_CUSTOMER | varchar(30) | YES | | NULL | |
| KOTA_CUSTOMER | varchar(15) | YES | | NULL | |
| TELEPON_CUSTOMER | varchar(15) | YES | | NULL | |
+------------------+-------------+------+-----+---------+-------+
5 rows in set (0.03 sec)
MariaDB [tka]> desc pasok;
+---------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------------+--------------+------+-----+---------+-------+
| KODE_PASOK | char(10) | NO | | NULL | |
| KODE_BARANG | char(6) | NO | | NULL | |
| KODE_SUPLIER | char(5) | NO | | NULL | |
| TANGGAL_PASOK | date | YES | | NULL | |
| JUMLAH_PASOK | decimal(4,0) | YES | | NULL | |
+---------------+--------------+------+-----+---------+-------+
5 rows in set (0.04 sec)
MariaDB [tka]> desc pembelian;
+-------------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------------+--------------+------+-----+---------+-------+
| KODE_PEMBELIAN | char(10) | NO | | NULL | |
| KODE_BARANG | char(6) | NO | | NULL | |
| KODE_CUSTOMER | char(6) | NO | | NULL | |
| TANGGAL_PEMBELIAN | date | YES | | NULL | |
| JUMLAH_PEMBELIAN | decimal(4,0) | YES | | NULL | |
+-------------------+--------------+------+-----+---------+-------+
5 rows in set (0.04 sec)
MariaDB [tka]>
2. Capture Oracle
1. MariaDB/MySQL
MariaDB [tka]> desc barang;
+---------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------------+--------------+------+-----+---------+-------+
| KODE_BARANG | char(6) | NO | | NULL | |
| NAMA_BARANG | varchar(25) | YES | | NULL | |
| SATUAN_BARANG | varchar(20) | YES | | NULL | |
| STOK_BARANG | decimal(4,0) | YES | | NULL | |
+---------------+--------------+------+-----+---------+-------+
4 rows in set (0.20 sec)
MariaDB [tka]> desc suplier;
+-----------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------------+-------------+------+-----+---------+-------+
| KODE_SUPLIER | char(5) | NO | | NULL | |
| NAMA_SUPLIER | varchar(30) | YES | | NULL | |
| ALAMAT_SUPLIER | varchar(30) | YES | | NULL | |
| KOTA_SUPLIER | varchar(15) | YES | | NULL | |
| TELEPON_SUPLIER | varchar(15) | YES | | NULL | |
+-----------------+-------------+------+-----+---------+-------+
5 rows in set (0.01 sec)
MariaDB [tka]> desc customer;
+------------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------------+-------------+------+-----+---------+-------+
| KODE_CUSTOMER | char(6) | NO | | NULL | |
| NAMA_CUSTOMER | varchar(30) | YES | | NULL | |
| ALAMAT_CUSTOMER | varchar(30) | YES | | NULL | |
| KOTA_CUSTOMER | varchar(15) | YES | | NULL | |
| TELEPON_CUSTOMER | varchar(15) | YES | | NULL | |
+------------------+-------------+------+-----+---------+-------+
5 rows in set (0.03 sec)
MariaDB [tka]> desc pasok;
+---------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------------+--------------+------+-----+---------+-------+
| KODE_PASOK | char(10) | NO | | NULL | |
| KODE_BARANG | char(6) | NO | | NULL | |
| KODE_SUPLIER | char(5) | NO | | NULL | |
| TANGGAL_PASOK | date | YES | | NULL | |
| JUMLAH_PASOK | decimal(4,0) | YES | | NULL | |
+---------------+--------------+------+-----+---------+-------+
5 rows in set (0.04 sec)
MariaDB [tka]> desc pembelian;
+-------------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------------+--------------+------+-----+---------+-------+
| KODE_PEMBELIAN | char(10) | NO | | NULL | |
| KODE_BARANG | char(6) | NO | | NULL | |
| KODE_CUSTOMER | char(6) | NO | | NULL | |
| TANGGAL_PEMBELIAN | date | YES | | NULL | |
| JUMLAH_PEMBELIAN | decimal(4,0) | YES | | NULL | |
+-------------------+--------------+------+-----+---------+-------+
5 rows in set (0.04 sec)
MariaDB [tka]>
2. Capture Oracle
SQL> desc barang;
Name Null? Type
----------------------------------------- -------- ----------------------------
KODE_BARANG NOT NULL CHAR(24 CHAR)
NAMA_BARANG VARCHAR2(100 CHAR)
SATUAN_BARANG VARCHAR2(80 CHAR)
STOK_BARANG NUMBER(4)
SQL> desc suplier;
Name Null? Type
----------------------------------------- -------- ----------------------------
KODE_SUPLIER NOT NULL CHAR(20 CHAR)
NAMA_SUPLIER VARCHAR2(120 CHAR)
ALAMAT_SUPLIER VARCHAR2(120 CHAR)
KOTA_SUPLIER VARCHAR2(60 CHAR)
TELEPON_SUPLIER VARCHAR2(60 CHAR)
SQL> desc customer;
Name Null? Type
----------------------------------------- -------- ----------------------------
KODE_CUSTOMER NOT NULL CHAR(24 CHAR)
NAMA_CUSTOMER VARCHAR2(120 CHAR)
ALAMAT_CUSTOMER VARCHAR2(120 CHAR)
KOTA_CUSTOMER VARCHAR2(60 CHAR)
TELEPON_CUSTOMER VARCHAR2(60 CHAR)
SQL> desc pasok;
Name Null? Type
----------------------------------------- -------- ----------------------------
KODE_PASOK NOT NULL CHAR(40 CHAR)
KODE_BARANG NOT NULL CHAR(24 CHAR)
KODE_SUPLIER NOT NULL CHAR(20 CHAR)
TANGGAL_PASOK DATE
JUMLAH_PASOK NUMBER(4)
SQL> desc pembelian;
Name Null? Type
----------------------------------------- -------- ----------------------------
KODE_PEMBELIAN NOT NULL CHAR(40 CHAR)
KODE_BARANG NOT NULL CHAR(24 CHAR)
KODE_CUSTOMER NOT NULL CHAR(24 CHAR)
TANGGAL_PEMBELIAN DATE
JUMLAH_PEMBELIAN NUMBER(4)
SQL>
C:\windows\System32>sqlplus
SQL*Plus: Release 11.2.0.1.0 Production on Mon Mar 8 15:02:22 2021
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Enter user-name: aisyah
Enter password:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select * from barang;
KODE_B NAMA_BARANG SATUAN_BARANG STOK_BARANG
------ ------------------------- -------------------- -----------
ELK-01 RICE COOKER BUAH 20
ELK-02 LEMARI ES UNIT 8
ELK-03 TELEVISI UNIT 30
ELK-04 RADIO/TAPE BUAH 35
ELK-05 KOMPUTER UNIT 28
ELK-06 KIPAS ANGIN BUAH 38
6 rows selected.
SQL> select * from customer;
KODE_C NAMA_CUSTOMER ALAMAT_CUSTOMER
------ ------------------------------ ------------------------------
KOTA_CUSTOMER TELEPON_CUSTOME
--------------- ---------------
B-0001 TOKO WARNA JL ABC 234
BANDUNG (022) 432-6635
B-0002 TOKO SURYA JL ABC 309
BANDUNG (022) 432-6024
B-0003 TOKO MAHARANI JL KOPO 333
BANDUNG (022) 856-3333
KODE_C NAMA_CUSTOMER ALAMAT_CUSTOMER
------ ------------------------------ ------------------------------
KOTA_CUSTOMER TELEPON_CUSTOME
--------------- ---------------
B-0004 TOKO MULYA JL OTISTA 555
BANDUNG (022) 422-5555
J-0001 TOKO KARISMA JL CIMANGGIS 34
JAKARTA (021) 856-4209
J-0002 TOKO AYU JL CIMANGGIS 12
JAKARTA (021) 856-1321
6 rows selected.
SQL> select * from suplier;
KODE_ NAMA_SUPLIER ALAMAT_SUPLIER
----- ------------------------------ ------------------------------
KOTA_SUPLIER TELEPON_SUPLIER
--------------- ---------------
EB-01 PT ULTRASOUND JL SUKARNO HATTA 103
BANDUNG (021) 522-3305
EB-02 PT SUPERTRON JL INDUSTRI 37
BANDUNG (021) 660-4091
EB-03 PT OCHANG JL KOSAMBI 44
BANDUNG (022) 850-4444
KODE_ NAMA_SUPLIER ALAMAT_SUPLIER
----- ------------------------------ ------------------------------
KOTA_SUPLIER TELEPON_SUPLIER
--------------- ---------------
EB-04 PT TUNGGAL JAYA JL KIARA CONDONG 77
BANDUNG (022)740-7777
EJ-01 PT ACTRON JL THAMRIN 12
JAKARTA (021) 850-2301
EJ-02 PT MULYA ELEKTRONIK JL SUDIRMAN 45
JAKARTA (021) 855-4262
6 rows selected.
SQL> select * from pasok;
KODE_PASOK KODE_B KODE_ TANGGAL_P JUMLAH_PASOK
---------- ------ ----- --------- ------------
PAS-E001 ELK-01 EJ-01 01-JAN-02 8
PAS-E002 ELK-01 EJ-02 01-JAN-02 5
PAS-E003 ELK-02 EJ-01 01-FEB-02 2
PAS-E004 ELK-02 EJ-02 02-FEB-02 3
PAS-E005 ELK-02 EB-02 01-JAN-02 2
PAS-E006 ELK-03 EJ-01 03-MAR-02 5
PAS-E007 ELK-03 EJ-01 04-MAR-02 2
PAS-E008 ELK-03 EJ-01 03-MAR-02 3
PAS-E009 ELK-03 EB-01 13-MAR-02 4
PAS-E010 ELK-03 EB-01 13-MAR-02 3
PAS-E011 ELK-04 EB-01 22-APR-02 12
PAS-E012 ELK-04 EB-02 30-APR-02 9
12 rows selected.
SQL> select * from pembelian;
KODE_PEMBE KODE_B KODE_C TANGGAL_P JUMLAH_PEMBELIAN
---------- ------ ------ --------- ----------------
BEL-E001 ELK-01 J-0001 20-MAY-02 3
BEL-E002 ELK-01 J-0001 21-MAY-02 4
BEL-E003 ELK-01 J-0002 20-MAY-02 2
BEL-E004 ELK-01 B-0001 20-MAY-02 2
BEL-E005 ELK-01 B-0002 22-MAY-02 3
BEL-E006 ELK-02 J-0001 24-JUN-02 1
BEL-E007 ELK-02 J-0002 24-JUN-02 1
BEL-E008 ELK-02 B-0001 25-JUN-02 2
BEL-E009 ELK-02 B-0002 25-JUN-02 2
BEL-E010 ELK-03 J-0001 20-JUN-02 5
BEL-E011 ELK-03 J-0002 02-JUL-02 4
BEL-E012 ELK-03 B-0001 02-JUL-02 6
BEL-E013 ELK-03 J-0001 10-JUL-02 5
BEL-E014 ELK-04 J-0002 15-JUL-02 12
BEL-E015 ELK-04 B-0002 17-JUL-02 15
15 rows selected.
SQL>
Name Null? Type
----------------------------------------- -------- ----------------------------
KODE_BARANG NOT NULL CHAR(24 CHAR)
NAMA_BARANG VARCHAR2(100 CHAR)
SATUAN_BARANG VARCHAR2(80 CHAR)
STOK_BARANG NUMBER(4)
SQL> desc suplier;
Name Null? Type
----------------------------------------- -------- ----------------------------
KODE_SUPLIER NOT NULL CHAR(20 CHAR)
NAMA_SUPLIER VARCHAR2(120 CHAR)
ALAMAT_SUPLIER VARCHAR2(120 CHAR)
KOTA_SUPLIER VARCHAR2(60 CHAR)
TELEPON_SUPLIER VARCHAR2(60 CHAR)
SQL> desc customer;
Name Null? Type
----------------------------------------- -------- ----------------------------
KODE_CUSTOMER NOT NULL CHAR(24 CHAR)
NAMA_CUSTOMER VARCHAR2(120 CHAR)
ALAMAT_CUSTOMER VARCHAR2(120 CHAR)
KOTA_CUSTOMER VARCHAR2(60 CHAR)
TELEPON_CUSTOMER VARCHAR2(60 CHAR)
SQL> desc pasok;
Name Null? Type
----------------------------------------- -------- ----------------------------
KODE_PASOK NOT NULL CHAR(40 CHAR)
KODE_BARANG NOT NULL CHAR(24 CHAR)
KODE_SUPLIER NOT NULL CHAR(20 CHAR)
TANGGAL_PASOK DATE
JUMLAH_PASOK NUMBER(4)
SQL> desc pembelian;
Name Null? Type
----------------------------------------- -------- ----------------------------
KODE_PEMBELIAN NOT NULL CHAR(40 CHAR)
KODE_BARANG NOT NULL CHAR(24 CHAR)
KODE_CUSTOMER NOT NULL CHAR(24 CHAR)
TANGGAL_PEMBELIAN DATE
JUMLAH_PEMBELIAN NUMBER(4)
SQL>
C:\windows\System32>sqlplus
SQL*Plus: Release 11.2.0.1.0 Production on Mon Mar 8 15:02:22 2021
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Enter user-name: aisyah
Enter password:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select * from barang;
KODE_B NAMA_BARANG SATUAN_BARANG STOK_BARANG
------ ------------------------- -------------------- -----------
ELK-01 RICE COOKER BUAH 20
ELK-02 LEMARI ES UNIT 8
ELK-03 TELEVISI UNIT 30
ELK-04 RADIO/TAPE BUAH 35
ELK-05 KOMPUTER UNIT 28
ELK-06 KIPAS ANGIN BUAH 38
6 rows selected.
SQL> select * from customer;
KODE_C NAMA_CUSTOMER ALAMAT_CUSTOMER
------ ------------------------------ ------------------------------
KOTA_CUSTOMER TELEPON_CUSTOME
--------------- ---------------
B-0001 TOKO WARNA JL ABC 234
BANDUNG (022) 432-6635
B-0002 TOKO SURYA JL ABC 309
BANDUNG (022) 432-6024
B-0003 TOKO MAHARANI JL KOPO 333
BANDUNG (022) 856-3333
KODE_C NAMA_CUSTOMER ALAMAT_CUSTOMER
------ ------------------------------ ------------------------------
KOTA_CUSTOMER TELEPON_CUSTOME
--------------- ---------------
B-0004 TOKO MULYA JL OTISTA 555
BANDUNG (022) 422-5555
J-0001 TOKO KARISMA JL CIMANGGIS 34
JAKARTA (021) 856-4209
J-0002 TOKO AYU JL CIMANGGIS 12
JAKARTA (021) 856-1321
6 rows selected.
SQL> select * from suplier;
KODE_ NAMA_SUPLIER ALAMAT_SUPLIER
----- ------------------------------ ------------------------------
KOTA_SUPLIER TELEPON_SUPLIER
--------------- ---------------
EB-01 PT ULTRASOUND JL SUKARNO HATTA 103
BANDUNG (021) 522-3305
EB-02 PT SUPERTRON JL INDUSTRI 37
BANDUNG (021) 660-4091
EB-03 PT OCHANG JL KOSAMBI 44
BANDUNG (022) 850-4444
KODE_ NAMA_SUPLIER ALAMAT_SUPLIER
----- ------------------------------ ------------------------------
KOTA_SUPLIER TELEPON_SUPLIER
--------------- ---------------
EB-04 PT TUNGGAL JAYA JL KIARA CONDONG 77
BANDUNG (022)740-7777
EJ-01 PT ACTRON JL THAMRIN 12
JAKARTA (021) 850-2301
EJ-02 PT MULYA ELEKTRONIK JL SUDIRMAN 45
JAKARTA (021) 855-4262
6 rows selected.
SQL> select * from pasok;
KODE_PASOK KODE_B KODE_ TANGGAL_P JUMLAH_PASOK
---------- ------ ----- --------- ------------
PAS-E001 ELK-01 EJ-01 01-JAN-02 8
PAS-E002 ELK-01 EJ-02 01-JAN-02 5
PAS-E003 ELK-02 EJ-01 01-FEB-02 2
PAS-E004 ELK-02 EJ-02 02-FEB-02 3
PAS-E005 ELK-02 EB-02 01-JAN-02 2
PAS-E006 ELK-03 EJ-01 03-MAR-02 5
PAS-E007 ELK-03 EJ-01 04-MAR-02 2
PAS-E008 ELK-03 EJ-01 03-MAR-02 3
PAS-E009 ELK-03 EB-01 13-MAR-02 4
PAS-E010 ELK-03 EB-01 13-MAR-02 3
PAS-E011 ELK-04 EB-01 22-APR-02 12
PAS-E012 ELK-04 EB-02 30-APR-02 9
12 rows selected.
SQL> select * from pembelian;
KODE_PEMBE KODE_B KODE_C TANGGAL_P JUMLAH_PEMBELIAN
---------- ------ ------ --------- ----------------
BEL-E001 ELK-01 J-0001 20-MAY-02 3
BEL-E002 ELK-01 J-0001 21-MAY-02 4
BEL-E003 ELK-01 J-0002 20-MAY-02 2
BEL-E004 ELK-01 B-0001 20-MAY-02 2
BEL-E005 ELK-01 B-0002 22-MAY-02 3
BEL-E006 ELK-02 J-0001 24-JUN-02 1
BEL-E007 ELK-02 J-0002 24-JUN-02 1
BEL-E008 ELK-02 B-0001 25-JUN-02 2
BEL-E009 ELK-02 B-0002 25-JUN-02 2
BEL-E010 ELK-03 J-0001 20-JUN-02 5
BEL-E011 ELK-03 J-0002 02-JUL-02 4
BEL-E012 ELK-03 B-0001 02-JUL-02 6
BEL-E013 ELK-03 J-0001 10-JUL-02 5
BEL-E014 ELK-04 J-0002 15-JUL-02 12
BEL-E015 ELK-04 B-0002 17-JUL-02 15
15 rows selected.
SQL>
E. Test insert resutl migration MariaDB/MySQL to Oracle
select * from barang where KODE_BARANG ='ELK-99';
select * from suplier where KODE_SUPLIER ='EJ-99';
select * from customer where KODE_CUSTOMER ='J-0099';
select * from pasok where KODE_PASOK ='PAS-E099';
select * from pembelian where KODE_PEMBELIAN ='BEL-E099';
insert into barang(KODE_BARANG,NAMA_BARANG,SATUAN_BARANG,STOK_BARANG) values('ELK-99','Barang - After Migration','BUAH',20);
insert into suplier(KODE_SUPLIER,NAMA_SUPLIER,ALAMAT_SUPLIER,KOTA_SUPLIER,TELEPON_SUPLIER) values ('EJ-99','Suplier - After Migration','JL THAMRIN 12','JAKARTA','(021) 850-2301');
insert into customer(KODE_CUSTOMER,NAMA_CUSTOMER,ALAMAT_CUSTOMER,KOTA_CUSTOMER,TELEPON_CUSTOMER) values('J-0099','Customer - After Migration','JL CIMANGGIS 34','JAKARTA','(021) 856-4209');
insert into pasok(KODE_PASOK,KODE_BARANG,KODE_SUPLIER,TANGGAL_PASOK,JUMLAH_PASOK) values('PAS-E099','ELK-99','EJ-99','1-Jan-02',8);
insert into pembelian(KODE_PEMBELIAN,KODE_BARANG,KODE_CUSTOMER,TANGGAL_PEMBELIAN,JUMLAH_PEMBELIAN) values('BEL-E099','ELK-99','J-0099','20-May-02',3);
select * from barang where KODE_BARANG ='ELK-99';
select * from suplier where KODE_SUPLIER ='EJ-99';
select * from customer where KODE_CUSTOMER ='J-0099';
select * from pasok where KODE_PASOK ='PAS-E099';
select * from pembelian where KODE_PEMBELIAN ='BEL-E099';
delete from barang where kode_barang = 'ELK-99';
delete from suplier where kode_suplier = 'EJ-99';
delete from customer where kode_customer = 'J-0099';
delete from pasok where kode_pasok = 'PAS-E099';
delete from pembelian where kode_pembelian = 'BEL-E099';
select * from barang where KODE_BARANG ='ELK-99';
select * from suplier where KODE_SUPLIER ='EJ-99';
select * from customer where KODE_CUSTOMER ='J-0099';
select * from pasok where KODE_PASOK ='PAS-E099';
select * from pembelian where KODE_PEMBELIAN ='BEL-E099';
log
No comments:
Post a Comment