Entering content frame

Syntax documentation SET Command Locate the document in the library structure

This Loader command for creating a database session allows you to define many properties for a database session. You can adjust predefined values of the control parameters of the Loader to suit your own requirements.

Note

The new values are only valid for the current database session and must be restored if they are needed in subsequent sessions.

Syntax

<set_commando> ::=
  SET
| SET BACKUPTOOL (TSM | NETWORKER | BACKINT)
| SET <bool_spec>
| SET CODETYPE <standard_code_spec>
| SET <code_page_spec>
| SET COMPRESSED '/<s>/<d>/'
| SET CONFIGURATION (EXCLUDE | INCLUDE)
| SET CURRENT SCHEMA = <valSCHEMA_NAME>
| SET DATE <standard_date_mask>
| SET FORMAT <standard_date_mask>
| SET <isolation_level_spec>
| SET MAXERRORCOUNT <valMAXERRORCOUNT>
| SET <null_spec>
| SET <number_spec>
| SET TIME <standard_time_mask>
| SET TIMESTAMP <standard_timestamp_mask>
| SET TRANSACTION SIZE <valTRANSACTION_SIZE>

SET command without ad- Cditional specification

Display the following log files:

- Name and complete path of the Loader log

- Complete path to the directory in which the Loader saves the packages that were created in transport mode

BACKUPTOOL (TSM | NETWORKER | BACKINT)

Backup tool from other providor

TSM
NETWORKER
BACKINT

Backup tool TSM (IBM/Tivoli)
Backup tool NetWorker (Legato)
Backup tools, that support Backint for MaxDB and Backint for Oracle

<bool_spec>

BOOLEAN '<valVALUE_FOR_TRUE>/<valVALUE_FOR_FALSE>'

<valVALUE_FOR_TRUE>/
<valVALUE_FOR_FALSE>

Defines the character string for values that are true/false
Character strings can have a maximum of 10 characters
Default value: TRUE/FALSE.

CODETYPE <standard_code_spec>

Specification of the code type

Possible values: ASCII | UCS2 | UTF8

<standard_code_spec>

Code Specification

<code_page_spec>

CODEPAGE [<valCODEPAGE_NAME>]

<valCODEPAGE_NAME>

Name of code page
Default value: ISO-8859-1

If you specify an empty value, the code page is reset to the default value.

COMPRESSED '/<s>/<d>/'

Specification of characters for separating and marking data fields

<s>

Character used to separate data fields
Default value: comma
Value must be exactly one character long and cannot be blank

<d>

Character used to select data
Default value: double quotation marks
Value can be exactly one character long or blank.
No delimiter is defined if it is blank.

CONFIGURATION (EXCLUDE | INCLUDE)

Defines the interpretation of the content of the configuration file for Loader commands

EXCLUDE

Negative list
The tables listed in the configuration file are not to be processed.

INCLUDE

Positive list
The tables listed in the configuration file are to be processed.

CURRENT_SCHEMA = <valSCHEMA_NAME>

Definition of current schema.

<valSCHEMA_NAME>

Schema valSCHEMA_NAME is specified as the current schema

Default value: Schema that is assigned to the user who is logged on

DATE <standard_date_mask>

Specification of the date mask

<standard_date_mask>

Date Specifications
Possible values: EUR | INTERNAL| ISO| JIS | USA
Default value: INTERNAL

FORMAT <standard_date_mask>

Sets the format for date and time values of the database

<standard_date_mask>

In this format the Loader transfers date and time values in SQL statements to the kernel
Possible values: EUR | INTERNAL| ISO| JIS | USA
Default value: INTERNAL

<isolation_level_spec>

ISOLATION LEVEL <valISOLATION_LEVEL>

<valISOLATION_LEVEL>

Value of the isolation level to be set
Default value: 3

MAXERRORCOUNT <valMAXERRORCOUNT>

Number of errors that the Loader accepts before the command is cancelled.

<valMAXERRORCOUNT>

Number of errors

<null_spec>

NULL '<valLITERAL>'

<valLITERAL>

Null value representation; maximum length of 20 characters

Default value: ?                    (a question mark and 19 spaces)

<number_spec>

DECIMAL '/[<t>]/<d>/'

<t>

Defines the character for structuring thousands
Default value: no character

<d>

Defines the character for separating whole numbers from decimal places;
Default value: decimal point

TIME <standard_time_mask>

Specifies the time mask

<standard_time_mask>

Time Specifications
Possible values: EUR | INTERNAL| ISO| JIS | USA
Default value: INTERNAL

TIMESTAMP <standard_timestamp_mask>

Specifies the time stamp mask

<standard_timestamp_mask>

Time Stamp Specifications
Possible values: EUR | INTERNAL| ISO| JIS | USA
Default value: INTERNAL

TRANSACTION SIZE <valTRANSACTION_SIZE>

Defines when a COMMIT is executed

<valTRANSACTION_SIZE>

Number of data records after which a COMMIT is carried out.

Explanation

Some of the options of the SET command are explained in more detail below.

SET BACKUPTOOL (TSM|NETWORKER|BACKINT)

You use the syntax rule SET BACKUPTOOL (TSM | NETWORKER | BACKINT) to define which third-party backup tool is to be used.

See also:

Medium

SET <bool_spec>

You use the syntax rule SET <bool_spec> to define the character string that is used to represent BOOLEAN values that are either unloaded from the database instance or are to be loaded to a database instance in data streams.

You can change the current value for individual commands by using the syntax element <bool_spec> <stream_format_spec>.

SET CODETYPE <standard_code_spec>

In the code specification standard_code_spec, you define the default value for interpreting data streams that contain plain text values. The default value in the Loader is ASCII. The default value in the Loader is ASCII.

When you export or import data, you can transform it between various code types. If you export/import ASCII data into an ASCII database or UCS2 data into a UNICODE database, the data does not have to be converted.

You can change the current value for individual commands by using the syntax element <code_spec> <stream_format_spec>. When you export /import LONG data, you determine the default values by using the syntax rule longfile_code_spec.

SET <code_page_spec>

If you want to use a particular code page for converting CHAR data from ASCII to UCS2, you can specify the page using the SET command SET <code_page_spec>.

Example

SET CODEPAGE "8859-14"
SET CODEPAGE WINDOS-1252

Case 1: The code page for the conversion is a user-defined code page and is not yet contained in the system table CODEPAGE.

To make user-defined code pages accessible to the Loader for conversions, you first have to load these code pages into the system table CODEPAGE. To do this, proceed as follows:

...

       1.      In the user-specific configuration directory of the Loader (Microsoft Windows: <drive>:\Documents and Settings\<user_id>\Application Data\sdb\loader\config, UNIX: $HOME/sdb/loader/config) create a file called <valCODEPAGE_NAME>.txt. This file has to be formatted in the same way as the files that are provided by the Unicode consortium at ftp://ftp.unicode.org/Public/MAPPINGS/.

Example

...
# Format:  Three ab-separated columns
#    Column #1 is the ISO/IEC 8859-8 code (in hex as 0xXX)
#    Column #2 is the Unicode (in hex as 0xXXXX)
#    Column #3 the Unicode name (follows a comment sign, '#')


0x00
0x00 0x0000   #  NULL
0x01 0x0001   #  START OF HEADING
0x02 0x0002   #  START OF TEXT
0x03 0x0003   #  END OF TEXT
0x04 0x0004   #  END OF TRANSMISSION
0x05 0x0005   #  ENQUIRY
0x06 0x0006   #  ACKNOWLEDGE
0x07 0x0007   #  BELL
0x08 0x0008   #  BACKSPACE
0x09 0x0009   #  HORIZONTAL TABULATION
0x0A 0x000A   #  LINE FEED

       2.      Load the code page into the system table CODEPAGE.
To do this, use the SET command. When processing the SET command SET CODEPAGE <valCODEPAGE_NAME>, the Loader first tries to find the specified code page in the system table CODEPAGE. If the table does not contain the code page, the SAP DB Loader tries to find the corresponding file <valCODEPAGE_NAME>.txt  If this file exists, it is read, and the conversion table is entered in the system table CODEPAGE.

If the file is not found, and if the code page is not contained in the system table, the Loader stops processing the SET commands and displays an error message.

If the SET command is processed successfully, the user-defined code page is available in the system table CODEPAGE.

Case 2: The code page for the conversion is already contained in the system table CODEPAGE.

The Loader reads the required conversion table from the system table CODEPAGE. All subsequent conversions of the CHAR data from ASCII to UCS2 are performed using this conversion table.

SET COMPRESSED '/<s>/<d>/'

You use the syntax rule SET COMPRESSED '/<s>/<d>/' to define the characters that are to be used in the COMPRESSED format for the following purposes.

·        To separate data: s

·        To select data: d

The current value can also be changed in individual commands.

SET CURRENT SCHEMA = <valSCHEMA_NAME>

The specified schema is defined as the current schema. You can override this value using a USE USER command or USE SCHEMA command .

SET DATE <standard_date_mask>

You use the standard_date_mask to specify the format for plain text values in which DATE columns are entered and displayed.

You can change the current value for individual commands by using the syntax element <date_spec> <stream_format_spec>.

SET FORMAT <standard_date_mask>

You use this command to specify in which format the Loader transfers date and time values in SQL statements to the database. During the processing of Loader commands, the Loader generally transfers date and time values in INTERNAL format. If the date and time values embedded in SQL statements are to be transferred in another format, these have to be explicitly set with this command.

Example

INSERT INTO <table_name> values ('2005-01-01', 1)

As the date is to be transferred in ISO format here, the format must be set using SET FORMAT ISO.

SET ISOLATION LEVEL <valISOLATION_LEVEL>

You use the syntax rule SET ISOLATION LEVEL <valISOLATION_LEVEL> to define the value of the isolation level (permitted values: 0, 1, 10, 15, 2, 20, 3, 30). If you do not set an isolation level, isolation level 3 is assumed implicitly.

This setting applies to the entire Loader session provided that the isolation level is not changed by another SET ISOLATION LEVEL command.

You can use the USE USER command to set the isolation level for a user and override the value set by the SET command.

The current value can also be changed in an EXPORT COLUMNS command .

SET MAXERRORCOUNT <valMAXERRORCOUNT>

You use the syntax rule SET MAXERRORCOUNT <valMAXERRORCOUNT> to define how many errors the Loader should accept when a specific command is executed before it cancels processing of the command.

This value applies throughout a database session or until it is overwritten by another SET MAXERRORCOUNT command.

SET <null_spec>

You use the syntax rule SET <null_spec> to specify the character string used to represent null values that have been loaded from the database instance in data streams.

You can change the current value for individual commands by using the syntax element <null_spec> <stream_format_spec>.

SET <number_spec>

You use the syntax rule SET <number_spec> to specify which characters are to be used in decimal numbers to group thousands and separate integers from decimal places.

If no digit or character is specified for t or d, the Loader uses the default.

If you use this data format definition in the SET command, you also specify the number format for all subsequent commands. In a single Loader session, this applies until a new SET command is executed.

Example

SET DECIMAL '/ /,/'
Specifies the following number format: 1 999 987,98

SET DECIMAL '///'
Specifies the following number format (Loader default): 1999987.98

The current value can also be changed in individual commands.

SET TIME <standard_time_mask>

You use the standard_time_mask to specify the format for plain text values in which TIME columns are entered and displayed.

You can change the current value for individual commands by using the syntax element <<time_spec> <stream_format_spec> .

SET TIMESTAMP <standard_timestamp_mask>

You use the standard_timestamp_mask to specify the format for plain text values in which TIMESTAMP columns are entered and displayed.

You can change the current value for individual commands by using the syntax element <timestamp_spec> <stream_format_spec>.

See also:

Starting a Database Session: Commands

 

Leaving content frame