SAP HANA SQL Command Network Protocol Reference en
SAP HANA SQL Command Network Protocol Reference en
2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.1 Terminology. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6
2.2 Protocol Modification. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3 Message Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.1 Message Header. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8
3.2 Segment Header. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Segment Kind. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Message Type. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Command Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Function Code. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.3 Part Header. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Part Kind. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Part Attributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.4 Part Support in Request Messages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.5 Part Support in Reply Messages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.6 Type Codes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31
3.7 Part Data Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Option Part Data Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .34
Multi-Line Option Part Data Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
COMMAND Part Data Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
RESULTSET Part Data Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
ERROR Part Data Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
STATEMENTID Part Data Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
TRANSACTIONID Part Data Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
ROWSAFFECTED Part Data Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
RESULTSETID Part Data Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
TOPOLOGYINFORMATION Part Data Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
TABLELOCATION Part Data Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
READLOBREQUEST Part Data Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
READLOBREPLY Part Data Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
ABAPISTREAM Part Data Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
ABAPOSTREAM Part Data Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
COMMANDINFO Part Data Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41
WRITELOBREQUEST Part Data Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41
4 Glossary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
This guide describes the SQL Command Network Protocol that is used by SAP HANA clients to communicate
with SAP HANA.
The SQL Command Network Protocol Reference Guide describes the protocol used by SAP HANA database
clients to communicate with the SAP HANA database.
This document describes the binary message format used in the communication and explains the purpose of
the various protocol elements. It also discusses usage scenarios for the various messages defined in the SQL
Command Network Protocol and defines usage sequences to utilize database server functionality, such as:
2.1 Terminology
A message describes requests or replies exchanged between client and server. A request is always a message
sent by the client, and a reply is always the message sent by the server.
The following abbreviations are used to describe data types in message formats:
NUI8 8-byte unsigned integer in client native (big/little-endian) format unsigned long
FLOAT IEEE single precision floating point value in little-endian format float
DOUBLE IEEE double precision floating point value in little-endian format double
Additions to the protocol require careful modification and extension of the exchanged connect options.
The SQL Command Network Protocol must be kept stable so that clients are able to communicate with recent
server software versions and vice versa. A more recent client may have to degrade the usage of the protocol
depending on the server version while a more recent server may have to only use certain features if non-recent
client software is detected.
Detection is performed during the connection by exchanging connect options, which specify the required
behavior of the client and getting the supported feature set from the server. This detection does not perform
global versioning but enables or disables feature flags, or modifies certain functionality.
The communication between the client and the server is completely synchronous: the client can only send the
next request once the reply to the previous request has been fully received.
A client is free to continue with its own processing or to communicate with other servers of an SAP HANA
database system while waiting for the response.
A message consists of a fixed part, called the message header and a variable length message buffer. The
message buffer contains message segments, which, in turn, consist of a segment header and a segment
buffer. The segment buffer contains parts which have a fixed length part header and a variable length buffer.
The one exception to this format is during communication initialization when a different message pair is
exchanged that is necessary to distinguish the current and former protocol variants.
The message header is a 32 byte structure that consists of the following fields:
PACKETCOUNT I4 Specifies a packet sequence number in this session. Packets with the same
sequence number belong to one request/response pair.
VARPARTLENGTH UI4 Specifies the amount of space used in the packet. The maximum size is 2G -1.
The VARPARTLENGTH does not include the message header size itself, so the
total packet size is VARPARTLENGTH + 32.
COMPRESSIONVAR UI4 For a compressed packet, specifies the space used in the packet once it is de
PARTLENGTH compressed, excluding the message header size itself.
The segment header has a length of 24 bytes. There are different segment header structures for request and
reply, but both have the same definition for first 13-bytes of the structure. They are structured as follows:
FUNCTIONCODE I2 Defines the nature of the statement or functionality that has been pre
pared or executed.
Specifies the last field of the segment header part, common to all types (kinds) of segments.
It defines the segment kind, which further specifies the layout of the remaining segment header structure.
Value Description
72 FETCHABSOLUTE Moves the cursor to the given row number and fetches the data.
73 FETCHRELATIVE Moves the cursor a number of rows relative to the position, either positive or
negative, and fetches the data.
74 FETCHFIRST Moves the cursor to the first row and fetches the data.
75 FETCHLAST Moves the cursor to the last row and fetches the data.
79 FETCHNEXTITAB Fetches the next result for an ITAB object in Fast Data Access mode.
80 INSERTNEXTITAB Inserts the next result for an ITAB object in Fast Data Access mode.
82 DBCONNECTINFO Requests and receives database connect information when connecting using
the database name.
3 HOLD_CURSORS_OVER_COMMIT Keeps the result set created by this command over commit time.
5 SCROLL_INSENSITIVE Marks the result set created by this command as scroll insensitive.
Identifies the nature of the statement or functionality that has been prepared or executed.
ARGUMENTCOUNT I2 Specifies the argument count (the number of elements in part data). If ARGU
MENTCOUNT is -1, then BIGARGUMENTCOUNT specifies the argument
count.
BIGARGUMENTCOUNT I4 Specifies the argument count (the number of elements in part data) when
ARGUMENTCOUNT is -1. This value is ignored unless ARGUMENTCOUNT is
-1. BIGARGUMENTCOUNT is only supported by some part kinds.
BUFFERLENGTH I4 Specifies the length of the part buffer in bytes (used space).
Related Information
29 CLIENTCONTEXT Specifiies the client context information (client version, type, and applica
tion name).
38 PROFILE Specifies the client last send and receive time (in microseconds, -1 means
unknown).
42 CONNECTOPTIONS Specifies the protocol connection options, which are often used to version
protocol features.
48 RESULTSETMETADATA Specifies the result set metadata (type, length, and name information).
55 ITABMETADATA Specifies the information on the ABAP ITAB structure for an ITAB transfer
for FDA.
57 CLIENTINFO Specifies the client information values (sets session variable values on the
server).
60 FDAREQUESTMETADATA Specifies the information on memory and request details for an FDA re
quest.
61 FDAREPLYMETADATA Specifies the information on memory and request details for an FDA reply.
73 SQLREPLYPOTIONS Specifies the parsed information from certain client side encryption-re
lated SQL statements.
4 RESULTSETCLOSED Specifies the result set that produced this part is closed.
In the following table, letters denote the relationship between the part and the message:
X Specifies the default relationship between the part and the message.
A Specifies that this part can always be sent if distributed transaction handling requires it.
B Specifies that this part is supported when the prepared statement has input parameters.
C Specifies that this part is supported when the client application set information flags.
Mes EX PRE AB XA_ XA_ EX WRI REA FIN AU CO CO RO FET DIS CL DR EX FET IN
sag EC PAR AP STA JOI EC TE DL DL TH NN MM LLB CH CO OS OP EC CH SER
e UTE E STR RT N UTE LO OB OB EN ECT IT AC NE NN ERE STA UTE NE TN
(top DI EA B TI K XT ECT SUL TE ITA XTI EX
) REC M CAT TSE ME B TAB TI
T E T NTI TAB
Part
D
Kin
d
(be
low)
NIL
CO X X
MM
AN
D
RE
SUL
TSE
T
ER
RO
R
STA X X
TE
ME
NTI
D
TR X
AN
SA
CTI
ONI
D
RO
WS
AF
FEC
TED
TO
PO
LO
GYI
NF
OR
MA
TIO
N
TA
BLE
LO
CAT
ION
REA X
DL
OB
RE
QU
EST
REA
DL
OB
RE
PLY
AB X
API
STR
EA
M
AB X
AP
OS
TRE
AM
WRI X
TE
LO
BR
EQ
UES
T
WRI
TE
LO
BR
EPL
Y
PA B
RA
ME
TER
S
AU X X
TH
EN
TI
CAT
ION
SES A A A A A A A A A A A A A A A A A A A A
SIO
NC
ON
TEX
T
STA A A A A A A A A A A A A A A A A A A A A
TE
ME
NT
CO
NT
EXT
OU
TP
UT
PA
RA
ME
TER
S
CO X
NN
EC
TO
PTI
ON
S
CO X X
MM
ITO
PTI
ON
S
FET
CH
OP
TIO
NS
FET X
CH
SIZ
E
RE
SUL
TSE
TM
ETA
DAT
A
FIN X
DL
OB
RE
QU
EST
FIN
DL
OB
RE
PLY
ITA
BS
HM
ITA
BC
HU
NK
ME
TA
DAT
A
ITA
BM
ETA
DAT
A
CLI C C C C
EN
TIN
FO
STR X
EA
MD
ATA
OS X
TRE
AM
RE
SUL
T
FDA
RE
QU
EST
ME
TA
DAT
A
FDA
RE
PLY
ME
TA
DAT
A
BAT
CH
PRE
PAR
E
TR
AN
SA
CTI
ON
FLA
GS
RE D
SUL
TSE
TO
PTI
ON
S
In the following table, the letters denote the relationship between the part and the message:
X Specifies the default relationship between the part and the message.
A Specifies that this part is supported when the message yields one or more result sets.
C Specifies that this part is supported when the statement generates a row count of affected rows.
D Specifies if the statement caused an action in transaction handling (commit, rollback, or start of a new
write transaction).
E Specifies that this part is available if the server has information that is useful to applying statement routing
(see the corresponding Usage Scenario Statement Routing).
F Specifies that this part is supported when the statement has input and/or output parameters.
G Specifies that this part is supported when the statement has output parameters.
Mes EX PRE AB XA_ XA_ EX WRI REA FIN AU CO CO RO FET DIS CL DR EX FET IN
sag EC PAR AP STA JOI EC TE DL DL TH NN MM LLB CH CO OS OP EC CH SER
e UTE E STR RT N UTE LO OB OB EN ECT IT AC NE NN ERE STA UTE NE TN
(top DI EA B TI K XT ECT SUL TE ITA XTI EX
) REC M CAT TSE ME B TAB TI
T E T NTI TAB
Part
D
Kin
d
(be
low)
NIL
CO
MM
AN
D
RE A A
SUL
TSE
T
ER B B B B B B B B B
RO
R
STA X
TE
ME
NTI
D
TR X
AN
SA
CTI
ONI
D
RO C C
WS
AF
FEC
TED
TO
PO
LO
GYI
NF
OR
MA
TIO
N
TA E
BLE
LO
CAT
ION
REA
DL
OB
RE
QU
EST
REA X
DL
OB
RE
PLY
AB X
API
STR
EA
M
AB X
AP
OS
TRE
AM
WRI
TE
LO
BR
EQ
UES
T
WRI X
TE
LO
BR
EPL
Y
PA B
RA
ME
TER
S
AU X
TH
EN
TI
CAT
ION
SES A A
SIO
NC
ON
TEX
T
STA H H H H H H H H H
TE
ME
NT
CO
NT
EXT
OU G
TP
UT
PA
RA
ME
TER
S
CO
NN
EC
TO
PTI
ON
S
CO
MM
ITO
PTI
ON
S
FET
CH
OP
TIO
NS
FET
CH
SIZ
E
RE A A A
SUL
TSE
TM
ETA
DAT
A
FIN
DL
OB
RE
QU
EST
FIN X
DL
OB
RE
PLY
ITA
BS
HM
ITA
BC
HU
NK
ME
TA
DAT
A
ITA
BM
ETA
DAT
A
CLI C C C
EN
TIN
FO
STR X
EA
MD
ATA
OS X
TRE
AM
RE
SUL
T
FDA
RE
QU
EST
ME
TA
DAT
A
FDA
RE
PLY
ME
TA
DAT
A
BAT
CH
PRE
PAR
E
TR D D D D D D D D
AN
SA
CTI
ON
FLA
GS
LO X
BFL
AG
S
Not all type codes known and processed internally are used in the protocol and clients may support a different
level of type support, depending on their version. The protocol mechanism (connect options) for connecting to
the database ensures that the client sends the server data it is able to process and that the client receives only
data that it can process from the server.
Type codes are in the range of 0-127, as the most significant bit is used on input to signal a NULL value of a
certain type.
Parts are transmitted in messages between the client and the SAP HANA database server.
The format of the data transmitted is uniquely identified by the part kind. Some part kinds share the same
format as the contained data.
Only some type codes apply to the option type field. The format of the option data is:
BOOLEAN 1-byte: zero for false and non-zero for a true value.
STRING A 2-byte signed integer (short) in little-endian format. This value is followed by the string in
CESU-8 encoding (the number of bytes is specified by the length information).
BSTRING A 2-byte signed integer (short) in little-endian format. This value is followed by the binary string
(the number of bytes is specified by the length information).
An option part contains rows having the following structure (the number of rows is the part argument count
value):
OPTION Specifies the option element as described in the option part format.
Different rows can have a different argument count, so the format is not completely tabular.
The fields of the individual rows are formatted as defined in the output field format section. One result set part
contains as many rows as the argument count field indicates:
Note
The field values may have variable lengths, depending on the data type. Therefore, all the values in the
current row must be scanned before moving to the next row.
Contains one or more errors returned by the database server to the client.
ERRORCODE I4 Specifies the error code as sent from the database server.
SQLSTATE B[5] Specifies the SQLSTATE as defined by the SQL standard for
this message.
ERRORTEXT B[ERRORTEXTLENGTH] Specifies the error text or error message in CESU-8 encod
ing.
The error level defines the level of the message as a warning, error, or fatal session-terminating error using the
following values:
1 ERROR Specifies the error message: this statement (or part of it) has failed.
2 FATALERROR Specifies the fatal error message: session is in an unusable state now.
This is a byte array of variable length and is stored in the same way as a VARBINARY output value.
Contains one or multiple (as many as the part’s ARGUMENTCOUNT field defines) 32-bit integers.
-2 SUCCESS_NO_INFO Specifies that a statement or row has been processed but the number of af
fected rows cannot be determined.
-3 EXECUTION_FAILED Specifies that the execution of a statement or processing of a row has failed.
Contains the identifier of a result set, which is a byte array of 8-bytes in length.
Note
1
Deprecated: not sent by the server.
The argument count of the part is specified by the number of elements. The returned volume IDs signal
preferred execution locations for the statement and depend on the following:
● The nature of the SQL command that is prepared (some commands can only be executed on a certain
server)
● The number of table partitions that are affected by the statement
● The location of the tables that are affected by the statement
READOFFSET I8 Specifies the offset within a large object for reading, starting with 1.
For byte-based large object types, the READOFFSET and READLENGTH define byte positions and length
values. For character-based large object types, these fields define character positions and length values within
the large object.
The OPTIONS field is a bit set that has the following defined values:
0 NULLINDICATOR Specifies that the large object value is NULL (not used for READLOBREPLY).
2 LASTDATA Specifies that there is no additional data remaining in the large object.
Requests an ABAP input stream for C++ procedure processing and is sent as a response from the client when
sending the stream data.
MASK B[…] Specifies the bit field that is used to mask ABAP table entries so that they
are not transferred.
The MASK field may be omitted completely. In this case, all columns of the ABAP table are transferred.
Otherwise, only the marked values are transferred, enabling a projection of the ABAP table in the server
processing. The number of rows requested is supplied in the argument count of the ABAPISTREAM part. In the
case that the client sends this part to identify stream data transmitted to the database server, only the
ABAPTABID field is used.
Contains one 4-byte integer value identifying the ABAPTABID of the table.
Identifies the location of a statement in the source program for debugging and analysis purposes. This is an
options part.
WRITEOFFSET I8 The offset within the large object data. An offset of -1 issues
a request to append the data to an existing large object data.
A number of large objects can be written using this request. The argument count of the part describes how
many elements are contained in the part.
0 NULLINDICATOR Specifies that the large object value is NULL (not used for WRITELOBRE
QUEST).
WRITELOBREPLY contains the LOCATORID identifiers for all large object locators that can still receive data (if
LASTDATA has not been set). The argument count defines the number of locator identifiers contained in the
data.
The parameters are densely packed and use the input field format. The argument count of the part defines how
many parameter rows are included.
Related Information
Initial Request
The initial request contains the database user name and field pairs (method name/value) for each
authentication method requested by the client.
Following the initial request, subsequent requests contain a number of field pairs for authentication methods
that are performed by exchanging messages.
The primary connection is the first connection that is opened by the client program to the system in a
distributed scenario. The master connection is the connection that starts the current distributed transaction.
Allows a specific pruning of input data as it pertains to the partitioning of data in the database server.
The PARAMETERS field contains NUMPARAMETERS elements having the following structure:
PARAMETERFUNCTION I1 Specifies the function to apply to the parameter before the hash.
ATTRIBUTETYPE I1 Specifies the storage type to be used for the hash calculation.
2 This reflects the default mapping of SQL data types to column store types.
Specifies that the format of the OUTPUTPARAMETERS part is the same as the format of the RESULTSET part.
The part contains the scalar output parameter values returned by the statement. An empty output parameter
part can be sent if there are no scalar output parameters in the procedure definition, but non-scalar output
parameters (tables) instead. The argument count is always 1.
2 This reflects the default mapping of SQL data types to column store types.
Value Description
3 Specifies the extended data type support. ALPHANUM, TEXT, SHORTTEXT, LONGDATE, SECONDDATE,
DAYDATE, SECONDTIME are supported without translation.
4 Specifies support for ALPHANUM, TEXT, SHORTTEXT, LONGDATE, SECONDDATE, DAYDATE, and SEC
ONDTIME.
Value Description
1 Specifies CONNECTION. The client can connect to any master/slave server in the topology. Connections
are enabled so that the connection load on the nodes is balanced.
2 Specifies STATEMENT. The server returns information about which node is preferred for executing the
statement. If possible, clients execute on that node.
Value Description
1 Specifies that the client handles the statement sequence number information (statement context part han
dling).
CLIENTDISTRIBUTIONMODE is OFF if a value less than one (<1) is returned by the server.
The following table further illustrates the use of the connect options. An option can depend on:
More than one of these statements can be true for any option.
CONNECTIONID - - -
COMPLETEARRAYEXECUTION - - X
CLIENTLOCALE X - -
SUPPORTSLARGEBULKOPERATIONS - - X
LARGENUMBEROFPARAMETERSSUPPORT - X X
SYSTEMID - - -
DATAFORMATVERSION X - X
ABAPVARCHARMODE X - X
SELECTFORUPDATESUPPORTED - - X
CLIENTDISTRIBUTIONMODE X X X
ENGINEDATAFORMATVERSION - - X
DISTRIBUTIONPROTOCOLVERSION - - X
SPLITBATCHCOMMANDS X X X
USETRANSACTIONFLAGSONLY - - X
IGNOREUNKNOWNPARTS - - X
TABLEOUTPUTPARAMETER X - X
ITABPARAMETER - X X
DESCRIBETABLEOUTPUTPARAMETER X - X
If HOLDCURSORSOVERCOMMIT is set by the client on commit, then all cursors are held, including those
marked explicitly as HOLD. This is not currently used by any client interface implementation.
The RESULTSETPOS field can be used to skip over entries when fetching. Currently not used by any client
interface implementation.
Contains one 4-byte integer value (little-endian) that defines the number of rows that are being fetched by the
application.
Contains the input parameters of prepared statements and additional output parameters of stored procedure
call statements.
A PARAMETERMETADATA part starts with an array of entries with the following structure:
NAMEOFFSET UI4 Specifies the offset of the parameter name in part. Set to 0xFFFFFFFF to
signal no name.
The PARAMETEROPTIONS field is a bit set that has the following defined values:
0 MANDATORY Specifies that the parameter is not nullable (must not be set to NULL).
The MODE field is a bit set that defines the direction of a parameter:
The array of parameter descriptions can be followed by the names of the parameters. Each name is written in
the following format:
A RESULTSETMETADATA part starts with an array of entries with the following structure:
TABLENAMEOFFSET UI4 Specifies the offset of the table name in the part. Set
to 0xFFFFFFFF to signal no available name.
SCHEMANAMEOFFSET UI4 Specifies the offset of the schema name in part. Set
to 0xFFFFFFFF to signal no available name.
COLUMNNAMEOFFSET UI4 Specifies the offset of the column name in the part.
Set to 0xFFFFFFFF to signal no available name.
COLUMNDISPLAYNAMEOFFSET UI4 Specifies the offset of the column display name (la
bel) in part. Set to 0xFFFFFFFF to signal no available
name.
The COLUMNOPTIONS field is a bit set that has the following defined values:
The array of column descriptions can be followed by the individual schema names, table names, column
names, and column display names. Here, each name is written in the following format:
STARTOFFSET I8 Specifies the start offset for the search. The offset is
a character or byte position dependent on the loca
tor data type.
FINDLOBREPLY contains one 8-byte integer value (little-endian) defining the position within the locator of the
search pattern. A value of -1 indicates that the pattern has not been found.
Describes how the memory used for an ITAB transfer is sent to the SAP HANA database.
The fields are formatted as variable length strings (similar to an NSTRING value in result set part). The
argument count is the number of strings in the part. Since these are key/value pairs, the argument count is
always an even number.
The STREAMDATA structure depends on the field information described by the corresponding ABAPITAB
parameter.
The TRANSACTIONFLAGS part can return one or more of the following defined options:
The part is sent from the server to signal changes to the current transaction status (for example, committed,
rolled back, or the start of a write transaction) and changes of the general session state, and whether the
In the request message, only the database name is sent. The replied message includes the ISCONNECTED
value and may include HOST and PORT values. The DATABASENAME value is not sent back.
The LOBFLAGS part can return one or more of the following defined options:
The part is sent from the client to signal whether the implicit LOB streaming has started so that the server does
not commit the current transaction, even with auto-commit on while LOB streaming.
This is a multi-line option part. Each row consists of a single STRING option with an output line from the
SQLSCRIPT_PRINT library.
Input fields consist of type code information, followed by field data if the value is not the NULL value.
The value is left blank if the type code indicates a NULL value (the MSB of the type code field is set). The
following sections only describe the VALUE format.
Output fields contain no special type code field. The type information is supplied in the respective
PARAMETERDATA (for output parameters) or RESULTSETMETADATA parts. All output data is densely packed,
there are no gaps between individual values, so some values may not be aligned in memory as required for the
native type.
Input TINYINT
Output TINYINT
NULLIND I1 Specifies the NULL value indicator. The value is NULL if this
is 0.
VALUE UI1 Specifies the TINYINT value. This is only present if the NUL
LIND is not 0.
The field has a length of 2-bytes if the value is not NULL, and 1-byte if the value is NULL.
Input SMALLINT
Output SMALLINT
NULLIND I1 Specifies the NULL value indicator. The value is NULL if this
is 0.
The field has a length of 3-bytes if the value is not NULL and 1-byte if the value is NULL.
Input INT
Output INT
NULLIND I1 Specifies the NULL value indicator. The value is NULL if this
is 0.
The field has a length of 5-bytes if the value is not NULL and 1-byte if the value is NULL.
Input BIGINT
Output BIGINT
NULLIND I1 Specifies the NULL value indicator. The value is NULL if this
is 0.
The field has a length of 9-bytes if the value is not NULL and 1-byte if the value is NULL.
Input DECIMAL
EXPONENT 14-bit Specifies the exponent (biased with 6176 leading to a range -6143 to +6144).
The number represented is (10^EXPONENT)*MANTISSA. It is expected that the MANTISSA is not a multiple of
10.
Output DECIMAL
A DECIMAL value is formatted similar to the input format, with the NULL value indicated by having bits 4, 5,
and 6 set to 1 in the last byte.
Input REAL
A REAL value is sent as float value (IEEE single precision floating point), in little-endian format.
Output REAL
A REAL value is sent as float value (IEEE single precision floating point), in little-endian format. The NULL value
is indicated by all bit sets in the value sent from the server (equal to 0xFFFFFFFF as unsigned int).
Input DOUBLE
A REAL value is sent as double value (IEEE double precision floating point), in little-endian format.
Output DOUBLE
A DOUBLE value is sent as double value (IEEE double precision floating point), in little-endian format. The
NULL value is indicated by all bit sets in the value sent from the server (equal to 0xFFFFFFFFFFFFFFFFul as
unsigned long).
Input STRING/NSTRING
● The length in bytes of VALUE, if the VALUE length is less than or equal to 245
● 246, followed by a 2-byte integer (little-endian), which contains the actual length of VALUE
● 247, followed by a 4-byte integer (little-endian), which contains the actual length of VALUE
Output STRING/NSTRING
The formatting is similar to the input with a LENGTHINDICATOR value of 255 indicating a NULL value.
Input BINARY
A BINARY input value is formatted similarly as the STRING/NSTRING value, with respect to a
LENGTHINDICATOR and a VALUE part. The VALUE contains the binary data.
Output BINARY
The formatting is similar to the input value with a LENGTHINDICATOR value of 255 indicating a NULL value.
Input BLOB/CLOB/NCLOB
A BLOB/CLOB/NCLOB field is indicated using an input LOB descriptor, followed by the LOB data after the end
of the record.
The DATA field does not immediately follow the descriptor. First, all parameters of a row are transferred and
then the BLOB/CLOB/NCLOB data follows.
0 NULLINDICATOR Specifies the large object value is NULL (not used in the in
put).
Output BLOB/CLOB/NCLOB
A BLOB/CLOB/NCLOB field is formatted using an output LOB descriptor, followed by the LOB data:
The TYPE field further refines the LOB source type code received in the result set metadata. It is defined as
follows:
0 Undefined
1 BLOB
2 CLOB
3 NCLOB
A NULL value is indicated by the MSB (0x8000) set in the YEAR field.
3 This format is retained for purpose of compatibility, DAYDATE is used where possible and the endorsed format.
4 This format is retained for compatibility purposes. SECONDTIME is used where possible and is the endorsed format.
A NULL value is indicated by setting the MSB (0x80) in the HOUR field.
Input TIMESTAMP
Output TIMESTAMP
A TIMESTAMP is formatted as a DATE value followed by a TIME value. A NULL value is indicated by setting the
NULL value in both components.
Related Information
5 This format is retained for compatibility purposes. The LONGDATE or SECONDDATE formats are used where possible and
are the endorsed formats.
Input ABAPSTRUCT
An ABAPSTRUCT is formatted similar to a BINARY value. The layout of the structure depends on the meta-
information known only to the processing liveCache C++ procedure and the ABAP client.
Output ABAPSTRUCT
A DAYDATE is computed by taking the Julian Day Number of the specified date and subtracting 1721423.
Input ST_POINT/ST_POINTZ/ST_GEOMETRY
ST_POINT and ST_GEOMETRY are sent as BINARY. They use unique type codes when SPATIALTYPES=1 or
SPATIALTYPES=2.
Input BOOLEAN
A BOOLEAN is sent as a byte with a value of 0x00 for FALSE and 0x02 for TRUE.
Output BOOLEAN
Input FIXED8
NULLIND I1 Specifies the NULL value indicator. The value is NULL if this
is 0.
VALUE I8 Specifies the FIXED8 value. This is only present if the NUL
LIND is not 0.
The field has a length of 9 bytes if the value is not NULL and 1 byte if the value is NULL.
Input FIXED12
Output FIXED12
NULLIND I1 Specifies the NULL value indicator. The value is NULL if this
is 0.
VALUE I12 Specifies the FIXED12 value. This is only present if the NUL
LIND is not 0.
The field has a length of 13 bytes if the value is not NULL and 1 byte if the value is NULL.
Input FIXED16
Output FIXED12
NULLIND I1 Specifies the NULL value indicator. The value is NULL if this
is 0.
VALUE I16 Specifies the FIXED16 value. This is only present if the NUL
LIND is not 0.
The field has a length of 17 bytes if the value is not NULL, and 1 byte if the value is NULL.
The authentication and connection process is laid out in the following sequence diagram:
For several fields in the authentication request a LENGTHINDICATOR is used. It can be up to 5-bytes:
● The length in bytes of the following value, if the length is less 250
● A length of 250 is followed by a 2-byte integer (little-endian) which contains the actual length of the value
Authentication Reply
Securely transmits a clientspecified password to an SAP HANA database, which then securely forwards the
password to an LDAP server.
Note
Following the SCRAMSHA256 authentication mechanism, two server roundtrips are necessary, an initial
request and a final request.
The cookie is obtained from a previous connection and makes two server roundtrips.
The following diagram shows how ABAP streams data between the client and the server:
Evaluates the correct server node of a distributed system before statement execution.
Statement routing reduces the overhead in server processing and reduces communication between server
nodes. For SQLDBC-based clients such as ODBC, ODBO, ADO.NET, Python DB API, and DBSL, the client library
makes statement routing decisions to reduce server-side inter-node routing. To utilize this feature, the
optimized_routing_for_partition_table property must be set to "on". This is done by default.
Hash partitioning during split batch in Split batch not supported Yes
sert
Range partitioning during split batch in Split batch not supported Yes
sert
Note
Active/Active (Read Enabled) hint-based routing uses the same mechanism as statement routing.
Preconditions
The server decides which statements are eligible for statement routing. When preparing a statement, the
server returns a TABLELOCATION part or a PARTITIONINFORMATION part to describe the preferred nodes in
detail.
FAE For All Entries. A specific ABAP Language construct, where a client-side table is joined with a server-side
table.
FDA Fast Data Access. A method to submit data for INSERT in the format used by the SAP ABAP Application
Server (ABAP Table) to the server or retrieve SELECT results in the same format, to avoid fieldwise
copying and data conversion.
MSB Most Significant Bit. The highest bit in an integer value, for example, Bit 7 in a byte.
For information about the capabilities available for your license and installation scenario, refer to the Feature
Scope Description (FSD) for your specific SAP HANA version on the SAP HANA Platform webpage.
Hyperlinks
Some links are classified by an icon and/or a mouseover text. These links provide additional information.
About the icons:
● Links with the icon : You are entering a Web site that is not hosted by SAP. By using such links, you agree (unless expressly stated otherwise in your
agreements with SAP) to this:
● The content of the linked-to site is not SAP documentation. You may not infer any product claims against SAP based on this information.
● SAP does not agree or disagree with the content on the linked-to site, nor does SAP warrant the availability and correctness. SAP shall not be liable for any
damages caused by the use of such content unless damages have been caused by SAP's gross negligence or willful misconduct.
● Links with the icon : You are leaving the documentation for that particular SAP product or service and are entering a SAP-hosted Web site. By using such
links, you agree that (unless expressly stated otherwise in your agreements with SAP) you may not infer any product claims against SAP based on this
information.
Example Code
Any software coding and/or code snippets are examples. They are not for productive use. The example code is only intended to better explain and visualize the syntax
and phrasing rules. SAP does not warrant the correctness and completeness of the example code. SAP shall not be liable for errors or damages caused by the use of
example code unless damages have been caused by SAP's gross negligence or willful misconduct.
Gender-Related Language
We try not to use genderspecific word forms and formulations. As appropriate for context and readability, SAP may use masculine word forms to refer to all genders.
SAP and other SAP products and services mentioned herein as well as
their respective logos are trademarks or registered trademarks of SAP
SE (or an SAP affiliate company) in Germany and other countries. All
other product and service names mentioned are the trademarks of their
respective companies.