Skip to content

Commit 0e4a2fb

Browse files
authored
Merge pull request #1571 from EnterpriseDB/release/2021-07-19
Release: 2021-07-19 Former-commit-id: f378522
2 parents 46cb395 + 3de19c4 commit 0e4a2fb

40 files changed

+3037
-522
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
title: "What's New"
3+
4+
legacyRedirectsGenerated:
5+
# This list is generated by a script. If you need add entries, use the `legacyRedirects` key.
6+
- "/edb-docs/d/edb-postgres-migration-toolkit/user-guides/user-guide/55.0.0/whats_new.html"
7+
---
8+
9+
<div id="whats_new" class="registered_link"></div>
10+
11+
The following enhancements have been added to the EDB Postgres Migration Toolkit for the 55.0.0 release:
12+
13+
- Table-level parallel data loading
14+
15+
Migration Toolkit now supports parallel data loading at the table level. This allows you to use multiple threads to load data in parallel from the source database table and apply in parallel on the target database table. This significantly improves the data load time when dealing with relatively large size tables. The lab benchmark results have revealed a 25-60% reduction in the data load duration for a large table when using multiple parallel threads. This feature is supported for source PostgreSQL, EDB Postgres Advanced Server, and Oracle databases.
16+
17+
- Addition of new command-line options
18+
19+
As part of the table-level parallel data loading enhancement, the following new options have been added to the MTK command-line options list:
20+
21+
- tableLoaderLimit
22+
- parallelLoadRowLimit
23+
24+
- Migration support for Oracle 18c and 19c
25+
26+
Enablement of schema and data migration from Oracle versions 18c and 19c
27+
28+
- Report total migration time (for schema and data migration)
29+
30+
Now total migration time for the migration session is reported via the `“Total Elapsed Migration Time”` attribute.
31+
32+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
title: "Supported Operating Systems and Database Versions"
3+
4+
legacyRedirectsGenerated:
5+
# This list is generated by a script. If you need add entries, use the `legacyRedirects` key.
6+
- "/edb-docs/d/edb-postgres-migration-toolkit/user-guides/user-guide/55.0.0/supported_operating_systems_and_database_versions.html"
7+
---
8+
9+
<div id="supported_operating_systems_and_database_versions" class="registered_link"></div>
10+
11+
**Database Versions**
12+
13+
The following database product versions can be used with Migration Toolkit:
14+
15+
- PostgreSQL versions 9.6, 10, 11, 12, and 13
16+
- EDB Postgres Advanced Server versions 9.6, 10, 11, 12, and 13
17+
- Oracle 10g Release 2
18+
- Oracle 11g Release 2
19+
- Oracle 12c Release 1
20+
- Oracle 18c Release 1
21+
- Oracle 19c Release 1
22+
- SQL Server 2008
23+
- SQL Server 2012
24+
- SQL Server 2014
25+
- MySQL 5.5.36
26+
- Sybase Adaptive Server Enterprise 15.7
27+
28+
Please contact your EnterpriseDB Account Manager or [[email protected]](mailto:[email protected]) if you require support for other database products.
29+
30+
!!! Note
31+
The Migration Toolkit has not been tested and does not officially support use with Oracle Real Application Clusters (RAC) and Exadata. However, Migration Toolkit may work when it is connected to a single persistent node. For more information, contact your EDB representative.
32+
33+
**Supported Operating Systems Versions**
34+
35+
- Centos or RHEL or OL 7 and 8
36+
- CentOS or RHEL PPCLE 7
37+
- SLES 12 SP5
38+
- Debian 9 and 10
39+
- Ubuntu 18.04 and 20
40+
- Windows (64-bit), 2016, and 2019
41+
- Mac OS X 10.12+
42+
43+
!!! Note
44+
The ojdbc7.jar can cause large data migrations to be incomplete due to a limit on records over Integer.MAX_VALUE (2147483647) while fetching from the ResultSet. To avoid this issue, we recommend upgrading to ojdbc8.jar.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
---
2+
title: "Migration Methodology"
3+
4+
legacyRedirectsGenerated:
5+
# This list is generated by a script. If you need add entries, use the `legacyRedirects` key.
6+
- "/edb-docs/d/edb-postgres-migration-toolkit/user-guides/user-guide/55.0.0/migration_methodology.html"
7+
---
8+
9+
<div id="migration_methodology" class="registered_link"></div>
10+
11+
There are many reasons to consider migrating from one database to another. Migration can allow you to take advantage of new or better technology. If your current database does not offer the right set of capabilities to allow you to scale the system, moving to a database that offers the functionality you need is the best move for your company.
12+
13+
Migration can also be very cost effective. Migrating systems with significant maintenance costs can save money spent on system upkeep. By consolidating the number of databases in use, you can also reduce in-house administrative costs. By using fewer database platforms (or possibly taking advantage of database compatibility), you can do more with your IT budget.
14+
15+
Using more than one database platform can offer you a graceful migration path should a vendor raise their pricing or change their company directive. EnterpriseDB has helped companies migrate their existing database systems to Postgres for years.
16+
17+
We recommend following the methodology detailed in [The Migration Process](#the-migration-process).
18+
19+
<div id="the_migration_process" class="registered_link"></div>
20+
21+
## The Migration Process
22+
23+
The migration path to Postgres includes the following main steps:
24+
25+
1. Start the migration process by determining which database objects and data will be included in the migration. Form a migration team that includes someone with solid knowledge of the architecture and implementation of the source system.
26+
27+
2. Identify potential migration problems. If it is an Oracle-to-EDB Postgres Advanced Server migration, consult the [EnterpriseDB documentation](/epas/latest/) for complete details about the compatibility features supported in EDB Postgres Advanced Server. Consider using EnterpriseDB's migration assessment service to assist in this review.
28+
29+
3. Prepare the migration environment. Obtain and install the necessary software, and establish connectivity between the servers.
30+
31+
4. If the migration involves a large body of data, consider migrating the schema definition before moving the data. Verify the results of the DDL migration and resolve any problems reported in the migration summary. The [Migration Errors section](09_mtk_errors/#mtk_errors) of this document includes information about resolving migration problems.
32+
33+
5. Migrate the data. For small data sets, use Migration Toolkit. If it is an Oracle migration (into EDB Postgres Advanced Server), and the data set is large or if you notice slow data transfer, take advantage of one of the other data movement methods available:
34+
35+
- Use the EDB Postgres Advanced Server database link feature compatible with Oracle databases.
36+
- If your data has BLOB or CLOB data, use the dblink_ora style database links instead of the Oracle style database links.
37+
38+
Both of these methods use the Oracle Call Interface (OCI) to connect to Oracle. After connecting, use an SQL statement to select the data from the 'linked' Oracle database and insert the data into the EDB Postgres Advanced Server database.
39+
40+
6. Confirm the results of the data migration and resolve any problems reported in the migration summary.
41+
42+
7. Convert applications to work with the newly migrated Postgres database. Applications that use open standard connectivity such as JDBC or ODBC normally only require changes to the database connection strings and selection of the EnterpriseDB driver. See [Connecting an Application to Postgres](#connecting_application_postgres) for more information.
43+
44+
8. Test the system performance, and tune the new server. If you are migrating into an EDB Postgres Advanced Server database, take advantage of EDB Postgres Advanced Server's performance tuning utilities:
45+
46+
- Use `Dynatune` to dynamically adjust database configuration resources.
47+
- Use `Optimizer Hints` to direct the query path.
48+
- Use the `ANALYZE` command to retrieve database statistics.
49+
50+
The *EDB Postgres Advanced Server Guide* and *Database* *Compatibility* *for* *Oracle* *Developer's* *Guide* (both available through the EnterpriseDB website) offer information about the performance tuning tools available with EDB Postgres Advanced Server.
51+
52+
<div id="connecting_application_postgres" class="registered_link"></div>
53+
54+
## Connecting an Application to Postgres
55+
56+
To convert a client application to use a Postgres database, you must modify the connection properties to specify the new target database. In the case of a Java application, change the JDBC driver name (`Class.forName`) and JDBC URL.
57+
58+
A Java application running on Oracle might have the following connection properties:
59+
60+
```text
61+
Class.forName("oracle.jdbc.driver.OracleDriver");
62+
Connection con =
63+
DriverManager.getConnection
64+
("jdbc:oracle:thin:@localhost:1521:xe",
65+
"user",
66+
"password")
67+
```
68+
69+
Modify the connection string to connect to a Postgres server:
70+
71+
```text
72+
Class.forName("com.edb.Driver")
73+
Connection con = DriverManager.getConnection
74+
("jdbc:edb://localhost:5444/edb",
75+
"user",
76+
"password");
77+
```
78+
79+
Converting an ODBC application to connect to an instance of Postgres is a two-step process.
80+
81+
1. To connect an ODBC application, use an ODBC data source administrator to create a data source that defines the connection properties for the new target database.
82+
83+
Most Linux and Windows systems include graphical tools that allow you to create and edit ODBC data sources. After installing ODBC, check the `Administrative Tools` menu for a link to the `ODBC Data Source Administrator`. Click the `Add` button to start the `Create New Data Source` wizard; complete the dialogs to define the new target data source.
84+
85+
2. Change the application to use the new data source.
86+
87+
The application will contain a call to `SQLConnect` (or possibly `SQLDriverConnect`); edit the invocation to change the data source name. In the following example, the data source is named `OracleDSN`:
88+
89+
```text
90+
result = SQLConnect(conHandle, // Connection handle
91+
(returned)
92+
"OracleDSN", SQL_NTS, // Data source name
93+
username, SQL_NTS, // User name
94+
password, SQL_NTS); // Password
95+
```
96+
97+
To connect to an instance of Postgres defined in a data source named `PostgresDSN`, change the data source name:
98+
99+
```text
100+
result = SQLConnect(conHandle, // Connection handle (returned)
101+
"PostgresDSN", SQL_NTS, // Data source name
102+
username, SQL_NTS, // User name
103+
password, SQL_NTS); // Password
104+
```
105+
106+
After establishing a connection between the application and the server, test the application to find any compatibility problems between the application and the migrated schema. In most cases, a simple change will resolve any incompatibility that the application encounters. In cases where a feature is not supported, use a workaround or third party tool to provide the functionality required by the application. See [Migration Errors](09_mtk_errors/#mtk_errors), for information about some common problems and their workarounds.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
---
2+
title: "Functionality Overview"
3+
4+
legacyRedirectsGenerated:
5+
# This list is generated by a script. If you need add entries, use the `legacyRedirects` key.
6+
- "/edb-docs/d/edb-postgres-migration-toolkit/user-guides/user-guide/55.0.0/functionality_overview.html"
7+
---
8+
9+
<div id="functionality_overview" class="registered_link"></div>
10+
11+
Migration Toolkit is a powerful command-line tool that offers granular control of the migration process. Using Migration Toolkit is a two-step process:
12+
13+
1. Edit the `toolkit.properties` file to specify the source and target database.
14+
15+
2. Invoke Migration Toolkit at the command line, specifying migration options.
16+
17+
Migration Toolkit facilitates migration of database objects and data to an EDB Postgres Advanced Server or PostgreSQL database from:
18+
19+
- Oracle
20+
- MySQL
21+
- SQL Server
22+
23+
Migration Toolkit also allows you to migrate database objects and data to an EDB Postgres Advanced Server database from Sybase. You can also use Migration Toolkit to migrate between EDB Postgres Advanced Server and PostgreSQL. Migration Toolkit includes a number of options, allowing you granular control of the migration process:
24+
25+
- Use the `-safeMode` option to commit each row as it is migrated.
26+
- Use the `-fastCopy` option to bypass WAL logging to optimize migration.
27+
- Use the `-batchSize` option to control the batch size of bulk inserts.
28+
- Use the `-cpBatchSize` option to specify the batch size used with the COPY command.
29+
- Use the `-lobBatchSize` option to specify the batch size used for large object data types.
30+
- Use the `-filterProp` option to migrate only those rows that meet a user-defined condition.
31+
- Use the `-customColTypeMapping` option to change the data type of selected columns.
32+
- Use the `-dropSchema` option to drop the existing schema and create a new schema prior to migration.
33+
- On EDB Postgres Advanced Server, use the `-allDBLinks` option to migrate all Oracle database links.
34+
- On EDB Postgres Advanced Server, use the `-copyViaDBLinkOra` option to enable the `dblink_ora` module.
35+
36+
**Object Migration Support**
37+
38+
Migration Toolkit migrates object definitions (DDL), table data, or both. The following table contains a platform-specific list of the types of database objects that Migration Toolkit can migrate:
39+
40+
| Object | Oracle | Sybase | SQL Server | MySQL |
41+
| ----------------------- | ------ | ------ | ---------- | ----- |
42+
| Schemas | X | X | X | X |
43+
| Tables | X | X | X | X |
44+
| List-Partitioned Table | X | | | |
45+
| Range-Partitioned Table | X | | | |
46+
| Hash Partitioned Table | X | | | |
47+
| Constraints | X | X | X | X |
48+
| Indexes | X | X | X | X |
49+
| Triggers | X | | | |
50+
| Table Data | X | X | X | X |
51+
| Views | X | | X | |
52+
| Materialized Views | X | | | |
53+
| Packages | X | | | |
54+
| Procedures | X | | | |
55+
| Functions | X | | | |
56+
| Sequences | X | | | |
57+
| Users/Roles | X | | | |
58+
| Profiles | X | | | |
59+
| Object Types | X | | | |
60+
| Object Type Methods | X | | | |
61+
| Database Links | X | | | |
62+
| Queues | X | | | |
63+
64+
For detailed information about the commands that offer granular control of the objects imported, please see [Schema Object Selection Options](08_mtk_command_options/#schema_select).
65+
66+
**Online Migration vs. Offline Migration**
67+
68+
Migration Toolkit can migrate immediately and directly into a Postgres database (*online* *migration*), or you can also choose to generate scripts to use at a later time to recreate object definitions in a Postgres database (*offline* *migration*).
69+
70+
By default, Migration Toolkit creates objects directly into a Postgres database; in contrast, include the -offlineMigration option to generate SQL scripts you can use at a later time to reproduce the migrated objects or data in a new database. You can alter migrated objects by customizing the migration scripts generated by Migration Toolkit before you execute them. With the -offlineMigration option, you can schedule the actual migration at a time that best suits your system load.
71+
72+
For more information about the `-offlineMigration` option, see [Offline Migration Options](08_mtk_command_options/#offline_migration).

0 commit comments

Comments
 (0)