EnterpriseDB Migration Toolkit (MTK) Installation, Configuration and Commands
EDB Migration Toolkit is a powerful command-line tool that offers granular control of the migration process.
Migration Toolkit facilitates migration of database objects and data to an EDB Postgres Advanced Server (Advanced Server) or PostgreSQL database from:
- Oracle
- MySQL
- Microsoft SQL Server
- Sybase
which objects migrate to postgres
Oracle Objects:
- Schemas
- Tables
- List-Partitioned Tables
- Range-Partitioned Table
- Constraints
- Indexes
- Triggers
- Table Data
- Views
- Materialized Views
- Packages
- Procedures
- Functions
- Sequences
- Users/Roles
- Profiles
- Object Types
- Object Type Methods
- Database Links
- Queues
MySQL Objects:
- Schemas
- Tables
- Constraints
- Indexes
- Table Data
Microsoft SQL Server Objects:
- Schemas
- Tables
- Constraints
- Indexes
- Table Data
Sybase Objects:
- Schemas
- Tables
- Constraints
- Indexes
- Table Data
- Views
Install EDB-Migration Toolkit
Install Repository file and change repository username and password
yum -y install https://yum.enterprisedb.com/edbrepos/edb-repo-latest.noarch.rpm
vi /etc/yum.repos.d/edb.repo
[edb]
name=EnterpriseDB RPMs $releasever - $basearch
baseurl=https://ravirajdba92:KnjF6PGtfjrFmT2f@yum.enterprisedb.com/edb/redhat/rhel-$releasever-$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/ENTERPRISEDB-GPG-KEY
yum install edb-migrationtoolkit
MTK Tool Bin path =/usr/edb/migrationtoolkit/bin
MTK Tool configuration file path=/usr/edb/migrationtoolkit/etc
edit MTK configuration file for Oracle to Postgres Migration:
vi toolkit.properties
SRC_DB_URL=jdbc:oracle:thin:@192.168.1.201:1521:pearl
SRC_DB_USER=mms
SRC_DB_PASSWORD=mms
TARGET_DB_URL=jdbc:edb://192.168.1.201:5444/edb
TARGET_DB_USER=enterprisedb
TARGET_DB_PASSWORD=post
edit MTK configuration file for MySQL to Postgres Migration:
change SRC_DB_URL onlyjdbc:mysql://<host_name>[:<port>]/<database_id>
edit MTK configuration file for Sybase to Postgres Migration:
change SRC_DB_URL onlyjdbc:jtds:sybase://<host_name>[:<port>]/<database_id>
edit MTK configuration file for SQL Server
to Postgres Migration:change SRC_DB_URL only
jdbc:jtds:sqlserver:<server_name>[:<port>]<database_id>
Download and paste the ojdbc file
[root@server1 lib]# pwd
/usr/edb/migrationtoolkit/lib
[root@server1 lib]# ll
-rwxr-xr-x. 1 root root 315292 Mar 10 03:29 commons-lang3-3.1.jar
-rwxr-xr-x. 1 root root 223779 Mar 10 03:29 edb-commons.jar
lrwxrwxrwx. 1 root root 48 Jul 23 10:06 edb-jdbc17.jar -> /usr/edb/migrationtoolkit/../jdbc/edb-jdbc17.jar
-rwxr-xr-x. 1 root root 483663 Mar 10 03:29 log4j-1.2.17.jar
-rwxrwxrwx. 1 root root 2739616 Jul 23 10:21 ojdbc6.jar
authentication and authorization for both server
Start Oracle listener and pg_hba.conf ipv4 entery for postgresql
Run EDB-Migration Toolkit
EDB-Migration Toolkit provide two types of migration
- online Migration
- offline Migration
online Migration:
cd /usr/edb/migrationtoolkit/bin
./runMTK.sh -allSchemas
offline Migration:
./runMTK.sh -offlineMigration /home/oracle/muthu_migration.sql -allSchemas
import offline Migration:
su - enterprisedb
cd /opt/edb/as10/bin
./psql
edb=#i /home/oracle/muthu_migration.sql
Comments
Post a Comment