Name
tmp_file_name — returns the unique file name within temporary directory of the operating system
Synopsis
varchar
tmp_file_name
(
|
in prefix varchar , |
in
suffix
varchar
) ; |
Description
The following function is used to obtain unique name of a file, which is located in temporary directory on file system. The two optional parameters can be supplied: prefix of the file and extension for it. These will be prepended and appended (dot MUST be omitted) to the unique string. The directory where this file is located depends of $TMPDIR or %TMP% environment settings for UNIX's and Windows platforms respectively. If these environment settings are not available or empty, the defaults will be used for the operation system. (in practice for most UNIX's it's /tmp or /var/tmp directory). Note that this function do NOT open the file, it only give us a name.
Parameters
prefix
prefix to the file name to be added. MUST be at most five characters.
suffix
extension to the file to be added, the leading dot MUST be omitted.
Examples
Example 24.418. Getting a unique file name
SQL> select tmp_file_name('FOO', 'EXT'); callret VARCHAR ________________________________________ /tmp/FOOFoCnq5.EXT 1 Rows. -- 7 msec.