Export the Database Objects
Follow these steps sequentially to export the database objects. Each includes rationale, commands, and verification.
Step 1: Create the Export Metadata Table
Create a temporary table to store module names (such as schemas or table groups) and their priorities.
-
Connect to the source database.
sqlplus <username>/<password>@<DB_SERVICE> -
Create the export metadata table.
sql CREATE TABLE A1_MO_TO_EXPORT ( MO_NAME VARCHAR2(100), PRIORITY NUMBER );
Step 2: Load Priority Configuration
Populate the table with data from the system-specific CSV.
-
Select the priority configuration file for the source application.
Source Application Configuration File CCS or C2M
priority_config_ccs.csvWACS or WAM
priority_config_wacs.csvDACS or DAM
priority_config_dacs.csv -
Import the configuration data into the
A1_MO_TO_EXPORTtable by using one of the following methods:-
SQL Developer (GUI)
-
Connect to the source database.
-
From the database navigator, select the
A1_MO_TO_EXPORTtable. -
Import the selected CSV file.
-
Map the CSV columns as follows:
CSV Column Database Column Column 1
MO_NAMEColumn 2
PRIORITY
-
-
SQL*Loader
-
Create a control file named
load.ctl.LOAD DATA INFILE 'priority_config_ccs.csv' INTO TABLE A1_MO_TO_EXPORT FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' ( MO_NAME CHAR(100), PRIORITY INTEGER ) -
Run the SQL*Loader command.
sqlldr <username>/<password>@<DB_SERVICE> control=load.ctl log=load.log
-
-
Step 3: Generate the Detailed Export Table List
Use the provided script to expand priorities into a detailed table list.
-
Download the
EXPORT_TABLE_LIST_GENERATION.sqlscript. -
Run the script in SQL*Plus.
sql -- Paste script content hereThe script queries the
A1_MO_TO_EXPORTtable and populates theA1_TABLES_TO_EXPORTtable.
Step 4: Execute Export for a Single Priority Group
Run the Data Pump export for one priority group (for example, Priority 100).
-
Download
EXADATA_PDB_EXPORT_SCRIPT.sql. -
Update the sample parameters for your schema, export directory, priority, parallel degree, and file name.
l_schema_name VARCHAR2(500) := 'CISADM'; -- Target schema l_dir_name VARCHAR2(500) := 'DATA_PUMP_DIR'; -- Export directory l_priority NUMBER := 100; -- Group priority l_parallel_degree NUMBER := 16; -- Parallel workers (adjust based on CPU) l_file_name VARCHAR2(500) := 'A1_CCS1_DATA_DUMP_20250509'; -- Prefix with date -
Run the script in SQL*Plus.
Step 5: Monitor the Data Pump Job
Monitor the Data Pump job to verify that the export completes successfully by running the following SQL query:
SELECT *
FROM DBA_DATAPUMP_JOBS
WHERE JOB_NAME LIKE '%_EXPORT_SAAS_%'
ORDER BY STATE;
Review the STATE column to determine the job status. Possible values include:
-
DEFINING -
EXECUTING -
COMPLETING -
COMPLETED
The export completes successfully when the job state is COMPLETED.
Step 6: Generate the Manifest File
Generate a manifest file after the export completes. The manifest file records metadata about the exported objects and supports downstream import processing.
-
Download
MANIFEST_FILE_GENERATION.sql. -
Update the script parameters. Example:
Sample parameters
l_schema_name VARCHAR2(500) := 'CISADM'; -- Target schema l_priority NUMBER := 100; -- Group priority ..... l_source_context VARCHAR2(20) := 'CCS1'; -- Source for exporting -
Run the script.
The script generates a JSON manifest file for the selected priority group.
Example JSON output:
{
"export": {
"schema": "CISADM",
"priority": 100,
"tables": [
{
"name": "TABLE1",
"rows": 10000,
"size_mb": 50
}
],
"checksum": "SHA256:abc123..."
}
}
Step 7: Upload Artifacts to Object Storage
Upload the exported files to object storage in the following order after the export and manifest generation processes complete.
-
Upload the dump files. Example:
Bash
oci os object put \ --bucket-name <bucket> \ --file <local_dmp_path> \ --name <remote_dmp_name> -
Upload the log files. Example:
Bash
oci os object put \ --bucket-name <bucket> \ --file <local_log_path> \ --name <remote_log_name> -
Upload the manifest file. Example:
Bash
oci os object put \ --bucket-name <bucket> \ --file <local_json_path> \ --name <remote_manifest.json>
Upload the manifest file last so that downstream processes access the manifest only after all associated export files are available.
Step 8: Repeat for Remaining Groups
Repeat steps 4 through 7 for each remaining priority group (for example, 100, 90, 80, and so on).
-
Update the
l_priorityparameter in the export script. -
Use a unique value for the
l_file_nameparameter (for example, append priority). -
Run the export process, generate the manifest file, and upload the export files and manifest file to object storage.
Monitor object storage capacity throughout the export process.
Step 9: Remove Temporary Export Objects
Remove temporary objects after all exports have been uploaded successfully. This frees up space and maintains security.
-
Remove the temporary export tables.
DROP TABLE A1_MO_TO_EXPORT PURGE; DROP TABLE A1_TABLES_TO_EXPORT PURGE; -
Identify any remaining Data Pump jobs.
SELECT JOB_NAME FROM DBA_DATAPUMP_JOBS WHERE JOB_NAME LIKE '%_EXPORT_SAAS_%';If completed Data Pump jobs remain, detach from the jobs and remove any associated job tables according to your organization's Data Pump cleanup procedures. Example:
-- For each job returned by the query: DBMS_DATAPUMP.DETACH(job_name); DROP TABLE <job_table>; -
(Optional) Remove the temporary Data Pump directory if you created one for the export process.
BEGIN DBMS_DATAPUMP.DROP_DIRECTORY('DATA_PUMP_DIR); END; /