1: Data Export command declare --- create data pump work handle h1number; begin -- create a user-defined Data Pump for schema backup
1: Data Export command declare --- create data pump work handle h1 number; begin -- create a user-defined Data Pump for schema backup
1: Data Export command
Declare
--- Create a data pump handle
H1 number;
Begin
-- Create a user-defined Data Pump for schema backup
H1: = dbms_datapump.open (operation => 'Port', job_mode => 'scheme ');
-- Define storage files
Dbms_datapump.add_file (handle => h1, filename => 'myhr1. dmp ');
-- Define filter conditions
Dbms_datapump.metadata_filter (handle => h1, name => 'schema _ expt ', value => 'in' MYHR ''');
-- Start the Data Pump session
Dbms_datapump.start_job (handle => h1 );
-- Disconnect the Data Pump session
Dbms_datapump.detach (handle => h1 );
End;
2: Data Import command
Declare
-- Create a data pump handle
H1 number;
Begin
-- Create a user-defined data pump and connect it to orcllib for access
H1: = dbms_datapump.open (operation => 'import', job_mode => 'scheme', remote_link => 'orcllib ');
-- Import the MYHR object mode to the MYHR_TEST object mode.
Dbms_datapump.metadata_remap (handle => h1, name => 'remap _ scheme', old_value => 'myhr', value => 'myhr _ test ');
-- Write logs to the test2.log File
Dbms_datapump.add_file (handle => h1, filename => 'test2. log', filetype => dbms_datapump.KU $ _ FILE_TYPE_LOG_FILE );
-- Start the Data Pump session
Dbms_datapump.start_job (handle => h1 );
-- Disconnect the Data Pump session
Dbms_datapump.detach (handle => h1 );
End;
,