PL/SQL Packages and Types Reference 10g Release 1 (10.1) Part Number B10802-01 |
|
|
View PDF |
The DBMS_FILE_TRANSFER
package provides procedures to copy a binary file within a database or to transfer a binary file between databases.
See Also:
|
This chapter contains the following topic:
This procedure reads a local file and creates a copy of it in the local file system. The file that is copied is the source file, and new file that results from the copy is the destination file. The destination file is not closed until the procedure completes successfully.
DBMS_FILE_TRANSFER.COPY_FILE( source_directory_object IN VARCHAR2, source_file_name IN VARCHAR2, destination_directory_object IN VARCHAR2, destination_file_name IN VARCHAR2);
To run this procedure successfully, the current user must have the following privileges:
source_directory_object
parameterdestination_directory_object
parameterThis procedure converts directory object parameters to uppercase unless they are surrounded by double quotation marks, but this procedure does not convert file names to uppercase.
Also, the copied file must meet the following requirements:
Transferring the file is not transactional. The copied file is treated as a binary file, and no character set conversion is performed. To monitor the progress of a long file copy, query the V$SESSION_LONGOPS
dynamic performance view.
This procedure contacts a remote database to read a remote file and then creates a copy of the file in the local file system. The file that is copied is the source file, and the new file that results from the copy is the destination file. The destination file is not closed until the procedure completes successfully.
DBMS_FILE_TRANSFER.GET_FILE source_directory_object IN VARCHAR2, source_file_name IN VARCHAR2, source_database IN VARCHAR2, destination_directory_object IN VARCHAR2, destination_file_name IN VARCHAR2);
To run this procedure successfully, the following users must have the following privileges:
source_directory_object
parameter.destination_directory_object
parameter.This procedure converts directory object parameters to uppercase unless they are surrounded by double quotation marks, but this procedure does not convert file names to uppercase.
Also, the copied file must meet the following requirements:
Transferring the file is not transactional. The copied file is treated as a binary file, and no character set conversion is performed. To monitor the progress of a long file transfer, query the V$SESSION_LONGOPS
dynamic performance view.
This procedure reads a local file and contacts a remote database to create a copy of the file in the remote file system. The file that is copied is the source file, and the new file that results from the copy is the destination file. The destination file is not closed until the procedure completes successfully.
DBMS_FILE_TRANSFER.PUT_FILE( source_directory_object IN VARCHAR2, source_file_name IN VARCHAR2, destination_directory_object IN VARCHAR2, destination_file_name IN VARCHAR2, destination_database IN VARCHAR2);
To run this procedure successfully, the following users must have the following privileges:
source_directory_object
parameter.destination_directory_object
parameter.This procedure converts directory object parameters to uppercase unless they are surrounded by double quotation marks, but this procedure does not convert file names to uppercase.
Also, the copied file must meet the following requirements:
Transferring the file is not transactional. The copied file is treated as a binary file, and no character set conversion is performed. To monitor the progress of a long file transfer, query the V$SESSION_LONGOPS
dynamic performance view.