EnterpriseDB
Migration Portal is a web-based service for migrating Oracle database schemas to the EDB Postgres platform. The Migration Portal assesses and analyzes Oracle database schemas and converts types, tables, sequences, constraints, triggers, views, stored procedures, packages, database links (dblinks), materialized views, and indexes, producing DDLs compatible with EDB Postgres Advanced Server.
The user-friendly portal interface simplifies the assessment and migration process. Log in to the portal and start with the migration process.
The Migration Portal guide provides a high-level description of the steps involved in the migration process. The guide also includes solutions to common migration problems and details of unsupported features and their potential workarounds.
EnterpriseDB has helped companies migrate their existing database systems to Postgres for years. For more information, visit the EnterpriseDB website at: https://www.edbpostgres.com/
whats_new supported_platforms mp_using_portal mp_migrating_database mp_advanced_data_migration
The following enhancements are added to the Migration Portal for the release 3.1.0:
Asynchronous/Parallel assessment
You can now create multiple projects and run the assessments in parallel, getting notified once the assessment completes. Also, use multiple browser tabs to work on projects simultaneously.
Restructured schema assessment report for enhanced readability along with consolidated information about the incompatible function/package
Refined object search and filter experience along with other UI enhancements
Starting this release, Migration Portal detects function/procedure names from the packages which are not supported in EPAS, for example, 'Incompatible function/package found : UTL_FILE.GET_RAW', giving a better understanding of error and the migration efforts required.
Updated Repair Handler
Repair handlers convert Oracle syntax to Postgres-compatible syntax so that you don’t have to do it manually.
ERH-2055 - UNSUPPORTED_USING_INDEX_CLAUSE
Updated the repair handler such that it does not remove GLOBAL indexes from the table definition
ERH-1012 - INSERT_STATEMENT_ALIAS
Modified the repair handler as it was not firing for scenarios where INSERT statements contained the SELECT statement
ERH-2090 - CONVERT_FUNCTION
Enhanced the performance for large DDLs
ERH-2027 - SESSION_GLOBAL_SEQUENCE
Enhanced the accuracy so that it functions correctly for edge case DDLs
ERH-2079 - GLOBAL_PARTITIONED_INDEX
Removed this so that Global Partitioned Indexes will not be removed
Knowledge Base
Knowledge base entries provide workarounds or solutions for the objects that fail during an assessment. You can view and apply the knowledge base solutions to reassess the fail objects.
New Knowledge Base entries
Following are the new knowledge base entries added:
Workaround for Oracle SQLERRM function
The SQLERRM() function returns the error message associated with the most recently raised error exception. You may use Advanced Server supported SQLCODE and SQLERRM variables in the exception block to get similar results.
Workaround for Oracle SQLCODE function
In PL/SQL blocks, the SQLCODE can be used for getting numeric code of exception, in Advanced Server you can create custom function which can return numeric value of error.
Value assignment with %type operator for TYPE definition inside package
This syntax is supported starting with Advanced Server v12, hence we recommend upgrading to Advanced Server v12 or above to resolve this error.
Global Indexes
Global Indexes map one index to multiple partitioned tables. There can be multiple workarounds, for example, aligning partitioning keys across all referencing and referenced tables.
Workaround for NESTED Table
In Advanced Server, ARRAY can be used to achieve the same kind of functionality.
Method Overloading
In Oracle, users can overload the method inside the package by changing the name of the arguments. In Advanced Server, users should change the argument type to overload a method.
The Migration Portal supports assessment and migration from Oracle 11g and 12c to EDB Postgres Advanced Server 10, 11, 12, or 13. Migration Portal is supported on the following browsers and operating systems:
Supported Browsers
For the best user experience, we recommend using the Google Chrome browser. Migration Portal is also supported on the following browsers:
| Browser | Supported Version |
|---|---|
| Apple Safari on Macintosh OS | 11 and above |
| Google Chrome | 68 and above |
| Microsoft Edge | 42 and above |
| Mozilla Firefox | 60 and above |
Supported Operating Systems
| Operating Systems | Supported Version |
|---|---|
| Macintosh | OS X Sierra |
| Windows | 10 |
| Linux | CentOS 7 |
Migration Portal allows you to easily migrate your database schema from Oracle to EDB Postgres Advanced Server. You can upload schemas for assessment and get immediate feedback and suggestions. The portal allows you to download assessed DDLs for all objects and create your EDB Postgres database on-premises or in the cloud.
Figure 2-1: The assessment and migration process
Note Migration Portal currently does not have team collaboration features. We recommend collaborative meetings, screen sharing, and using the downloadable assessment report to share results.
To access the Migration Portal:
Open a browser and navigate to https://www.edbpostgres.com/.
On the EnterpriseDB home page, click Products > Migration Portal.
Figure 2-2: The assessment and migration process
Click Open Migration Portal.
Log in using your credentials.
mp_overview_home mp_overview_project mp_overview_wiki
The Migration Portal home page provides quick access to migration tools.
Figure 2-3: The Migration Portal home
The Migration Portal home page allows access to the following Migration Portal features:
Projects: The Projects panel displays a list of assessed projects.
Create project: Click + New (the button located to the right of the Projects label) to create a new project.
Note Uploading large DDL files might freeze or crash the browser (depending on the browser and the system resources in use). In this scenario, try running Migration Portal in a different browser or extracting fewer schemas and uploading that file on Migration Portal.
Search projects: Use the Search box to search for projects.
Overview: The Overview panel provides details about the selected project and displays the compatibility percentage after schema assessment.
Migrate to: Use the Migrate to button to either download an EDB Postgres Advanced Server compatible .sql file or migrate a schema to an EDB Postgres Advanced Server on-premise or on the cloud. For more information, see Schema Migration.
Report: Use the Report button to view and download the schema assessment report.
Delete: Use the Delete button to delete a selected project.
Warning sign: A warning message is displayed if a project or a schema is less than 70% compatible or any DDL doesn’t succeed after multiple attempts.
Upload DDL file: Use the Upload new schema button to upload a new or additional DDL file.
Schemas: The Schemas panel displays the assessment result from an uploaded DDL file.
Quick help: The Quick help panel contains quick handles to a few required resources.
Portal Wiki: The Portal Wiki has links to product information and different help guides.
The Migration Portal Projects page provides detailed information about your migration.
Figure 2-4: The Migration Portal Projects Page overview
Use the following resources to gather information about your migration projects:
Compatible: The Compatible gauge displays the color on the basis of the compatibility percentage of the assessed schema.
Schema Count: Displays the number of schemas in a project.
Migrate to: Use the Migrate to to migrate the schema to an EDB Postgres Advanced Server on-prmise or on cloud.
Search objects: Use the Search box to search for objects.
Filters: You can filter the system repaired and manual repaired objects from the left panel of the Projects page.In addition, you can select one or more filter combinations to refine the information.
Objects: Displays the objects for the selected schemas.
Common Failures: Displays the reason for the failed objects for the selected schemas.
Figure 2-5: Common Failures tab
Note You can download a
CSVfile for the common failures for the project.
Schema: The Schema panel displays the result of the assessment.
Tooltip: Hover over a result set to display a tooltip with the number of passed, failed, and repaired objects.
Quick help: The Quick help panel displays links to Knowledge base articles and repair handler documentation.
Search: Use the Search box to search the Knowledge base entries or repair handler documentation for specific information.
Figure 2-6: Searching the Knowledge Base entry
The Portal Wiki page provides quick access to information:
Figure 2-7: The Migration Portal Wiki page
To migrate a database, you must complete the following steps:
The following sections provide detailed information about each step in the migration process.
mp_schema_extraction mp_schema_assessment mp_schema_migration mp_data_migration
Prerequisites
Before extracting a schema, you must download the latest EDB DDL Extractor script from the Migration Portal Projects page or from the link provided in the DDL Extractor guide in the Portal Wiki. The script can be run in SQL Developer or SQL*Plus. It uses Oracle’s DBMS_METADATA built-in package to extract DDLs for different objects under schemas (specified while running the script). The EDB DDL extractor creates the DDL file uploaded to the portal and analyzed for EDB Postgres compatibility.
Note You must have
CONNECTandSELECT_CATALOG_ROLEroles andCREATE TABLEprivilege.
For SQL*Plus
Connect to SQL*Plus and run the command:
SQL>@edb_ddl_extractor.sql
Provide the schema name and the path or directory in which the extractor will store the extracted DDL. When extracting multiple schemas, use a comma (‘,’) as a delimiter.
Note If you want to extract all the user schemas from the current database, do not mention any schema names while extracting. However, it is recommended to mention the schema names that you would like to extract.
If you want to extract dependent objects from other schemas, enter yes or no.
For example, on Linux:
Enter a comma separated list of schemas to be extracted (Default all schemas): HR, SCOTT, FINANCE
Location for output file (Default current location) : /home/oracle/extracted_ddls/
WARNING:
Given schema(s) list may contain objects which are dependent on objects from other schema(s), not mentioned in the list.` `Assessment may fail for such objects. It is suggested to extract all dependent objects together.
Extract dependent object from other schemas?(yes/no) (Default no / Ignored for all schemas option): yes
On Windows:
Enter comma separated list of schemas to be extracted (Default all schemas): HR, SCOTT, FINANCE
Location for output file (Default current location) : c:\Users\Example\Desktop\
WARNING:
Given schema(s) list may contain objects which are dependent on objects from other schema(s), not mentioned in the list.` `Assessment may fail for such objects. It is suggested to extract all dependent objects together.
Extract dependent object from other schemas?(yes/no) (Default no / Ignored for all schemas option): yes
For SQL Developer
Figure 3-1: Enter the path for Linux or Windows
Figure 3-2: Provide a list of schemas
Figure 3-3: Specify the output file path
Figure 3-4: Extracting dependent objects
Note You can also enter single schema name in both SQL*Plus and SQL Developer.
The script then iterates through the object types in the source database and once the task is completed, the .SQL output is stored at the entered location, i.e., c:\Users\Example\Desktop\.
Additional Notes
Flashback and still have names like BIN$b54+4XlEYwPgUAB/AQBWwA==$0. If you want to extract these objects, you must change the name of the objects and re-run the extraction process.nologging tables as normal tables. Once these tables are migrated to EDB Postgres Advanced Server, WAL log files will be created.PG_ because PostgreSQL does not support it. If you want to extract these schemas, you must change name of schema before extraction.The Migration Portal supports the migration of the following object types:
Note COMMENTS on Columns, Tables, and Materialized Views are also supported.
EDB DDL Extractor script will ignore the following system schemas while extracting from Oracle:
| ANONYMOUS | APEX_PUBLIC_USER | APEX_030200 |
| APEX_040000 | APEX_040000 | APPQOSSYS |
| AUDSYS | BI | CTXSYS |
| DMSYS | DBSNMP | DIP |
| DVF | DVSYS | EXFSYS |
| FLOWS_FILES | FLOWS_020100 | GSMADMIN_INTERNAL |
| GSMCATUSER | GSMUSER | IX |
| LBACSYS | MDDATA | MDSYS |
| MGMT_VIEW | OE | OJVMSYS |
| OLAPSYS | ORDPLUGINS | ORDSYS |
| ORDDATA | OUTLN | ORACLE_OCM |
| OWBSYS | OWBYSS_AUDIT | PM |
| RMAN | SH | SI_INFORMTN_SCHEMA |
| SPATIAL_CSW_ADMIN_USR | SPATIAL_WFS_ADMIN_USR | SYS |
| SYSBACKUP | SYSDG | SYSKM |
| SYSTEM SYSMAN | TSMSYS WKPROXY | WKSYS |
| WK_TEST XS$NULL | WMSYS | XDB |
To assess an Oracle database schema for compatibility with EDB Postgres Advanced Server, you must:
Navigate to the Migration Portal.
Enter your EDB credentials.
Click New to create a new project.
Figure 3-5: The Migration Portal New project dialog box
On the New project dialog box, enter the project name in the Project name field.
Specify project details:
Application interface.Source DB and Version for the source.Target DB and Version for the target.Click Choose file to upload the .SQL file generated by the latest EDB DDL Extractor for Oracle Database.
Note - You should not modify the .SQL file. - Only the .SQL file generated by the latest EDB DDL Extractor can be uploaded.
For more information, refer to the Schema Extraction section.
Check the box next to Add Index Prefix to specify an index prefix (idx) when creating a project to ensure better assessment results, as EDB Postgres Advanced Server does not support the same name for tables and indexes.
Click Create & assess to create a new project and to assess the schemas.
Figure 3-6: The Schema analysis result
The analysis tool will review every construct and execute repair actions to improve compatibility with EDB Postgres Advanced Server and flag any remaining errors that require manual intervention.
Verify the DDL objects (e.g., TABLES) that do not show a 100% success ratio.
Figure 3-7: Verifying the DDL objects
Figure 3-8: Incompatible objects are identified
Figure 3-9: Assessment result with errors
On the Knowledge Base tab, you can enter the error message for the incompatible objects with EDB Postgres Advanced Server and click Search.
The object detail panel displays the workaround or the resolution for the failed object. You can manually make the changes on the Assessment tab for that object and click Reassess.
Note If any failed object passes while reassessing, the dependent objects for that object are also reassessed.
Figure 3-10: Workaround or resolution for incompatible objects
Similarly, you can make all incompatible objects compatible.
Note If the information or workaround for incompatible objects is not available in the Knowledge Base, please contact the support team for assistance.
When you have finished working with the DDL, you can either download the modified EDB compatible DDL as a .sql file or migrate the schemas see, Schema Migration.
Migration Portal’s report functionality provides a high-level assessment summary of the schemas assessed for your project. In addition, the report provides details about the failed objects and the cause of failure.
Figure 3-11: Select schemas for reports
To generate a report:
Click the Report button to access the schema selection dialog.
Select the schemas that you wish to include in the report.
Click Generate to generate the onscreen report.
Figure 3-12: The Schema Assessment Report
You can optionally select Generate PDF to save the report in .pdf format. You can also view the count of distinct repair handlers applied to the DDLs under the selected schemas.
Figure 3-13: The saved pdf report
After resolving errors in your schemas, you can use the schemas with a client application such as pgAdmin, ToadEdge, or the PSQL client, or migrate the schema to an EDB Postgres Advanced Server.
Note
For more information about using Toad Edge with EDB Postgres Advanced Server, see Toad Edge for Postgres.
You can choose one of the following options for migrating schemas; migrate to an:
Figure 3-14: Schema migration home page
You can migrate schemas to an existing on-premises EDB Postgres Advanced Server on Windows or Linux platforms.
Existing on-premises EDB Postgres Postgres Advanced Server option:
Figure 3-15: Existing on-premises EDB Postgres Advanced Server home page
Figure 3-16: Selecting schemas for migration
Note If your schemas are not 100% compatible, a banner will be displayed as shown; complete the
Contact Usform for any assistance required.
Figure 3-17: The Contact Us form
Figure 3-18: Download the assessed schemas
Windows:
Figure 3-19: Selecting Windows operating system
\i c:\users\...\<project_name>.sql
edb-psql -f <project_name>.sql
Note You can also use
pgAdmininstead.
The converted schemas are migrated to the target server.
Figure 3-20: A successful migration
To migrate schemas to an existing on-premises EDB Postgres Advanced Server on Linux, complete the following steps:
Existing on-premises EDB Postgres Advanced Server option:
Figure 3-21: Existing on-Premises EDB Postgres Advanced Server home page
Figure 3-22: Selecting schemas for migration
Figure 3-23: Download the assessed schemas
Linux:
Figure 3-24: Selecting Linux operating system
edb-psql client commands:sudo su - enterprisedb
edb-psql edb
create database <database_name>;
\\connect <database_name>
\\i <project_name>.sql
Note You can optionally use the
pgAdminclient for the import.
The converted schemas are migrated to the target server.
Figure 3-25: A successful schema migration
You can install new EDB Postgres Advanced Server on-premises on Windows or Linux platforms and migrate the schemas.
To migrate schemas to a new on-premises EDB Postgres Advanced Server on Windows, complete the following steps:
New on-premises EDB Postgres Postgres Advanced Server option.
Figure 3-26: New on-premises EDB Postgres Advanced Server home page
Figure 3-27: Selecting schemas for migration
Windows operating system.
Figure 3-28: Selecting Windows operating system
Windows Installer.
Figure 3-29: Downloading Windows installer
EDB Postgres Advanced Server Installation Guide for Windows.
Figure 3-30: A successful schema migration
Figure 3-31: Downloading the assessed file
\i c:\users\...\<project_name>.sql
edb-psql -f <project_name>.sql
Figure 3-32: Importing schemas into EDB Postgres Advanced Server
Note You can also use
pgAdmininstead.
The schemas are migrated to the target server.
Figure 3-33: Importing schemas into EDB Postgres Advanced Server
To migrate schemas to an on-premises EDB Postgres Advanced Server on Linux, complete the following steps:
New On-premises EDB Postgres Advanced Server option.
Figure 3-34: Migrating schemas home page
Figure 3-35: Selecting schemas for migration
Linux operating system.
Figure 3-36: Selecting Linux operating system
Repository
More options
Figure 3-37: Selecting Linux repository
EDB Postgres Advanced Server Installation Guide for Linux:
Figure 3-38: Selecting Linux installation guide
Figure 3-39: Downloading the assessed schemas
sudo su - enterprisedb
edb-psql edb
create database <database_name>;
\connect <database_name>
\i <project_name>.sql
Figure 3-40: Importing schemas into EDB Postgres Advanced Server
Note You can also use pgAdmin instead.
The converted schemas are migrated to the target server.
Figure 3-41: A successful schema migration
To migrate schemas on EDB Postgres Advanced Server to Cloud, complete the following steps:
EDB Postgres Advanced Server on Cloud option:
Figure 3-42: EDB Postgres Advanced Server on Cloud
Selecting schemas for migration
IBM Cloud:
Figure 3-43: Selecting cloud option for migration
Go to Cloud:
Figure 3-44: Launching a cloud cluster
Or, if you have an existing cluster running, click Next.
Connect page:
Figure 3-45: Connecting to the cloud cluster
Note You can click
Edit Connectionto make changes to the connection details and retest the connection details.
Test Connection to verify the connection details:
Figure 3-46: Verify the connection details
Next:
Figure 3-47: A successful migration
The converted schemas are migrated to the target server.
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.properties file, 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 –dataOnly mode. Include the –truncLoad keyword 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 HR
The command migrates the specified source_schema to the target_schema. The data is loaded into the locally installed EDB Postgres instance with a database superuser named enterprisedb and the password of password.
Note The tables are truncated before attempting the data load.
For larger databases that require a parallel data load, you can use one of the following methods:
Use the EDB Postgres Advanced Server database link feature (for compatibility with Oracle databases).
Or
Use a Dblink or a database link style migration (if your data contains CLOB data).
For more information, see the Migration Toolkit Guide.