Performing a schema extraction v4
You can perform a schema extraction using either of the following methods. EDB recommends using the EDB DDL extractor to extract your schemas.
- EDB DDL Extractor (recommended method)
- Oracle Data Pump utilities
For more information, see Known issues, limitations, and notes.
Extracting schemas using the EDB DDL Extractor
Download the latest EDB DDL Extractor script from the Migration Portal Projects page.
Note
Migration Portal might become unresponsive for very large SQL files, depending on your system and browser resource availability. To resolve this, try extracting fewer schemas at a time to reduce the SQL file size.
Prerequisites
You can run the EDB DDL Extractor script 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 Advanced Server compatibility.
Note
You must have CONNECT
and SELECT_CATALOG_ROLE
roles and CREATE TABLE
privilege.
For SQL*Plus
Connect to SQL*Plus and run this command:
When prompted, if the Oracle user that is running the script has the required privileges, press Enter to continue running the script.
When prompted, provide the schema name. When extracting multiple schemas, use a comma (
‘,’
) as a delimiter.Note
If you want to extract all the user schemas from the current database, don't mention any schema names while extracting. However, we recommend mentioning the schema names that you want to extract.
When prompted, enter the path or directory for the extractor to store the extracted DDL. If you don't specify a path, the extracted DDL is output to the directory where you ran the SQL*Plus command.
When prompted, enter
yes
orno
depending on whether you want to extract dependent objects from other schemas.
For example:
Run the extractor script:
Press Enter
Specify three schemas by separating them with commas:
Enter a path for the output file:
On Linux, you might use:
Similarly on Windows:
Enter
yes
to extract dependent objects in other schemas:
For SQL Developer
After loading the edb_ddl_extractor.sql
script into SQL Developer and connecting to the source Oracle database, run the script. As the script executes, respond to the prompts.
If the user for the database connection has the required privileges as listed in the Script Output tab, select Yes to continue running the script.
Enter a comma-separated list of schemas and select OK.
Enter the path for the output file and select OK. The default is the location of the DDL Extractor script.
Enter
yes
orno
to extract dependent objects and select OK. The default is to not extract dependent objects.
Output of the DDL Extractor run appears in the Script Output tab. The name of the output file appears after the Extraction Completed
message in the script output.
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. Once the task is completed, the .SQL
output is stored at the location you entered (e.g., c:\Users\Example\Desktop\
).
See file encoding for information about the file encoding format expected by Migration Portal.
Schemas and objects support
The lists and tables that follow show supported and unsupported schemas and objects in Migration Portal.
Unsupported schemas
Exclude these Oracle systems schemas while generating the SQL dump file.
ANONYMOUS | APEX_PUBLIC_USER | APEX_030200 | APEX_040000 | APEX_040200 |
APPQOSSYS | AUDSYS | CTXSYS | DMSYS | DBSNMP |
DBSFWUSER | DEMO | DIP | DMSYS | DVF |
DVSYS | EXFSYS | FLOWS_FILES | FLOWS_020100 | FRANCK |
GGSYS | GSMADMIN_INTERNAL | GSMCATUSER | GSMROOTUSER | GSMUSER |
LBACSYS | MDDATA | MDSYS | MGMT_VIEW | OJVMSYS |
OLAPSYS | ORDPLUGINS | ORDSYS | ORDDATA | OUTLN |
ORACLE_OCM | OWBSYS | OWBYSS_AUDIT | PDBADMIN | RMAN |
REMOTE_SCHEDULER_AGENT | SI_INFORMTN_SCHEMA | SPATIAL_CSW_ADMIN_USR | SPATIAL_WFS_ADMIN_USR | SQLTXADMIN |
SQLTXPLAIN | SYS$UMF | SYS | SYSBACKUP | SYSDG |
SYSKM | SYSRAC | SYSTEM | SYSMAN | TSMSYS |
WKPROXY | WKSYS | WK_TEST | WMSYS | XDB |
XS$NULL |
Note
EDB Postgres Advanced Server doesn't support schema names starting with pg_
.
Supported object types
- Tables
- Sequences
- Constraints
- Indexes (Except LOB indexes and indexes on materialized views)
- Synonyms
- Views
- Materialized views
- DB links
- Types and type body
- Triggers
- Functions
- Procedures
- Packages
- Users
- Roles
- Profiles
- Role and object grants
Note
COMMENTS on columns, tables, and materialized views are also supported.
Unsupported object types
- Editions
- Operators
- Schedulers
- LOB indexes and indexes on materialized views
- XML schemas
- Tablespaces
- Directories
- RLS policy
- Queues *
- Library
- Indextype
* Even though EDB Postgres Advanced Server provides support for Queue tables, Migration Portal does not currently support it. Queue tables in the source DDL are not uploaded as source and target DDL objects.