Created
August 22, 2018 14:38
-
-
Save junalmeida/c455db6fdb2c84fdd15511557baa26bc to your computer and use it in GitHub Desktop.
pl-sql transfer multiple dumps over dblink
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BEGIN | |
FOR loop_counter IN 1 .. 7 | |
LOOP | |
dbms_output.put_line('EXPDAT' || LPAD(loop_counter, 2, '0') || '.DMP'); | |
DBMS_FILE_TRANSFER.PUT_FILE( | |
source_directory_object => 'DATA_PUMP_DIR', | |
source_file_name => 'EXPDAT' || LPAD(loop_counter, 2, '0') || '.DMP', | |
destination_directory_object => 'DATA_PUMP_DIR', | |
destination_file_name => 'EXPDAT' || LPAD(loop_counter, 2, '0') || '.DMP', | |
destination_database => 'to_rds' --dblink | |
); | |
END LOOP; | |
END; | |
/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment