Data Migration¶
After performing the schema migration, complete the following steps to migrate data:
Use Migration Toolkit to migrate the data. For detailed information about using Migration Toolkit, see the Migration Toolkit Guide.
Configure the Migration Toolkit
toolkit.propertiesfile, ensuring that connection information for the source and target databases is available in the property file:
SRC_DB_URL = jdbc: oracle:thin:@localhost:1521:ORCL
SRC_DB_USER = user_name
SRC_DB_PASSWORD = password
TARGET_DB_URL= jdbc:edb://localhost:5444/migration
TARGET_DB_USER = enterprisedb
TARGET_DB-PASSWORD = password
For more information, see Building the toolkit.properties File.
Invoke Migration Toolkit in
–dataOnlymode. Include the–truncLoadkeyword to resolve foreign key dependencies across tables.For example, the following command migrates data to a schema named
hr:runMTK.sh –dataOnly –targetSchema hr –truncLoad HRThe command migrates the specified
source_schemato thetarget_schema. The data is loaded into the locally installed EDB Postgres instance with a database superuser namedenterprisedband the password ofpassword.
Note!! Note The tables are truncated before attempting the data load.