Quantcast
Channel: Teguh Triharto Learning Center
Viewing all articles
Browse latest Browse all 413

.::: Migration SQL Server to Oracle Using SQL Developer and Metode Copy to Oracle (Only Table) :::.

$
0
0


A. Pre Upgrade

1. Download SQL Developer & Extract

2. To connect to third-party database (MySQL, Microsoft SQL Server, Sybase Adaptive Server,  Microsoft Access, IBM DB2) using SQL Developer, we need jTDS driver. You can download needed jTDS driver from following link. http://sourceforge.net/projects/jtds/files/jtds/1.2/jtds-1.2-dist.zip/download  . 

Extract the dowloaded zip file named jtds-1.2-dist.zip

3. Click “Tools” and then “Prefenrences”.



4. Select “Third Party JDBC Drivers” and click “Add Entry” button to add jTDS driver for SQL Server.

5. Select jar file located in jTDS driver folder. & OK

6. capture MSSQL (Source)
exe sp_column barang;
select * from barang 


7. Capture oracle (Destination)
C:\Users\teguh>sqlplus
SQL*Plus: Release 11.2.0.1.0 Production on Fri Feb 12 06:43:59 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 tgh.barang;
select * from tgh.barang                  *
ERROR at line 1:
ORA-00942: table or view does not exist
SQL> select * from tgh.customer;
select * from tgh.customer
                  *
ERROR at line 1:
ORA-00942: table or view does not exist
SQL> select * from tgh.suplier;
select * from tgh.suplier
                  *
ERROR at line 1:
ORA-00942: table or view does not exist
SQL> select * from tgh.pasok;
select * from tgh.pasok
                  *
ERROR at line 1:
ORA-00942: table or view does not exist
SQL> select * from tgh.pembelian;
select * from tgh.pembelian
                  *
ERROR at line 1:
ORA-00942: table or view does not exist
SQL> select * from barang;
select * from barang
              *
ERROR at line 1:
ORA-00942: table or view does not exist
SQL> select * from customer;
select * from customer
              *
ERROR at line 1:
ORA-00942: table or view does not exist
SQL> select * from suplier;
select * from suplier
              *
ERROR at line 1:
ORA-00942: table or view does not exist
SQL> select * from pasok;
select * from pasok
              *
ERROR at line 1:
ORA-00942: table or view does not exist
SQL> select * from pembelian;
select * from pembelian
              *
ERROR at line 1:
ORA-00942: table or view does not exist
SQL>


B. Migration Database
1. create user di system as sysdba (optional) on oracle
create user aisyah identified by hanin ;
grant CONNECT to aisyah;
grant resource to aisyah;
grant oem_monitor to aisyah;
grant SELECT ANY DICTIONARY to aisyah;
grant SELECT ANY TABLE to aisyah;
grant SELECT ANY SEQUENCE to aisyah;
grant CREATE ANY PROCEDURE to aisyah;
grant CREATE ANY TRIGGER to aisyah;
grant CREATE ANY TYPE to aisyah;
grant EXECUTE ANY PROCEDURE to aisyah;
grant CREATE ANY TABLE  to aisyah;
grant ALTER ANY TABLE to aisyah;
grant INSERT ANY TABLE  to aisyah;
grant UPDATE ANY TABLE to aisyah;
grant DROP ANY TABLE to aisyah;
grant CREATE ANY INDEX to aisyah;
grant ALTER ANY INDEX to aisyah;
grant DROP ANY INDEX to aisyah;
grant CREATE ANY TRIGGER  to aisyah;
grant ALTER ANY TRIGGER to aisyah;
grant DROP ANY TRIGGER to aisyah;

2. create repository on oracle 
CREATE USER demox IDENTIFIED BY demox DEFAULT TABLESPACE USERS TEMPORARY TABLESPACE TEMP;
GRANT CONNECT, RESOURCE, CREATE SESSION, CREATE VIEW TO demox;
grant resource to demox with admin option;
grant create role to demox with admin option;
grant alter any trigger to demox with admin option;
grant create user to demox with admin option;

3. create connection DB Source (SQL Server)

4. create connection DB Repository (Oracle)

5. Create connection DB Destination (Oracle)


6. Create repository 
select database repository (example demox) -> Migration Repository -> Associate Migration Report


7. Check repository status 


8. select table source database & Right Click -> Copy To Oracle 


9. Option 
select Destination Connection Name = demox
Copy DDL = Do Not Replace
Check Copy Data = Append


10. Summary & OK


11. Copy to Oracle Success


C. Capture after migration with metode Copy to Oracle  
1. capture MSSQL (Source)
select * from INFORMATION_SCHEMA.TABLES
exe sp_column barang;
select * from barang 


2. Capture oracle (Destination)
C:\Users\teguh>sqlplus
SQL*Plus: Release 11.2.0.1.0 Production on Fri Feb 12 06:43:59 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;










Viewing all articles
Browse latest Browse all 413

Trending Articles