本帖最后由 刘泽宇 于 2021-9-26 18:07 编辑
[td]Subprogram | Description | | Reads a file from a source directory and creates a copy of it in a destination directory. The source and destination directories can both be in a local file system, or both be in an Automatic Storage Management (ASM) disk group, or between local file system and ASM with copying in either direction. | | Contacts a remote database to read a remote file and then creates a copy of the file in the local file system or ASM | | Reads a local file or ASM and contacts a remote database to create a copy of the file in the remote file system |
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); Parameters Table 42-2 COPY_FILE Procedure Parameters [td]Parameter | Description | source_directory_object | The directory object that designates the source directory. The directory object must already exist. (You create directory objects with the CREATE DIRECTORY command). | source_file_name | The name of the file to copy. This file must exist in the source directory. | destination_directory_object | The directory object that designates the destination directory. The directory object must already exist. If the destination is ASM, the directory object must designate either a disk group name (for example, +diskgroup1) or a directory created for alias names. In the case of a directory, the full path to the directory must be specified (for example: +diskgroup1/dbs/control). | destination_file_name | The name to assign to the file in the destination directory. A file with the same name must not exist in the destination directory. If the destination is ASM: The file is given a fully qualified ASM filename and created in the appropriate directory (depending on the database name and file type) The file type tag assigned to the file is COPY_FILE The value of the destination_file_name argument becomes the file's alias name in the designated destination directory
The file name can be followed by an ASM template name in parentheses. The file is then given the attributes specified by the template. | 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);
Parameters Table 42-3 GET_FILE Procedure Parameters [td] Parameter | Description | source_directory_object | The directory object from which the file is copied at the source site. This directory object must exist at the source site. | source_file_name | The name of the file that is copied in the remote file system. This file must exist in the remote file system in the directory associated with the source directory object. | source_database | The name of a database link to the remote database where the file is located. | destination_directory_object | The directory object into which the file is placed at the destination site. This directory object must exist in the local file system. | destination_file_name | The name of the file copied to the local file system. A file with the same name must not exist in the destination directory in the local file system. | 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);
Parameters Table 42-4 PUT_FILE Procedure Parameters [td]Parameter | Description | source_directory_object | The directory object from which the file is copied at the local source site. This directory object must exist at the source site. | source_file_name | The name of the file that is copied from the local file system. This file must exist in the local file system in the directory associated with the source directory object. | destination_directory_object | The directory object into which the file is placed at the destination site. This directory object must exist in the remote file system. | destination_file_name | The name of the file placed in the remote file system. A file with the same name must not exist in the destination directory in the remote file system. | destination_database | The name of a database link to the remote database to which the file is copied. |
|