ODBC Connection Properties
When connecting to an SAP HANA database using ODBC, there are several connection properties that you can specify.
The following table lists the HANA client-specific ODBC connection properties:
| Property | Value | Default | Description |
|---|---|---|---|
| ABAPVARCHARMODE | boolean | FALSE | In ABAP VARCHAR mode, a single space and an empty string are considered the same. |
| AUTOCOMMIT | boolean | FALSE | When in autocommit mode, every statement is automatically committed. Otherwise, commits and/or rollbacks must be done manually. |
| BINTEXT_IS_NCLOB | boolean | TRUE | Determines which SQL type is used to describe BINTEXT columns. TRUE if the type is returned as SQL_WLONGVARCHAR(-10), and FALSE if the type is returned as SQL_LONGVARBINARY(-4). Use FALSE to maintain compatibility with HANA versions earlier than 2.0. |
| CACHEDVIEWTS | boolean | TRUE | Allows the sending of last refresh TS/max refresh time for cached views (only available in SQLDBC). |
| CHAR_AS_UTF8 | boolean | FALSE | Returns CHAR data in UTF-8 format. |
| CHOPBLANKS | boolean | FALSE | Chop off trailing blanks of character output. |
| CHOPBLANKSINPUT | boolean | FALSE | Chop off trailing blanks of character input. |
| CONNECTTIMEOUT | timeout in milliseconds | 0 (disabled) | Aborts connection attempts after the specified timeout. Setting this option to 0 disables the timeout. |
| CURRENTSCHEMA | <schema> | CURRENTUSER | Sets the current schema, which is used for identifiers without schema. |
| DATABASENAME | <name> |
| The name of the database to connect to in multi-tenant database container systems. |
| DISTRIBUTION | OFF, CONNECTION, STATEMENT, ALL | STATEMENT | Choose the distribution mode. Specifying STATEMENT does not include CONNECTION distribution. |
| EMPTYTIMESTAMPISNULL | boolean | TRUE | When enabled, DAYDATE, SECONDTIME, SECONDDATE, and LONGDATE values inserted as empty strings are returned as NULLs. When disabled, these values are returned as out-of-band values. |
| ISOLATIONLEVEL | TRANSACTION_READ_COMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE | TRANSACTION_READ_COMMITTED | Sets the isolation level for the connection. |
| LOCALE | ISO locale code | client locale | The client locale. |
| PACKETSIZE | <number> | 1 MB | Sets the maximum size of a request packet sent from the client to the server in bytes. The minimum is 1 MB. |
| PWD | <password> | NA | The user password. Optional, depending on the used authentication method. |
| RECONNECT | boolean | FALSE | When enabled, the system automatically reconnects to the database instance after a command timeout or when the connection was broken and reconnecting restores the old state (for example, if no transaction was open). |
| SCROLLABLERESULT | boolean | FALSE | Enables or disables scrollable results sets. |
| SERVERNODE | <host>:<port>[, <host>:<port> ] | NA | Should contain all master candidates. See Administration Guide for details. |
| SHOW_CATALOGS | boolean | FALSE | Enables Microsoft-specific application support. This is needed to connect to HANA from Excel and Access. |
| SPATIALTYPES | boolean | 2 | Determines the ODBC SQL type returned for the ST_POINT and ST_GEOMETRY columns. Possible values are:
|
| SPLITBATCHCOMMANDS | boolean | TRUE | Allow split and parallel execution of batch commands on partitioned tables. |
| UID | <user> | NA | The user name. Optional, depending on used authentication method. |

本文详细介绍了使用 ODBC 连接到 SAP HANA 数据库时可以指定的各种连接属性,包括 ABAPVARCHARMODE、AUTOCOMMIT、BINTEXT_IS_NCLOB 等,并解释了这些属性的作用及默认值。
4476

被折叠的 条评论
为什么被折叠?



