Saturday, January 30, 2021

.::: Migration Oracle Database to Microsoft SQL Server (MSSQL) using SSMA for Oracle :::.


A. Pre Migration

1. Download & Install SQL Server Migration Assistant for Oracle 

https://docs.microsoft.com/id-id/sql/ssma/oracle/installing-ssma-for-oracle-client-oracletosql?view=sql-server-2017

SSMAforOracle_8.16.0.msi

SSMAforOracleExtensionPack_8.16.0.msi

2. Create privilege user for access oracle 

create user 'teguh' identified by 'triharto';
grant CONNECT to teguh;
grant SELECT ANY DICTIONARY to teguh;
grant SELECT ANY TABLE to teguh;
grant SELECT ANY SEQUENCE to teguh;
grant CREATE ANY PROCEDURE to teguh;
grant CREATE ANY TRIGGER to teguh;
grant CREATE ANY TYPE to teguh;
grant EXECUTE ANY PROCEDURE to teguh;
grant CREATE ANY TABLE  to teguh;
grant ALTER ANY TABLE to teguh;
grant INSERT ANY TABLE  to teguh;
grant UPDATE ANY TABLE to teguh;
grant DROP ANY TABLE to teguh;
grant CREATE ANY INDEX to teguh;
grant ALTER ANY INDEX to teguh;
grant DROP ANY INDEX to teguh;
grant CREATE ANY TRIGGER  to teguh;
grant ALTER ANY TRIGGER to teguh;
grant DROP ANY TRIGGER to teguh;

4. Capture database & table Oracle(sample existing (Source) dbname(SID)= tgh). user = teguh, password = triharto 

C:\Users\teguh>sqlplus
SQL*Plus: Release 11.2.0.1.0 Production on Sat Jan 30 21:15:06 2021
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
Enter user-name: teguh
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;
TNAME                          TABTYPE  CLUSTERID
------------------------------ ------- ----------
BARANG                         TABLE
CUSTOMER                       TABLE
PASOK                          TABLE
PEMBELIAN                      TABLE
SUPLIER                        TABLE
SQL> select * from barang;
KODE_B NAMA_BARANG               SATUAN_BARANG        STOK_BARANG KETERANGAN
------ ------------------------- -------------------- ----------- ---------------
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>

5. Create new destination database SQL Server (sample new(destination) dbname = tghth)

select * from INFORMATION_SCHEMA.TABLES


B. Activity Migration 

1. Open SQL Server Migration Assistant for Oracle & create new project

2. fille form & Ok 

   Name : SqlMigration-teguhth-oracletosql
   Migration to : SQL Server 2012 (choose for version MSSQL) 

3. On SQL Server Migration Assistant for Oracle, press button "Connect to Oracle" an fill form & connect 


  Mode : Standard mode
  Provider : Oracle Data Provider for NET 
  Server Name: localhost
  Server Port: 1521
  User : teguh
  password: triharto

4. Filter objects and ok


5. on Oracle Metadata Explorer, select tables from database that will be migration


6. On SQL Server Migration Assistant for Oracle, press button "Connect to SQL Server" an fill form & connect

  Server Name : localhost
   Database destination : tghth   
   Authentication  : SQL Server Authentication
   User Name : sa
   password: <xxxx>

 


7. on Oracle Metadata Explorer, select tables from database that will be migration, press button Convert Schema


Starting conversion...
Analyzing metadata...
Converting table TEGUH.BARANG ...
Converting table TEGUH.CUSTOMER ...
Converting table TEGUH.PASOK ...
Converting table TEGUH.PEMBELIAN ...
Converting table TEGUH.SUPLIER ...
Conversion finished with 0 errors, 0 warnings, and 0 informational messages.

8. on SQL Server Metadata Explorer, select tables from database that will be Migrated (restore) and syncronize with Database 



Connection to SQL Server established successfully.
Connection string: Data Source=localhost;Integrated Security=False;User ID=sa;Pooling=False;Encrypt=False;Application Name="SSMA for Oracle"
Synchronizing objects with database...
Analyzing metadata...
Preparing database tghth...
Preparing category Schemas of database tghth...
Preparing schema tghth.dbo...
Preparing category Datatypes of schema tghth.dbo...
Preparing category Functions of schema tghth.dbo...
Preparing category Procedures of schema tghth.dbo...
Preparing category Tables of schema tghth.dbo...
Preparing category Views of schema tghth.dbo...
Preparing category Sequences of schema tghth.dbo...
Preparing category Synonyms of schema tghth.dbo...
Preparing schema tghth.guest...
Preparing category Datatypes of schema tghth.guest...
Preparing category Functions of schema tghth.guest...
Preparing category Procedures of schema tghth.guest...
Preparing category Tables of schema tghth.guest...
Preparing category Views of schema tghth.guest...
Preparing category Sequences of schema tghth.guest...
Preparing category Synonyms of schema tghth.guest...
Preparing schema tghth.INFORMATION_SCHEMA...
Preparing category Datatypes of schema tghth.INFORMATION_SCHEMA...
Preparing category Functions of schema tghth.INFORMATION_SCHEMA...
Preparing category Procedures of schema tghth.INFORMATION_SCHEMA...
Preparing category Tables of schema tghth.INFORMATION_SCHEMA...
Preparing category Views of schema tghth.INFORMATION_SCHEMA...
Preparing category Sequences of schema tghth.INFORMATION_SCHEMA...
Preparing category Synonyms of schema tghth.INFORMATION_SCHEMA...
Preparing schema tghth.sys...
Preparing category Datatypes of schema tghth.sys...
Preparing category Functions of schema tghth.sys...
Preparing category Procedures of schema tghth.sys...
Preparing category Tables of schema tghth.sys...
Preparing category Views of schema tghth.sys...
Preparing category Sequences of schema tghth.sys...
Preparing category Synonyms of schema tghth.sys...
Preparing schema tghth.db_owner...
Preparing category Datatypes of schema tghth.db_owner...
Preparing category Functions of schema tghth.db_owner...
Preparing category Procedures of schema tghth.db_owner...
Preparing category Tables of schema tghth.db_owner...
Preparing category Views of schema tghth.db_owner...
Preparing category Sequences of schema tghth.db_owner...
Preparing category Synonyms of schema tghth.db_owner...
Preparing schema tghth.db_accessadmin...
Preparing category Datatypes of schema tghth.db_accessadmin...
Preparing category Functions of schema tghth.db_accessadmin...
Preparing category Procedures of schema tghth.db_accessadmin...
Preparing category Tables of schema tghth.db_accessadmin...
Preparing category Views of schema tghth.db_accessadmin...
Preparing category Sequences of schema tghth.db_accessadmin...
Preparing category Synonyms of schema tghth.db_accessadmin...
Preparing schema tghth.db_securityadmin...
Preparing category Datatypes of schema tghth.db_securityadmin...
Preparing category Functions of schema tghth.db_securityadmin...
Preparing category Procedures of schema tghth.db_securityadmin...
Preparing category Tables of schema tghth.db_securityadmin...
Preparing category Views of schema tghth.db_securityadmin...
Preparing category Sequences of schema tghth.db_securityadmin...
Preparing category Synonyms of schema tghth.db_securityadmin...
Preparing schema tghth.db_ddladmin...
Preparing category Datatypes of schema tghth.db_ddladmin...
Preparing category Functions of schema tghth.db_ddladmin...
Preparing category Procedures of schema tghth.db_ddladmin...
Preparing category Tables of schema tghth.db_ddladmin...
Preparing category Views of schema tghth.db_ddladmin...
Preparing category Sequences of schema tghth.db_ddladmin...
Preparing category Synonyms of schema tghth.db_ddladmin...
Preparing schema tghth.db_backupoperator...
Preparing category Datatypes of schema tghth.db_backupoperator...
Preparing category Functions of schema tghth.db_backupoperator...
Preparing category Procedures of schema tghth.db_backupoperator...
Preparing category Tables of schema tghth.db_backupoperator...
Preparing category Views of schema tghth.db_backupoperator...
Preparing category Sequences of schema tghth.db_backupoperator...
Preparing category Synonyms of schema tghth.db_backupoperator...
Preparing schema tghth.db_datareader...
Preparing category Datatypes of schema tghth.db_datareader...
Preparing category Functions of schema tghth.db_datareader...
Preparing category Procedures of schema tghth.db_datareader...
Preparing category Tables of schema tghth.db_datareader...
Preparing category Views of schema tghth.db_datareader...
Preparing category Sequences of schema tghth.db_datareader...
Preparing category Synonyms of schema tghth.db_datareader...
Preparing schema tghth.db_datawriter...
Preparing category Datatypes of schema tghth.db_datawriter...
Preparing category Functions of schema tghth.db_datawriter...
Preparing category Procedures of schema tghth.db_datawriter...
Preparing category Tables of schema tghth.db_datawriter...
Preparing category Views of schema tghth.db_datawriter...
Preparing category Sequences of schema tghth.db_datawriter...
Preparing category Synonyms of schema tghth.db_datawriter...
Preparing schema tghth.db_denydatareader...
Preparing category Datatypes of schema tghth.db_denydatareader...
Preparing category Functions of schema tghth.db_denydatareader...
Preparing category Procedures of schema tghth.db_denydatareader...
Preparing category Tables of schema tghth.db_denydatareader...
Preparing category Views of schema tghth.db_denydatareader...
Preparing category Sequences of schema tghth.db_denydatareader...
Preparing category Synonyms of schema tghth.db_denydatareader...
Preparing schema tghth.db_denydatawriter...
Preparing category Datatypes of schema tghth.db_denydatawriter...
Preparing category Functions of schema tghth.db_denydatawriter...
Preparing category Procedures of schema tghth.db_denydatawriter...
Preparing category Tables of schema tghth.db_denydatawriter...
Preparing category Views of schema tghth.db_denydatawriter...
Preparing category Sequences of schema tghth.db_denydatawriter...
Preparing category Synonyms of schema tghth.db_denydatawriter...
Preparing schema tghth.ssma_oracle...
Preparing category Datatypes of schema tghth.ssma_oracle...
Preparing clr-datatype tghth.ssma_oracle.CollectionIndexInt...
Preparing clr-datatype tghth.ssma_oracle.Record...
Preparing clr-datatype tghth.ssma_oracle.CollectionIndexString...
Preparing category Functions of schema tghth.ssma_oracle...
Preparing function tghth.ssma_oracle.abs_weekday...
Preparing function tghth.ssma_oracle.bitand...
Preparing function tghth.ssma_oracle.CollectionFirst...
Preparing function tghth.ssma_oracle.CollectionFirst_varchar...
Preparing function tghth.ssma_oracle.CollectionLast...
Preparing function tghth.ssma_oracle.CollectionLast_varchar...
Preparing function tghth.ssma_oracle.CollectionNext...
Preparing function tghth.ssma_oracle.CollectionNext_varchar...
Preparing function tghth.ssma_oracle.CollectionPrior...
Preparing function tghth.ssma_oracle.CollectionPrior_varchar...
Preparing function tghth.ssma_oracle.cosh...
Preparing function tghth.ssma_oracle.CountCollection...
Preparing function tghth.ssma_oracle.dateadd...
Preparing function tghth.ssma_oracle.datediff...
Preparing function tghth.ssma_oracle.db_error_get_oracle_exception_id...
Preparing function tghth.ssma_oracle.db_error_sqlcode...
Preparing function tghth.ssma_oracle.db_error_sqlerrm_0...
Preparing function tghth.ssma_oracle.db_error_sqlerrm_1...
Preparing function tghth.ssma_oracle.db_fn_check_init_package...
Preparing function tghth.ssma_oracle.db_get_curval_sequence_value...
Preparing function tghth.ssma_oracle.db_get_full_name...
Preparing function tghth.ssma_oracle.db_get_init_package_mutex...
Preparing function tghth.ssma_oracle.db_get_next_sequence_value...
Preparing function tghth.ssma_oracle.db_get_nextval_proc_name...
Preparing function tghth.ssma_oracle.db_get_sequence_table...
Preparing function tghth.ssma_oracle.db_get_value_variant...
Preparing function tghth.ssma_oracle.dbms_lob$getlength_blob...
Preparing function tghth.ssma_oracle.dbms_lob$getlength_clob...
Preparing function tghth.ssma_oracle.dbms_lob$substr_blob...
Preparing function tghth.ssma_oracle.dbms_lob$substr_clob...
Preparing function tghth.ssma_oracle.DBMS_SQL_FETCH_ROWS...
Preparing function tghth.ssma_oracle.DBMS_SQL_IS_OPEN...
Preparing function tghth.ssma_oracle.DBMS_SQL_PREPARE_EXECUTE_SQL...
Preparing function tghth.ssma_oracle.DelCollection...
Preparing function tghth.ssma_oracle.DelCollection_varchar...
Preparing function tghth.ssma_oracle.ExistCollection...
Preparing function tghth.ssma_oracle.ExistCollection_varchar...
Preparing function tghth.ssma_oracle.ExtendCollection...
Preparing function tghth.ssma_oracle.fn_bulk_collect2CollectionComplex...
Preparing function tghth.ssma_oracle.fn_bulk_collect2CollectionSimple...
Preparing function tghth.ssma_oracle.fn_bulk_collect2Record...
Preparing function tghth.ssma_oracle.get_active_login_time...
Preparing function tghth.ssma_oracle.get_active_spid...
Preparing function tghth.ssma_oracle.get_joined_name...
Preparing function tghth.ssma_oracle.get_pv...
Preparing function tghth.ssma_oracle.get_pv_blob...
Preparing function tghth.ssma_oracle.get_pv_clob...
Preparing function tghth.ssma_oracle.get_pv_collection_int...
Preparing function tghth.ssma_oracle.get_pv_collection_str...
Preparing function tghth.ssma_oracle.get_pv_datetime...
Preparing function tghth.ssma_oracle.get_pv_datetime2...
Preparing function tghth.ssma_oracle.get_pv_float...
Preparing function tghth.ssma_oracle.get_pv_int...
Preparing function tghth.ssma_oracle.get_pv_nclob...
Preparing function tghth.ssma_oracle.get_pv_nvarchar...
Preparing function tghth.ssma_oracle.get_pv_record...
Preparing function tghth.ssma_oracle.get_pv_varchar...
Preparing function tghth.ssma_oracle.get_pv_xml...
Preparing function tghth.ssma_oracle.get_value_blob...
Preparing function tghth.ssma_oracle.get_value_clob...
Preparing function tghth.ssma_oracle.get_value_nclob...
Preparing function tghth.ssma_oracle.get_value_variant...
Preparing function tghth.ssma_oracle.get_version$build...
Preparing function tghth.ssma_oracle.get_version$major...
Preparing function tghth.ssma_oracle.get_version$minor...
Preparing function tghth.ssma_oracle.GetCollection_datetime...
Preparing function tghth.ssma_oracle.GetCollection_datetime_varchar...
Preparing function tghth.ssma_oracle.GetCollection_float...
Preparing function tghth.ssma_oracle.GetCollection_float_varchar...
Preparing function tghth.ssma_oracle.GetCollection_int...
Preparing function tghth.ssma_oracle.GetCollection_int_varchar...
Preparing function tghth.ssma_oracle.GetCollection_nvarchar...
Preparing function tghth.ssma_oracle.GetCollection_nvarchar_varchar...
Preparing function tghth.ssma_oracle.GetCollection_varbinary...
Preparing function tghth.ssma_oracle.GetCollection_varchar...
Preparing function tghth.ssma_oracle.GetCollection_varchar_varchar...
Preparing function tghth.ssma_oracle.GetCollection_xml...
Preparing function tghth.ssma_oracle.GetCollection_xml_varchar...
Preparing function tghth.ssma_oracle.GetRecord_datetime...
Preparing function tghth.ssma_oracle.GetRecord_float...
Preparing function tghth.ssma_oracle.GetRecord_int...
Preparing function tghth.ssma_oracle.GetRecord_nvarchar...
Preparing function tghth.ssma_oracle.GetRecord_uniqueidentifier...
Preparing function tghth.ssma_oracle.GetRecord_varbinary...
Preparing function tghth.ssma_oracle.GetRecord_varchar...
Preparing function tghth.ssma_oracle.GetRecord_xml...
Preparing function tghth.ssma_oracle.greatest_datetime...
Preparing function tghth.ssma_oracle.greatest_float...
Preparing function tghth.ssma_oracle.greatest_int...
Preparing function tghth.ssma_oracle.greatest_nvarchar...
Preparing function tghth.ssma_oracle.greatest_real...
Preparing function tghth.ssma_oracle.greatest_varchar...
Preparing function tghth.ssma_oracle.hextoraw_varbinary...
Preparing function tghth.ssma_oracle.initcap_nvarchar...
Preparing function tghth.ssma_oracle.initcap_varchar...
Preparing function tghth.ssma_oracle.instr2_char...
Preparing function tghth.ssma_oracle.instr2_nchar...
Preparing function tghth.ssma_oracle.instr2_nvarchar...
Preparing function tghth.ssma_oracle.instr2_varchar...
Preparing function tghth.ssma_oracle.instr3_char...
Preparing function tghth.ssma_oracle.instr3_nchar...
Preparing function tghth.ssma_oracle.instr3_nvarchar...
Preparing function tghth.ssma_oracle.instr3_varchar...
Preparing function tghth.ssma_oracle.instr4_char...
Preparing function tghth.ssma_oracle.instr4_nchar...
Preparing function tghth.ssma_oracle.instr4_nvarchar...
Preparing function tghth.ssma_oracle.instr4_varchar...
Preparing function tghth.ssma_oracle.isalphanumeric...
Preparing function tghth.ssma_oracle.last_day...
Preparing function tghth.ssma_oracle.least_datetime...
Preparing function tghth.ssma_oracle.least_float...
Preparing function tghth.ssma_oracle.least_int...
Preparing function tghth.ssma_oracle.least_nvarchar...
Preparing function tghth.ssma_oracle.least_real...
Preparing function tghth.ssma_oracle.least_varchar...
Preparing function tghth.ssma_oracle.length_char...
Preparing function tghth.ssma_oracle.length_nchar...
Preparing function tghth.ssma_oracle.length_nvarchar...
Preparing function tghth.ssma_oracle.length_varchar...
Preparing function tghth.ssma_oracle.log_anybase...
Preparing function tghth.ssma_oracle.lpad_nvarchar...
Preparing function tghth.ssma_oracle.lpad_varchar...
Preparing function tghth.ssma_oracle.ltrim2_nvarchar...
Preparing function tghth.ssma_oracle.ltrim2_varchar...
Preparing function tghth.ssma_oracle.months_between...
Preparing function tghth.ssma_oracle.net_ext_version_build...
Preparing function tghth.ssma_oracle.net_ext_version_major...
Preparing function tghth.ssma_oracle.net_ext_version_minor...
Preparing function tghth.ssma_oracle.new_time...
Preparing function tghth.ssma_oracle.next_day...
Preparing function tghth.ssma_oracle.nls_initcap_nvarchar...
Preparing function tghth.ssma_oracle.numberspelledoutenglish...
Preparing function tghth.ssma_oracle.pad_nvarchar...
Preparing function tghth.ssma_oracle.pad_varchar...
Preparing function tghth.ssma_oracle.rawtohex_varchar...
Preparing function tghth.ssma_oracle.rawtohex_varchar_plsql...
Preparing function tghth.ssma_oracle.regexp_like...
Preparing function tghth.ssma_oracle.round_date...
Preparing function tghth.ssma_oracle.round_numeric_0...
Preparing function tghth.ssma_oracle.rpad_nvarchar...
Preparing function tghth.ssma_oracle.rpad_varchar...
Preparing function tghth.ssma_oracle.rtrim2_nvarchar...
Preparing function tghth.ssma_oracle.rtrim2_varchar...
Preparing function tghth.ssma_oracle.SetCollection_datetime...
Preparing function tghth.ssma_oracle.SetCollection_datetime_varchar...
Preparing function tghth.ssma_oracle.SetCollection_float...
Preparing function tghth.ssma_oracle.SetCollection_float_varchar...
Preparing function tghth.ssma_oracle.SetCollection_int...
Preparing function tghth.ssma_oracle.SetCollection_int_varchar...
Preparing function tghth.ssma_oracle.SetCollection_nvarchar...
Preparing function tghth.ssma_oracle.SetCollection_nvarchar_varchar...
Preparing function tghth.ssma_oracle.SetCollection_varbinary...
Preparing function tghth.ssma_oracle.SetCollection_varchar...
Preparing function tghth.ssma_oracle.SetCollection_varchar_varchar...
Preparing function tghth.ssma_oracle.SetCollection_xml...
Preparing function tghth.ssma_oracle.SetCollection_xml_varchar...
Preparing function tghth.ssma_oracle.SetRecord_datetime...
Preparing function tghth.ssma_oracle.SetRecord_float...
Preparing function tghth.ssma_oracle.SetRecord_int...
Preparing function tghth.ssma_oracle.SetRecord_nvarchar...
Preparing function tghth.ssma_oracle.SetRecord_uniqueidentifier...
Preparing function tghth.ssma_oracle.SetRecord_varbinary...
Preparing function tghth.ssma_oracle.SetRecord_varchar...
Preparing function tghth.ssma_oracle.SetRecord_xml...
Preparing function tghth.ssma_oracle.sinh...
Preparing function tghth.ssma_oracle.substr2_varbinary...
Preparing function tghth.ssma_oracle.substr2_varchar...
Preparing function tghth.ssma_oracle.substr2_nvarchar...
Preparing function tghth.ssma_oracle.substr3_varbinary...
Preparing function tghth.ssma_oracle.substr3_varchar...
Preparing function tghth.ssma_oracle.substr3_nvarchar...
Preparing function tghth.ssma_oracle.tanh...
Preparing function tghth.ssma_oracle.to_char_date...
Preparing function tghth.ssma_oracle.to_char_date_ls...
Preparing function tghth.ssma_oracle.to_char_numeric...
Preparing function tghth.ssma_oracle.to_date2...
Preparing function tghth.ssma_oracle.to_number2...
Preparing function tghth.ssma_oracle.translate_nvarchar...
Preparing function tghth.ssma_oracle.translate_varchar...
Preparing function tghth.ssma_oracle.trim_nvarchar...
Preparing function tghth.ssma_oracle.trim_varchar...
Preparing function tghth.ssma_oracle.trim2_nvarchar...
Preparing function tghth.ssma_oracle.trim2_varchar...
Preparing function tghth.ssma_oracle.trim3_nvarchar...
Preparing function tghth.ssma_oracle.trim3_varchar...
Preparing function tghth.ssma_oracle.TrimCollection...
Preparing function tghth.ssma_oracle.trunc...
Preparing function tghth.ssma_oracle.trunc_date...
Preparing function tghth.ssma_oracle.trunc_date2...
Preparing function tghth.ssma_oracle.unique_session_id...
Preparing function tghth.ssma_oracle.utl_file_is_open...
Preparing function tghth.ssma_oracle.width_bucket...
Preparing function tghth.ssma_oracle.vpd_dyn_func...
Preparing category Procedures of schema tghth.ssma_oracle...
Preparing procedure tghth.ssma_oracle.db_check_init_package...
Preparing procedure tghth.ssma_oracle.db_clean_storage...
Preparing procedure tghth.ssma_oracle.db_create_sequence...
Preparing procedure tghth.ssma_oracle.db_drop_sequence...
Preparing procedure tghth.ssma_oracle.db_error_exact_one_row_check...
Preparing procedure tghth.ssma_oracle.db_error_one_or_zero_row_check...
Preparing procedure tghth.ssma_oracle.db_init_package...
Preparing procedure tghth.ssma_oracle.db_prepare_LOB_output...
Preparing procedure tghth.ssma_oracle.db_set_active_process...
Preparing procedure tghth.ssma_oracle.db_set_outparam_bin...
Preparing procedure tghth.ssma_oracle.db_set_outparam_nvch...
Preparing procedure tghth.ssma_oracle.db_set_outparam_vch...
Preparing procedure tghth.ssma_oracle.db_set_outparam_xml...
Preparing procedure tghth.ssma_oracle.db_sp_get_next_sequence_value...
Preparing procedure tghth.ssma_oracle.db_sp_set_sequence_value...
Preparing procedure tghth.ssma_oracle.dbms_lob$read_blob...
Preparing procedure tghth.ssma_oracle.dbms_lob$read_clob...
Preparing procedure tghth.ssma_oracle.dbms_lob$write_blob...
Preparing procedure tghth.ssma_oracle.dbms_lob$write_clob...
Preparing procedure tghth.ssma_oracle.dbms_lob$writeappend_blob...
Preparing procedure tghth.ssma_oracle.dbms_lob$writeappend_clob...
Preparing procedure tghth.ssma_oracle.DBMS_SQL_BIND_VARIABLE_BLOB...
Preparing procedure tghth.ssma_oracle.DBMS_SQL_BIND_VARIABLE_CLOB...
Preparing procedure tghth.ssma_oracle.DBMS_SQL_BIND_VARIABLE_DATETIME...
Preparing procedure tghth.ssma_oracle.DBMS_SQL_BIND_VARIABLE_FLOAT...
Preparing procedure tghth.ssma_oracle.DBMS_SQL_BIND_VARIABLE_INT...
Preparing procedure tghth.ssma_oracle.DBMS_SQL_BIND_VARIABLE_NCLOB...
Preparing procedure tghth.ssma_oracle.DBMS_SQL_BIND_VARIABLE_NVARCHAR...
Preparing procedure tghth.ssma_oracle.DBMS_SQL_BIND_VARIABLE_VARCHAR...
Preparing procedure tghth.ssma_oracle.DBMS_SQL_CLOSE_CURSOR...
Preparing procedure tghth.ssma_oracle.DBMS_SQL_COLUMN_VALUE_BLOB...
Preparing procedure tghth.ssma_oracle.DBMS_SQL_COLUMN_VALUE_CLOB...
Preparing procedure tghth.ssma_oracle.DBMS_SQL_COLUMN_VALUE_DATETIME...
Preparing procedure tghth.ssma_oracle.DBMS_SQL_COLUMN_VALUE_FLOAT...
Preparing procedure tghth.ssma_oracle.DBMS_SQL_COLUMN_VALUE_INT...
Preparing procedure tghth.ssma_oracle.DBMS_SQL_COLUMN_VALUE_NCLOB...
Preparing procedure tghth.ssma_oracle.DBMS_SQL_COLUMN_VALUE_NVARCHAR...
Preparing procedure tghth.ssma_oracle.DBMS_SQL_COLUMN_VALUE_VARCHAR...
Preparing procedure tghth.ssma_oracle.DBMS_SQL_DEFINE_COLUMN_BLOB...
Preparing procedure tghth.ssma_oracle.DBMS_SQL_DEFINE_COLUMN_CLOB...
Preparing procedure tghth.ssma_oracle.DBMS_SQL_DEFINE_COLUMN_DATETIME...
Preparing procedure tghth.ssma_oracle.DBMS_SQL_DEFINE_COLUMN_FLOAT...
Preparing procedure tghth.ssma_oracle.DBMS_SQL_DEFINE_COLUMN_INT...
Preparing procedure tghth.ssma_oracle.DBMS_SQL_DEFINE_COLUMN_NCLOB...
Preparing procedure tghth.ssma_oracle.DBMS_SQL_DEFINE_COLUMN_NVARCHAR...
Preparing procedure tghth.ssma_oracle.DBMS_SQL_DEFINE_COLUMN_VARCHAR...
Preparing procedure tghth.ssma_oracle.DBMS_SQL_EXECUTE...
Preparing procedure tghth.ssma_oracle.DBMS_SQL_EXECUTE_AND_FETCH...
Preparing procedure tghth.ssma_oracle.DBMS_SQL_FETCH_ROWS$IMPL...
Preparing procedure tghth.ssma_oracle.DBMS_SQL_OPEN_CURSOR...
Preparing procedure tghth.ssma_oracle.DBMS_SQL_PARSE...
Preparing procedure tghth.ssma_oracle.DBMS_SQL_VARIABLE_VALUE_BLOB...
Preparing procedure tghth.ssma_oracle.DBMS_SQL_VARIABLE_VALUE_CLOB...
Preparing procedure tghth.ssma_oracle.DBMS_SQL_VARIABLE_VALUE_DATETIME...
Preparing procedure tghth.ssma_oracle.DBMS_SQL_VARIABLE_VALUE_FLOAT...
Preparing procedure tghth.ssma_oracle.DBMS_SQL_VARIABLE_VALUE_INT...
Preparing procedure tghth.ssma_oracle.DBMS_SQL_VARIABLE_VALUE_NCLOB...
Preparing procedure tghth.ssma_oracle.DBMS_SQL_VARIABLE_VALUE_NVARCHAR...
Preparing procedure tghth.ssma_oracle.DBMS_SQL_VARIABLE_VALUE_VARCHAR...
Preparing procedure tghth.ssma_oracle.set_pv...
Preparing procedure tghth.ssma_oracle.set_pv_bit...
Preparing procedure tghth.ssma_oracle.set_pv_blob...
Preparing procedure tghth.ssma_oracle.set_pv_clob...
Preparing procedure tghth.ssma_oracle.set_pv_collection_int...
Preparing procedure tghth.ssma_oracle.set_pv_collection_str...
Preparing procedure tghth.ssma_oracle.set_pv_datetime...
Preparing procedure tghth.ssma_oracle.set_pv_datetime2...
Preparing procedure tghth.ssma_oracle.set_pv_float...
Preparing procedure tghth.ssma_oracle.set_pv_int...
Preparing procedure tghth.ssma_oracle.set_pv_nclob...
Preparing procedure tghth.ssma_oracle.set_pv_nvarchar...
Preparing procedure tghth.ssma_oracle.set_pv_record...
Preparing procedure tghth.ssma_oracle.set_pv_varchar...
Preparing procedure tghth.ssma_oracle.set_pv_xml...
Preparing procedure tghth.ssma_oracle.set_value_variant...
Preparing procedure tghth.ssma_oracle.sp_DelCollection...
Preparing procedure tghth.ssma_oracle.sp_DelCollection_varchar...
Preparing procedure tghth.ssma_oracle.sp_ExtendCollection...
Preparing procedure tghth.ssma_oracle.sp_TrimCollection...
Preparing procedure tghth.ssma_oracle.ssma_rethrowerror...
Preparing procedure tghth.ssma_oracle.utl_file_fclose...
Preparing procedure tghth.ssma_oracle.utl_file_fflush...
Preparing procedure tghth.ssma_oracle.utl_file_fopen$impl...
Preparing procedure tghth.ssma_oracle.utl_file_get_line...
Preparing procedure tghth.ssma_oracle.utl_file_put...
Preparing procedure tghth.ssma_oracle.utl_file_put_line...
Preparing procedure tghth.ssma_oracle.utl_file_putf...
Preparing procedure tghth.ssma_oracle.vpd_dyn_proc...
Preparing category Synonyms of schema tghth.ssma_oracle...
Preparing category Tables of schema tghth.ssma_oracle...
Preparing table tghth.ssma_oracle.db_error_list...
Preparing category Triggers of table tghth.ssma_oracle.db_error_list...
Preparing category Indexes of table tghth.ssma_oracle.db_error_list...
Preparing index tghth.ssma_oracle.db_error_list.db_error_list_name...
Preparing index tghth.ssma_oracle.db_error_list.db_error_list_code...
Preparing table tghth.ssma_oracle.db_LOB_output...
Preparing category Triggers of table tghth.ssma_oracle.db_LOB_output...
Preparing category Indexes of table tghth.ssma_oracle.db_LOB_output...
Preparing table tghth.ssma_oracle.db_storage...
Preparing category Triggers of table tghth.ssma_oracle.db_storage...
Preparing category Indexes of table tghth.ssma_oracle.db_storage...
Preparing table tghth.ssma_oracle.t_dbms_sql_bind_variable...
Preparing category Triggers of table tghth.ssma_oracle.t_dbms_sql_bind_variable...
Preparing category Indexes of table tghth.ssma_oracle.t_dbms_sql_bind_variable...
Preparing table tghth.ssma_oracle.t_dbms_sql_cursor...
Preparing category Triggers of table tghth.ssma_oracle.t_dbms_sql_cursor...
Preparing category Indexes of table tghth.ssma_oracle.t_dbms_sql_cursor...
Preparing table tghth.ssma_oracle.t_dbms_sql_define_column...
Preparing category Triggers of table tghth.ssma_oracle.t_dbms_sql_define_column...
Preparing category Indexes of table tghth.ssma_oracle.t_dbms_sql_define_column...
Preparing table tghth.ssma_oracle.t_dbms_sql_recordset...
Preparing category Triggers of table tghth.ssma_oracle.t_dbms_sql_recordset...
Preparing category Indexes of table tghth.ssma_oracle.t_dbms_sql_recordset...
Preparing category Views of schema tghth.ssma_oracle...
Preparing view tghth.ssma_oracle.db_LOB_output_session...
Preparing category Triggers of view tghth.ssma_oracle.db_LOB_output_session...
Preparing category Indexes of view tghth.ssma_oracle.db_LOB_output_session...
Preparing view tghth.ssma_oracle.db_storage_current...
Preparing category Triggers of view tghth.ssma_oracle.db_storage_current...
Preparing category Indexes of view tghth.ssma_oracle.db_storage_current...
Preparing view tghth.ssma_oracle.v_builtinfunctions...
Preparing category Triggers of view tghth.ssma_oracle.v_builtinfunctions...
Preparing category Indexes of view tghth.ssma_oracle.v_builtinfunctions...
Preparing view tghth.ssma_oracle.v_dbms_sql_bind_variable...
Preparing category Triggers of view tghth.ssma_oracle.v_dbms_sql_bind_variable...
Preparing category Indexes of view tghth.ssma_oracle.v_dbms_sql_bind_variable...
Preparing view tghth.ssma_oracle.v_dbms_sql_cursor...
Preparing category Triggers of view tghth.ssma_oracle.v_dbms_sql_cursor...
Preparing category Indexes of view tghth.ssma_oracle.v_dbms_sql_cursor...
Preparing view tghth.ssma_oracle.v_dbms_sql_define_column...
Preparing category Triggers of view tghth.ssma_oracle.v_dbms_sql_define_column...
Preparing category Indexes of view tghth.ssma_oracle.v_dbms_sql_define_column...
Preparing view tghth.ssma_oracle.v_dbms_sql_recordset...
Preparing category Triggers of view tghth.ssma_oracle.v_dbms_sql_recordset...
Preparing category Indexes of view tghth.ssma_oracle.v_dbms_sql_recordset...
Preparing category Sequences of schema tghth.ssma_oracle...
Preparing schema tghth.TEGUH...
Preparing category Datatypes of schema tghth.TEGUH...
Preparing category Functions of schema tghth.TEGUH...
Preparing category Procedures of schema tghth.TEGUH...
Preparing category Tables of schema tghth.TEGUH...
Preparing table tghth.TEGUH.BARANG...
Preparing category Triggers of table tghth.TEGUH.BARANG...
Preparing category Indexes of table tghth.TEGUH.BARANG...
Preparing table tghth.TEGUH.CUSTOMER...
Preparing category Triggers of table tghth.TEGUH.CUSTOMER...
Preparing category Indexes of table tghth.TEGUH.CUSTOMER...
Preparing table tghth.TEGUH.PASOK...
Preparing category Triggers of table tghth.TEGUH.PASOK...
Preparing category Indexes of table tghth.TEGUH.PASOK...
Preparing table tghth.TEGUH.PEMBELIAN...
Preparing category Triggers of table tghth.TEGUH.PEMBELIAN...
Preparing category Indexes of table tghth.TEGUH.PEMBELIAN...
Preparing table tghth.TEGUH.SUPLIER...
Preparing category Triggers of table tghth.TEGUH.SUPLIER...
Preparing category Indexes of table tghth.TEGUH.SUPLIER...
Preparing category Views of schema tghth.TEGUH...
Preparing category Sequences of schema tghth.TEGUH...
Preparing category Synonyms of schema tghth.TEGUH...
Preparing category Assemblies of database tghth...
Preparing assembly tghth.[Microsoft.SqlServer.Types]...
Preparing assembly tghth.SSMA4OracleSQLServerCollections.NET...
Preparing assembly tghth.SSMA4OracleSQLServerExtensions.NET...
Starting Phase #0
Synchronizing tghth.ssma_oracle ...
Synchronizing tghth.TEGUH ...
Loading to database new assembly tghth.SSMA4OracleSQLServerCollections.NET ...

9. on Oracle Metadata Explorer, select tables from database that will be migration, press button Migration Data and connect 

 


  Fill for Oracle  
  Mode : Standard mode
  Provider : Oracle Data Provider for NET 
  Server Name: localhost
  Server Port: 1521
  User : teguh
  password: triharto

  

  Fill for SQL Server 

   Server Name : localhost
   Database destination : tghth   
   Authentication  : SQL Server Authentication
   User Name : sa
   password: <xxxx>

  

10. Waiting until success

Migrating data...
Analyzing metadata...
Preparing table TEGUH.PEMBELIAN...
Preparing table TEGUH.PASOK...
Preparing table TEGUH.CUSTOMER...
Preparing table TEGUH.SUPLIER...
Preparing table TEGUH.BARANG...
Preparing data migration package...
Starting data migration Engine
Starting data migration...
The data migration engine is migrating table '"TEGUH"."CUSTOMER"': > [tghth].[TEGUH].[CUSTOMER], 6 rows total
The data migration engine is migrating table '"TEGUH"."PASOK"': > [tghth].[TEGUH].[PASOK], 12 rows total
The data migration engine is migrating table '"TEGUH"."BARANG"': > [tghth].[TEGUH].[BARANG], 6 rows total
The data migration engine is migrating table '"TEGUH"."PEMBELIAN"': > [tghth].[TEGUH].[PEMBELIAN], 15 rows total
The data migration engine is migrating table '"TEGUH"."SUPLIER"': > [tghth].[TEGUH].[SUPLIER], 6 rows total
Table "TEGUH"."SUPLIER" data migration: 6 rows processed.
Completing migration of table "TEGUH"."SUPLIER"...
Table "TEGUH"."CUSTOMER" data migration: 6 rows processed.
Completing migration of table "TEGUH"."CUSTOMER"...
Migration complete for table '"TEGUH"."SUPLIER"': > [tghth].[TEGUH].[SUPLIER], 6 rows migrated (Elapsed Time = 00:00:00:04:235).
Migration complete for table '"TEGUH"."CUSTOMER"': > [tghth].[TEGUH].[CUSTOMER], 6 rows migrated (Elapsed Time = 00:00:00:04:312).
Table "TEGUH"."PEMBELIAN" data migration: 15 rows processed.
Completing migration of table "TEGUH"."PEMBELIAN"...
Migration complete for table '"TEGUH"."PEMBELIAN"': > [tghth].[TEGUH].[PEMBELIAN], 15 rows migrated (Elapsed Time = 00:00:00:04:256).
Table "TEGUH"."PASOK" data migration: 12 rows processed.
Completing migration of table "TEGUH"."PASOK"...
Migration complete for table '"TEGUH"."PASOK"': > [tghth].[TEGUH].[PASOK], 12 rows migrated (Elapsed Time = 00:00:00:04:319).
Table "TEGUH"."BARANG" data migration: 6 rows processed.
Completing migration of table "TEGUH"."BARANG"...
Migration complete for table '"TEGUH"."BARANG"': > [tghth].[TEGUH].[BARANG], 6 rows migrated (Elapsed Time = 00:00:00:04:320).
Data migration operation has finished.
5 table(s) successfully migrated.
0 table(s) partially migrated.
0 table(s) failed to migrate.
0 table(s) failed to migrate.


C. Post Migration 

1. Open Microsoft SQL Studio & connect Database 

use tghth
select * from INFORMATION_SCHEMA.TABLES
exe sp_column barang;
select * from teguh.barang 


2. Test Insert table to mssql 

use tghth;
select * from teguh.barang where KODE_BARANG ='ELK-99';
select * from teguh.suplier where KODE_SUPLIER ='EJ-99';
select * from teguh.customer where KODE_CUSTOMER ='J-0099';
select * from teguh.pasok where KODE_PASOK ='PAS-E099';
select * from teguh.pembelian where KODE_PEMBELIAN ='BEL-E099';



insert into teguh.barang(KODE_BARANG,NAMA_BARANG,SATUAN_BARANG,STOK_BARANG) values('ELK-99','Barang - After Migration','BUAH',20);
insert into teguh.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 teguh.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 teguh.pasok(KODE_PASOK,KODE_BARANG,KODE_SUPLIER,TANGGAL_PASOK,JUMLAH_PASOK) values('PAS-E099','ELK-99','EJ-99','1-Jan-02',8);
insert into teguh.pembelian(KODE_PEMBELIAN,KODE_BARANG,KODE_CUSTOMER,TANGGAL_PEMBELIAN,JUMLAH_PEMBELIAN) values('BEL-E099','ELK-99','J-0099','20-May-02',3);

select * from teguh.barang where KODE_BARANG ='ELK-99';
select * from teguh.suplier where KODE_SUPLIER ='EJ-99';
select * from teguh.customer where KODE_CUSTOMER ='J-0099';
select * from teguh.pasok where KODE_PASOK ='PAS-E099';
select * from teguh.pembelian where KODE_PEMBELIAN ='BEL-E099';


delete from teguh.barang where kode_barang = 'ELK-99';
delete from teguh.suplier where kode_suplier = 'EJ-99';
delete from teguh.customer where kode_customer = 'J-0099';
delete from teguh.pasok where kode_pasok = 'PAS-E099';
delete from teguh.pembelian where kode_pembelian = 'BEL-E099';


select * from teguh.barang where KODE_BARANG ='ELK-99';
select * from teguh.suplier where KODE_SUPLIER ='EJ-99';
select * from teguh.customer where KODE_CUSTOMER ='J-0099';
select * from teguh.pasok where KODE_PASOK ='PAS-E099';
select * from teguh.pembelian where KODE_PEMBELIAN ='BEL-E099';

No comments:

Post a Comment

Popular Posts