日期:2014-05-16  浏览次数:20579 次

Oracle外部表ORACLE_DATAPUMP类型的创建语法详解

This chapter describes the ORACLE_DATAPUMP access driver. The following topics are discussed:

  • access_parameters Clause

  • Unloading and Loading Data with the ORACLE_DATAPUMP Access Driver

  • Supported Datatypes

  • Unsupported Datatypes

  • Reserved Words for the ORACLE_DATAPUMP Access Driver

To use the information in this chapter, you must know enough about SQL to be able to create an external table and perform queries against it.


Notes:

  • It is sometimes difficult to describe syntax without using other syntax that is not documented until later in the chapter. If it is not clear what some syntax is supposed to do, you might want to skip ahead and read about that particular element.

  • When identifiers (for example, column or table names) are specified in the external table access parameters, certain values are considered to be reserved words by the access parameter parser. If a reserved word is used as an identifier, it must be enclosed in double quotation marks. See Reserved Words for the ORACLE_DATAPUMP Access Driver .


access_parameters Clause

When you create the external table, you can specify certain parameters in an access_parameters clause. This clause is optional, as are its individual parameters. For example, you could specify LOGFILE , but not VERSION , or vice versa. The syntax for the access_parameters clause is as follows:

Description of et_oracle_datapump.gif follows
Description of the illustration et_oracle_datapump.gif

comments

Comments are lines that begin with two hyphens followed by text. Comments must be placed before any access parameters, for example:

--This is a comment.
--This is another comment.
NOLOG

All text to the right of the double hyphen is ignored, until the end of the line.

LOGFILE | NOLOGFILE

LOGFILE specifies the name of the log file that contains any messages generated while the dump file was being accessed. NOLOGFILE prevents the creation of a log file. If a directory object is not specified as part of the log file name, then the directory object specified by the DEFAULT DIRECTORY attribute is used. If a directory object is not specified and no default directory was specified, an error is returned.

If LOGFILE is not specified, a log file is created in the default directory and the name of the log file is generated from the table name and the process ID with an extension of .log . If a log file already exists by the same name, the access driver reopens that log file and appends the new log information to the end. See Filenames for LOGFILE for information about using wildcards to create unique filenames during parallel loads or unloads.

See Example of LOGFILE Usage for ORACLE_DATAPUMP .

Filenames for LOGFILE

The access driver does some symbol substitution to help make filenames unique in the case of parallel loads. The symbol substitutions supported are as follows:

  • %p is replaced by the process ID of the current process. For example, if the process ID of the access driver is 12345, then exttab_ %p .log b