Extracting schemas using Oracle Data Pump utilities v4
Migration Portal requires only the metadata in the SQL dump file to assess the extracted schemas.
Prerequisites
If you plan on exporting schemas that aren't your own, make sure that you're assigned the
DATAPUMP_IMP_FULL_DATABASE
role. Otherwise, you can export only your own schema.Make sure that you have enough tablespace quota to create objects in the tablespace.
In SQL*Plus, create a directory object that points to a directory on your server file system. For example:
On Linux:
On Windows:
In SQL*Plus, grant read-write permissions to the user running the Data Pump utility.
Perform either of the following procedures:
Extract one or more schemas in a database
Before running the
expdp
command, create a file with a.par
extension (for example,export.par
) on your server. Add attributes and values to the file:The attributes and values in this command specify the following options:
CONTENT=metadata_only
extracts only the metadata of the schemas.INCLUDE=
specifies the database object types to include in the extraction. Extract only database object types that are supported by Migration Portal, see Supported object types.
From the command line, run the export command to generate a
schemas_metadata.dump
file. For example, to extract metadata information for<Schema_1>
,<Schema_2>
,<Schema_3>
, and so on, run:To generate a SQL file from the dump file, run the import command.
For example, to generate a
YourSchemas.SQL
file from theschemas_metadata.dump
file, enter:
See file encoding for information about the file encoding format expected by the Migration Portal.
Extract all schemas in a database
Note
Don't perform this procedure from a user account that belongs to the excluded schemas list (see Unsupported schemas). The impdp
command fails if the user account running the command is in the excluded list of schemas.
Before running the
expdp
command, create a file with a.par
extension (for example,export.par
) on your server. Add attributes and values to the file:The attributes and values in this command specify the following options:
CONTENT=metadata_only
extracts only the metadata of the schemas.INCLUDE=
specifies the database object types to include in the extraction. Extract only database object types that are supported by Migration Portal, see Supported object types.FULL=Y
extracts all schemas in the database.
From the command line, run the export command to generate a
schemas_metadata.dump
file:Before running the
impdp
command, create a parameter file with a.par
extension (for example,import.par
) on your server. Add attributes and values to the file:The attributes and values in this command specify the following options:
EXCLUDE
specifies the schemas to exclude. Append a list of the Unsupported schemas to ensure that the Data Pump utility doesn't extract any system schemas (including schemas beginning withpg_
).EXCLUDE=STATISTICS
specifies not to include statistics-related information in the SQL output file. By not including them in the SQL file, the size of the file is significantly reduced without affecting Migration Portal's ability to assess the DDL.
To generate a SQL file from the dump file, run the import command.
For example, to generate
YourSchemas.SQL
file from theschemas_metadata.dump
file, enter:See file encoding for information about the file encoding format expected by the Migration Portal.