DBSERVER_MAX_BYTES= LIBNAME Statement Option

Specifies the maximum number of bytes per single character in the database server encoding.

Valid in: SAS/ACCESS LIBNAME statement
Category: Data Set Control
Alias: DB_MAX_BYTES= [Impala]
Default: 0 [Impala, Snowflake]
usually 1 [Oracle, SAP ASE, Vertica]
none [Amazon Redshift, DB2 under UNIX and PC Hosts, Yellowbrick]
Supports: NLS
Data source: Amazon Redshift, DB2 under UNIX and PC Hosts, Impala, Oracle, SAP ASE, Snowflake, Vertica, Yellowbrick
Notes: Support for Amazon Redshift was added in the April 2016 release of SAS/ACCESS.
Support for Snowflake was added in the August 2019 release of SAS/ACCESS.
Support for Yellowbrick was added in SAS 9.4M7.
See: DBCLIENT_MAX_BYTES= LIBNAME option, SAS/ACCESS LIBNAME options for NLS

Syntax

DBSERVER_MAX_BYTES=max-server-bytes

Details

Use this option to derive (adjust the value of) the number of characters from the client column lengths that byte semantics initially creates. Although the default is usually 1, you can use this option to set it to another value if this information is available from the external data source server.

SAP ASE: You can use this option to specify different byte encoding between the SAS client and the SAP ASE server. For example, if the client uses double-byte encoding and the server uses multibyte encoding, specify DBSERVER_MAX_BYTES=3. In this case, the SAS/ACCESS engine evaluates this option only if you specify a value that is greater than 2. Otherwise, it indicates that both client and server use the same encoding scheme.

Examples

Example 1: Adjust Specific Column Lengths

Only the lengths that you specify with DBSERVER_MAX_BYTES= affect column lengths that byte semantics created initially.

libname x4 &engine &connopt DBSERVER_MAX_BYTES=4
 DBCLIENT_MAX_BYTES=1 ADJUST_NCHAR_COLUMN_LENGTHS=no;
proc contents data=x4.char_sem; run;
proc contents data=x4.nchar_sem; run;
proc contents data=x4.byte_sem; run;
proc contents data=x4.mixed_sem; run;

Example 2: Specify Different Settings for Various Options(#1)

libname x5 &engine &connopt ADJUST_NCHAR_COLUMN_LENGTHS=NO
ADJUST_BYTE_SEMANTIC_COLUMN_LENGTHS=NO DBCLIENT_MAX_BYTES=3;
proc contents data=x5.char_sem; run;
proc contents data=x5.nchar_sem; run;
proc contents data=x5.byte_sem; run;
proc contents data=x5.mixed_sem; run;

Example 3: Specify Different Settings for Various Options (#2)

libname x6  &engine &connopt ADJUST_BYTE_SEMANTIC_COLUMN_LENGTHS=YES
ADJUST_NCHAR_COLUMN_LENGTHS=YES DBCLIENT_MAX_BYTES=3;
proc contents data=x6.char_sem; run;
proc contents data=x6.nchar_sem; run;
proc contents data=x6.byte_sem; run;
proc contents data=x6.mixed_sem; run;
Last updated: February 3, 2026