Oracle 10g sql loader control file
See Specifying Datafile Format and Buffering. Datafiles need not have the same file processing options, although the layout of the records must be identical.
For example, two files could be specified with completely different file processing options strings, and a third could consist of data in the control file. You can also specify a separate discard file and bad file for each datafile.
However, the separate bad files and discard files must be declared after each datafile name. For example, the following excerpt from a control file specifies four datafiles with separate bad and discard files:.
DAT, neither a bad file nor a discard file is specified. Therefore, only the bad file is created, as needed. If created, the bad file has a default filename and extension.
The discard file is not created, even if rows are discarded. DAT, the default bad file is created, if needed. A discard file with the specified name mydat3. Note: Filenames that include spaces or punctuation marks must be enclosed in single quotation marks. For more details on filename specification, see Specifying Filenames and Objects Names. This keyword is used for direct path loads only.
You use this string to specify file format and buffering. Additional Information: For details on the syntax of the file processing options string, see your Oracle operating system-specific documentation. For example, suppose that your operating system has the following option-string syntax:.
Note: This example uses the recommended convention of single quotation marks for filenames and double quotation marks for everything else. If you have specified that a bad file is to be created, the following applies:. If no records are rejected, then the bad file is not created. When this occurs, you must reinitialize the bad file for the next run.
If the bad file is created, it overwrites any existing file with the same name; ensure that you do not overwrite a file you wish to retain. Additional Information: On some systems, a new version of the file is created if a file with the same name already exists.
See your Oracle operating system-specific documentation to find out if this is the case on your system. If you do not specify a name for the bad file, the name defaults to the name of the datafile with an extension or file type of BAD.
The bad file is created in the same record and file format as the datafile so that the data can be reloaded after corrections. The syntax is:. This keyword specifies that a filename for the badfile follows.
That is, it cannot determine if the record meets WHEN-clause criteria, as in the case of a field that is missing its final delimiter. If the data can be evaluated according to the WHEN-clause criteria even with unbalanced delimiters , then it is either inserted or rejected.
If a record is rejected on insert, then no part of that record is inserted into any table. For example, if data in a record is to be inserted into multiple tables, and most of the inserts succeed, but one insert fails, then all inserts from that record are rolled back. The record is then written to the bad file, where it can be corrected and reloaded.
Previous inserts from records without errors are not affected. The log file indicates the Oracle error for each rejected record. Case 4: Loading Combined Physical Records demonstrates rejected records. This is to ensure that the row can be repaired in the bad file and reloaded to all tables consistently. Also, if a row is loaded into one table, it should be loaded into all other tables that do not filter it out.
Otherwise, reloading a fixed version of the row from the bad file could cause the data to be loaded into some tables twice. Data from LOB files or secondary data files are not written to a bad file when there are rejected rows. If there is an error loading a LOB, the row is not rejected.
The records contained in this file are called discarded records. Discarded records do not satisfy any of the WHEN clauses specified in the control file. These records differ from rejected records. Discarded records do not necessarily have any bad data. No insert is attempted on a discarded record.
If no records are discarded, then a discard file is not created. You can specify the discard file directly with a parameter specifying its name, or indirectly by specifying the maximum number of discards. This keyword specifies that a discard filename follows.
The default filename is the name of the datafile, and the default file extension or file type is DSC. A discard filename specified on the command line overrides one specified in the control file.
If a discard file with that name already exists, it is either overwritten or a new version is created, depending on your operating system. The discard file is created with the same record and file format as the datafile. Therefore, it can easily be used for subsequent loads with the existing control file, after you change the WHEN clauses or edit the data.
A discard file named notappl with the file extension or file type of. An attempt is made to insert every record into such a table. Therefore, records may be rejected, but none are discarded. Case 4: Loading Combined Physical Records provides an example of using a discard file.
Data from LOB files or secondary data files is not written to a discard file when there are discarded rows. You can limit the number of records to be discarded for each datafile by specifying an integer:. When the discard limit specified with integer is reached, processing of the datafile terminates and continues with the next datafile, if one exists.
You can specify a different number of discards for each datafile. Alternatively, if the number of discards is only specified once, then the maximum number of discards specified applies to all files. A filename specified on the command line overrides any bad file that you may have specified in the control file.
See the Oracle8i National Language Support Guide for information about supported character encoding schemes. The following sections provide a brief introduction to some of the supported schemes. Multibyte character sets support Asian languages. Data can be loaded in multibyte format, and database objects fields, tables, and so on can be specified with multibyte characters.
In the control file, comments and object names may also use multibyte characters. The session character set is the character set supported by your terminal. During a direct path load, data converts directly into the database character set. The direct path load method, therefore, allows data in a character set that is not supported by your terminal to be loaded. Note: When data conversion is required, the target character set must contain a representation of all characters that exist in the data.
Otherwise, characters that have no equivalent in the target character set are converted to a default character, with consequent loss of data. When you are using the direct path load method, the database character set should be a superset of, or equivalent to, the datafile character sets. Similarly, during a conventional path load, the session character set should be a superset of, or equivalent to, the datafile character sets.
Different datafiles can be specified with different character sets. However, only one character set can be specified for each datafile. However, delimiters and comparison clause values must be specified to match the character set in use in the datafile. To ensure that the specifications are correct, you may prefer to specify hexadecimal strings, rather than character string values. Data that uses a different character set must be in a separate file.
It requires the table to be empty before loading. After the rows are successfully deleted, a commit is issued. You cannot recover the data that was in the table before the load, unless it was saved with Export or a comparable utility. If data does not already exist, the new rows are simply loaded.
Case 4: Loading Combined Physical Records provides an example. The row deletes cause any delete triggers defined on the table to fire. For more information on cascaded deletes, see the information about data integrity in Oracle8i Concepts. To update existing rows, use the following procedure:. Drop the work table. For example, the table might reach its maximum number of extents. Discontinued loads can be continued after more space is made available. When a load is discontinued, any data already loaded remains in the tables, and the tables are left in a valid state.
If the conventional path is used, all indexes are left in a valid state. If the direct path load method is used, any indexes that run out of space are left in an unusable state. They must be dropped before the load can continue. Other indexes are valid provided no other errors occurred. See Indexes Left in Index Unusable State for other reasons why an index might be left in an unusable state.
Use this information to resume the load where it left off. Any indexes that are left in an unusable state must be dropped before continuing the load. The indexes can then be re-created either before continuing or after the load completes. To continue a discontinued direct or conventional path load involving only one table, specify the number of logical records to skip with the command-line parameter SKIP.
It is not possible for multiple tables in a conventional path load to become unsynchronized. Therefore, a multiple-table conventional path load can also be continued with the command-line parameter SKIP.
Use the same procedure that you would use for single-table loads, as described in Continuing Single-Table Loads. If so, the tables are not synchronized and continuing the load is slightly more complex. If the numbers are the same, you can use Use the same procedure that you would use for single-table loads, as described in Continuing Single-Table Loads. These statements exist to handle unsynchronized interrupted loads. You must use the table-level SKIP clause.
Because Oracle8 i supports user-defined record sizes larger than 64k see READSIZE read buffer , the need to break up logical records into multiple physical records is reduced. However, there may still be situations in which you may want to do so. At some point, when you want to combine those multiple physical records back into one logical record, you can use one of the following clauses, depending on your data:. For example, two records might be combined if there were a pound sign in character position 80 of the first record.
If any other character were there, the second record would not be added to the first. If the condition is false, then the current physical record becomes the last physical record of the current logical record. THIS is the default. NEXT If the condition is true in the next record, then the current physical record is concatenated to the current logical record, continuing until the condition is false. For the equal operator, the field and comparison string must match exactly for the condition to be true.
For the not equal operator, they may differ in any character. If the last nonblank character in the current physical record meets the test, then the next physical record is read and concatenated to the current physical record, continuing until the condition is false. If the condition is false in the current record, then the current physical record is the last physical record of the current logical record.
Column numbers start with 1. Either a hyphen or a colon is acceptable start-end or start:end. If you omit end, the length of the continuation field is the length of the byte string or character string. If you use end, and the length of the resulting continuation field is not the same as that of the byte string or the character string, the shorter one is padded. Character strings are padded with blanks, hexadecimal strings with zeros.
The string must be enclosed in double or single quotation marks. The comparison is made character by character, blank padding on the right if necessary. X'hex-str' A string of bytes in hexadecimal format used in the same way as str. X'1FB would represent the three bytes with values 1F, b , and 33 hexadecimal. This is the only time you refer to character positions in physical records.
All other references are to logical records. This allows data values to span the records with no extra characters continuation characters in the middle. Assume that physical data records are 12 characters long and that a period means a space:. Trailing blanks in the physical records are part of the logical records. You cannot fragment records in secondary data files SDFs into multiple physical records. If record2 also has an asterisk in column 1, then record3 is appended also. If record2 does not have an asterisk in column 1, then it is still appended to record1, but record3 begins a new logical record.
In the next example, you specify that if the current physical record record1 has a comma in the last nonblank data column, then the next physical record record2 should be appended to it.
If a record does not have a comma in the last column, it is the last physical record of the current logical record. In the last example, you specify that if the next physical record record2 has a "10" in columns 7 and 8, then it should be appended to the preceding physical record record1. If a record does not have a "10" in columns 7 and 8, then it begins a new logical record. It defines the relationship between records in the datafile and tables in the database.
The specification of fields and datatypes is described in later sections. The table must already exist. Otherwise, the table name should be prefixed by the username of the owner, as follows:. It is only valid for a parallel load. You can choose to load or discard a logical record by using the WHEN clause to test a condition in the record.
The WHEN clause appears after the table name and is followed by one or more field conditions. For example, the following clause indicates that any record with the value "q" in the fifth column position should be loaded:. Parentheses are optional, but should be used for clarity with multiple comparisons joined by AND. For example. Then the WHEN clause is evaluated.
A record is inserted into the table only if the WHEN clause is true. Field conditions are discussed in detail in Specifying Field Conditions. If a WHEN directive fails on a record, that record is discarded skipped. The skipped record is assumed to be contained completely in the main datafile; therefore, a secondary data file will not be affected if present. If all data fields are terminated similarly in the datafile, you can use the FIELDS clause to indicate the default delimiters.
Note: Terminators are strings not limited to a single character. Note: Enclosure strings do not have to be a single character. You can override the delimiter for any given column by specifying it after the column name. See Specifying Delimiters for more information on delimiter specification. Syntax for this feature is given in High-Level Syntax Diagrams.
This option inserts each index entry directly into the index, one record at a time. Instead, index entries are put into a separate, temporary storage area and merged with the original index at the end of the load. This method achieves better performance and produces an optimal index, but it requires extra storage space. During the merge, the original index, the new index, and the space for new entries all simultaneously occupy storage space.
The resulting index may not be as optimal as a freshly sorted one, but it takes less space to produce. It also takes more time because additional UNDO information is generated for each index insert. This option is suggested for use when either of the following situations exists:. The number of records to be loaded is small compared to the size of the table a ratio of , or less, is recommended Specifying Field Conditions A field condition is a statement about a field in a logical record that evaluates as true or false.
First, positions in the field condition refer to the logical record, not to the physical record. Second, you may specify either a position in the logical record or the name of a column that is being loaded.
Either start-end or start:end is acceptable. If you omit end, the length of the field is determined by the length of the comparison string. If the lengths are different, the shorter field is padded. If the field col2 is an attribute of a column object col1, when referring to col2 in one of the directives, you must use the notation col1.
If the comparison is true, the current record is inserted into the table. It can be used in place of a literal string in any field comparison. The condition is TRUE whenever the column is entirely blank. Using it is the same as specifying an appropriately sized literal string of blanks. For example, the following specifications are equivalent:. Note: There can be more than one blank in a multibyte character set. It is a good idea to use the BLANKS keyword with these character sets instead of specifying a string of blank characters.
The character string will match only a specific sequence of blank characters, while the BLANKS keyword will match combinations of different blank characters. For more information on multibyte character sets, see Multibyte Asian Character Sets. When a data field is compared to a literal string that is shorter than the data field, the string is padded. Character strings are padded with blanks, for example:. This example compares the data in position with 4 blanks. If position contains 4 blanks, then the clause evaluates as true.
You may load any number of a table's columns. Columns defined in the database, but not specified in the control file, are assigned null values this is the proper way to insert null values. A column specification is the name of the column, followed by a specification for the value to be put in that column. The list of columns is enclosed by parentheses and separated with commas as follows:. See Generating Data. If the column's value is read from the datafile, the data field that contains the column's value is specified.
In this case, the column specification includes a column name that identifies a column in the database table, and a field specification that describes a field in a data record. The field specification includes position, datatype, null restrictions, and defaults. It is not necessary to specify all attributes when loading column objects. Any missing attributes will be set to NULL. Filler fields have names but they are not loaded into the table. Also, filler fields can occur anyplace in the data file.
A CHAR field, however, can contain any character data. You may specify one datatype for each field; if unspecified, CHAR is assumed. The position may either be stated explicitly or relative to the preceding field. The first character position in a logical record is 1. If you omit end, the length of the field is derived from the datatype in the datafile.
Note that CHAR data specified without start or end is assumed to be length 1. If it is impossible to derive a length from the datatype, an error message is issued. Therefore, it starts in column 28 and continues until a slash is encountered. When you are determining field positions, be alert for TABs in the datafile. The load then fails with multiple "invalid number" and "missing field" errors. These kinds of errors occur when the data contains tabs.
When printed, each tab expands to consume several columns on the paper. In the datafile, however, each Tab is still only one character. The use of delimiters to specify relative positioning of fields is discussed in detail in Specifying Delimiters. For an example, see the second example in Extracting Multiple Logical Records. A logical record may contain data for one of two tables, but not both.
The remainder of this section details important ways to make use of that behavior. Some data storage and transfer media have fixed-length physical records. When the data records are short, more than one can be stored in a single, physical record to use the storage space efficiently.
For example, assume the data is as follows:. The same record could be loaded with a different specification. The following control file uses relative positioning instead of fixed positioning. Instead, scanning continues where it left off. A single datafile might contain records in a variety of formats.
A record ID field distinguishes between the two formats. Department records have a "1" in the first column, while employee records have a "2". The following control file uses exact positioning to load this data:. The records in the previous example could also be loaded as delimited data.
The following control file could be used:. This keyword causes field scanning to start over at column 1 when checking for data that matches the second format. The following functions are described:. The LOAD keyword is required in this situation. The SKIP keyword is not permitted. In addition, no memory is required for a bind array.
This is the simplest form of generated data. It does not vary during the load, and it does not vary between loads. It is converted, as necessary, to the database column type. You may enclose the value within quotation marks, and you must do so if it contains white space or reserved words.
Be sure to specify a legal value for the target column. If the value is bad, every record is rejected. To set a column to null, do not specify that column at all. Oracle automatically sets that column to null when loading the record.
Use the RECNUM keyword after a column name to set that column to the number of the logical record from which that record was loaded. Records are counted sequentially from the beginning of the first datafile, starting with record 1. Thus it increments for records that are discarded, skipped, rejected, or loaded.
If the column is of type CHAR, then the date is loaded in the form ' dd-mon-yy. If the system date is loaded into a DATE column, then it can be accessed in a variety of forms that include the time and the date.
It does not increment for records that are discarded or skipped. MAX The sequence starts with the current maximum value for the column plus the increment. If a record is rejected that is, it has a format error or causes an Oracle error , the generated sequence numbers are not reshuffled to mask this. If four rows are assigned sequence numbers 10, 12, 14, and 16 in a particular column, and the row with 12 is rejected; the three rows inserted are numbered 10, 14, and 16, not 10, 12, Option 4 is correct.
Compatible object types include tables and indices. The discard file stores records that don't match the record-selection criteria specified in the control file. The log file stores summary information about the load. The bad file also stores records the database itself interprets as invalid. The discard file is optional - the loader will work correctly without it. The log file is mandatory - the loader can't be used unless one is created. The control file contains free-format, case-insensitive code.
A typical control file begins with an explanatory comment. To mark a particular line of the file as a comment line, you begin the line with two hyphens. The parser ignores all text on that line after the hyphens.
You can add comments to the command section of the file, but not to the input data section. Identify considerations relating to control-file syntax. Control-file code is free-format and case-insensitive, and a comment must be preceded by two hyphens.
Option 1 is correct. All text after the hyphens is ignored by the parser. As with all SQL code, you can change the case of characters without changing the meaning of the code. The code is data-description language DDL. As with all SQL code, a statement can be spread out over multiple lines or can extend over one line. You can use the WHEN keyword to include conditions that each record must match before it is loaded.
In this example, the WHEN statement specifies that a record should be loaded into the table only when its fifty-seventh character is a decimal point.
If created, the bad file has the default file name and extension mydat2. The discard file is not created, even if rows are discarded. For mydat3. A discard file with the specified name mydat3. For mydat4. Record terminators can be included embedded in data values. The syntax for the CSV clause is as follows:. You can override them with different termination and enclosure characters.
When the CSV clause is used, only delimitable data types are allowed as control file fields. If the data is included in the control file itself, then the INFILE clause is followed by an asterisk rather than a file name. The actual data is placed in the control file after the load configuration specifications. For example, suppose that your operating system has the following option-string syntax:. To declare a file named mydata.
This example uses the recommended convention of single quotation marks for file names, and double quotation marks for everything else. If you have specified that you want a bad file to be created, then the following processes occur:. On some systems, a new version of the file can be created if a file with the same name already exists.
You can also specify the bad file from the command line by using the BAD parameter. If present, then this association overrides any bad file previously specified as part of that clause.
The bad file is created in the same record and file format as the data file, so that you can reload the data after you correct it. For data files in stream record format, the record terminator that is found in the data file is also used in the bad file. The directory parameter specifies a directory path to which the bad file will be written. The filename parameter specifies a valid file name specification for your platform.
Any spaces or punctuation marks in the file name must be enclosed in single quotation marks. If you do not specify a name for the bad file, then the name defaults to the name of the data file with an extension or file type of. To specify a bad file with file name sample and default file extension or file type of. To specify a bad file with file name bad and file extension or file type of. Instead, the LOB column is left empty not null with a length of zero 0 bytes.
If the data can be evaluated according to the WHEN clause criteria even with unbalanced delimiters , then it is either inserted or rejected. Neither a conventional path nor a direct path load will write a row to any table if it is rejected because of reason number 2 in the list of reasons. A conventional path load will not write a row to any tables if reason number 1 or 3 in the previous list is violated for any one table. The row is rejected for that table and written to the reject file.
In a conventional path load, if the data file has a record that is being loaded into multiple tables and that record is rejected from at least one of the tables, then that record is not loaded into any of the tables. The log file indicates the Oracle error for each rejected record. The records that are contained in the discard file are called discarded records.
Discarded records do not satisfy any of the WHEN clauses specified in the control file. These records differ from rejected records.
Discarded records do not necessarily have any bad data. No insert is attempted on a discarded record. You have specified a discard file name and one or more records fail to satisfy all of the WHEN clauses specified in the control file.
Be aware that if the discard file is created, then it overwrites any existing file with the same name. You can specify the discard file from within the control file either by specifying its directory, or name, or both, or by specifying the maximum number of discards. Any of the following clauses result in a discard file being created, if necessary:. The discard file is created in the same record and file format as the data file. For data files in stream record format, the same record terminator that is found in the data file is also used in the discard file.
If no discard clauses are included in the control file or on the command line, then a discard file is not created even if there are discarded records that is, records that fail to satisfy all of the WHEN clauses specified in the control file. However, you must specify at least one. The directory parameter specifies a directory to which the discard file will be written.
The default file name is the name of the data file, and the default file extension or file type is. A discard file name specified on the command line overrides one specified in the control file. If a discard file with that name already exists, then it is either overwritten or a new version is created, depending on your operating system. You can choose to specify a different number of discards for each data file. Or, if you specify the number of discards only once, then the maximum number of discards specified applies to all files.
For example, The file is named after the process that creates it. For example: finance. The following example allows 25 records to be discarded during the load before it is terminated.
The list shows different ways that you can specify a name for the discard file from within the control file. To specify a discard file with file name circular and default file extension or file type of. To specify a discard file named notappl with the file extension or file type of. To specify a full path to the discard file forget.
An attempt is made to insert every record into such a table. Therefore, records may be rejected, but none are discarded. Case study 7, Extracting Data from a Formatted Report, provides an example of using a discard file. The DISCARD parameter gives you the option to provide a specification at the command line to identify a discard file where you can store records that are neither inserted into a table nor rejected.
When you specify a file name on the command line, this specification overrides any discard file name that you may have specified in the control file. If there is a match using the equal or not equal specification, then the field is set to NULL for that row.
Any field that has a length of 0 after blank trimming is also set to NULL. This datetime specification is used for every date or timestamp field, unless a different mask is specified at the field level. A mask specified at the field level overrides a mask specified at the table level.
Oracle Database Globalization Support Guide. The following sections provide a brief introduction to some of the supported character encoding schemes.
Data can be loaded in multibyte format, and database object names fields, tables, and so on can be specified with multibyte characters. In the control file, comments and object names can also use multibyte characters.
Unicode is a universal encoded character set that supports storage of information from most languages in a single character set.
Unicode provides a unique code value for every character, regardless of the platform, program, or language. A character in UTF-8 can be 1 byte, 2 bytes, or 3 bytes long. AL32UTF8 and UTF8 character sets are not compatible with each other as they have different maximum character widths four versus three bytes per character.
Multibyte fixed-width character sets for example, AL16UTF16 are not supported as the database character set. This alternative character set is called the database national character set. Only Unicode character sets are supported as the database national character set.
However, the Oracle database supports only UTF encoding with big-endian byte ordering AL16UTF16 and only as a database national character set, not as a database character set. When data character set conversion is required, the target character set should be a superset of the source data file character set.
Otherwise, characters that have no equivalent in the target character set are converted to replacement characters, often a default character such as a question mark? This causes loss of data. If they are specified in bytes, and data character set conversion is required, then the converted values may take more bytes than the source values if the target character set uses more bytes than the source character set for any character that is converted.
This will result in the following error message being reported if the larger target value exceeds the size of the database column:. You can avoid this problem by specifying the database column size in characters and also by using character sizes in the control file to describe the data. Another way to avoid this problem is to ensure that the maximum column size is large enough, in bytes, to hold the converted value.
Character-Length Semantics. Rows might be rejected because a field is too large for the database column, but in reality the field is not too large.
A load might be abnormally terminated without any rows being loaded, when only the field that really was too large should have been rejected. Normally, the specified name must be the name of an Oracle-supported character set. However, because you are allowed to set up data using the byte order of the system where you create the data file, the data in the data file can be either big-endian or little-endian.
Therefore, a different character set name UTF16 is used. All primary data files are assumed to be in the same character set.
Byte Ordering. Oracle Database Globalization Support Guide for more information about the names of the supported character sets. Control File Character Set. If the control file character set is different from the data file character set, then keep the following issue in mind. To ensure that the specifications are correct, you may prefer to specify hexadecimal strings, rather than character string values.
If hexadecimal strings are used with a data file in the UTF Unicode encoding, then the byte order is different on a big-endian versus a little-endian system. For example, "," comma in UTF on a big-endian system is X'c'. On a little-endian system it is X'2c00'. This allows the same syntax to be used in the control file on both a big-endian and a little-endian system.
For example, the specification CHAR 10 in the control file can mean 10 bytes or 10 characters. These are equivalent if the data file uses a single-byte character set. However, they are often different if the data file uses a multibyte character set.
To avoid insertion errors caused by expansion of character strings during character set conversion, use character-length semantics in both the data file and the target database columns. Byte-length semantics are the default for all data files except those that use the UTF16 character set which uses character-length semantics by default.
The following data types use byte-length semantics even if character-length semantics are being used for the data file, because the data is binary, or is in a special binary-encoded form in the case of ZONED and DECIMAL :. This is necessary to handle data files that have a mix of data of different data types, some of which use character-length semantics, and some of which use byte-length semantics.
The SMALLINT length field takes up a certain number of bytes depending on the system usually 2 bytes , but its value indicates the length of the character string in characters. Character-length semantics in the data file can be used independent of whether character-length semantics are used for the database columns.
Therefore, the data file and the database columns can use either the same or different length semantics. The fastest way to load shift-sensitive character data is to use fixed-position fields without delimiters.
To improve performance, remember the following points:. If blanks are not preserved and multibyte-blank-checking is required, then a slower path is used. This can happen when the shift-in byte is the last byte of a field after single-byte blank stripping is performed. Additionally, when an interrupted load is continued, the use and value of the SKIP parameter can vary depending on the particular case.
The following sections explain the possible scenarios. In a conventional path load, data is committed after all data in the bind array is loaded into all tables. If the load is discontinued, then only the rows that were processed up to the time of the last commit operation are loaded. There is no partial commit of data. In a direct path load, the behavior of a discontinued load varies depending on the reason the load was discontinued.
Space errors when loading data into multiple subpartitions that is, loading into a partitioned table, a composite partitioned table, or one partition of a composite partitioned table :. If space errors occur when loading into multiple subpartitions, then the load is discontinued and no data is saved unless ROWS has been specified in which case, all data that was previously committed will be saved. The reason for this behavior is that it is possible rows might be loaded out of order.
This is because each row is assigned not necessarily in order to a partition and each partition is loaded separately. If the load discontinues before all rows assigned to partitions are loaded, then the row for record "n" may have been loaded, but not the row for record "n-1".
Space errors when loading data into an unpartitioned table, one partition of a partitioned table, or one subpartition of a composite partitioned table:. In either case, this behavior is independent of whether the ROWS parameter was specified. When you continue the load, you can use the SKIP parameter to skip rows that have already been loaded. This means that when you continue the load, the value you specify for the SKIP parameter may be different for different tables.
If a fatal error is encountered, then the load is stopped and no data is saved unless ROWS was specified at the beginning of the load. In that case, all data that was previously committed is saved. This means that the value of the SKIP parameter will be the same for all tables. When a load is discontinued, any data already loaded remains in the tables, and the tables are left in a valid state. If the direct path load method is used, then any indexes on the table are left in an unusable state.
You can either rebuild or re-create the indexes before continuing, or after the load is restarted and completes.
0コメント